progress with the new send frame

This commit is contained in:
Manuel Simon Hirsig
2016-02-21 19:23:12 +01:00
parent 6485963c57
commit 8c181e6bdd
3 changed files with 273 additions and 578 deletions
+97 -388
View File
@@ -13,6 +13,100 @@ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
</Scripts>
</frame>
<EditBox name="PostalSubjectEditBox" parent="SendMailFrame" letters="64" historyLines="0" autoFocus="false">
<Size>
<AbsDimension x="237" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="SendMailNameEditBox" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-3"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString inherits="GameFontNormal" text="MAIL_SUBJECT_LABEL" justifyH="RIGHT">
<Anchors>
<Anchor point="RIGHT" relativePoint="LEFT">
<Offset>
<AbsDimension x="-12" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
<Size>
<AbsDimension x="8" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-8" y="0"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
</Texture>
<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
<Size>
<AbsDimension x="221" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
</Anchors>
<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
</Texture>
<Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
<Size>
<AbsDimension x="8" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
</Anchors>
<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnTabPressed>
if IsShiftKeyDown() then
SendMailNameEditBox:SetFocus()
else
SendMailBodyEditBox:SetFocus()
end
</OnTabPressed>
<OnEnterPressed>
SendMailBodyEditBox:SetFocus()
</OnEnterPressed>
<OnEscapePressed>
this:ClearFocus()
</OnEscapePressed>
<OnTextChanged>
SendMailFrame_CanSend()
</OnTextChanged>
</Scripts>
<FontString inherits="ChatFontNormal"/>
</EditBox>
<Button name="PostalMailButton" parent="SendMailFrame" inherits="UIPanelButtonTemplate" text="SEND_LABEL">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="RIGHT" relativeTo="SendMailCancelButton" relativePoint="LEFT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
SendMailMailButton_OnClick();
</OnClick>
</Scripts>
</Button>
<Button name="PostalAttachment" virtual="true">
<Size>
<AbsDimension x="37" y="37"/>
@@ -71,8 +165,8 @@ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
</OnClick>
<OnEnter>
GameTooltip:SetOwner(this, 'ANCHOR_RIGHT')
if this.item and this.bag then
GameTooltip:SetBagItem(this.bag,this.item)
if this.bag and this.slot then
GameTooltip:SetBagItem(this.bag, this.slot)
else
GameTooltip:SetText(ATTACHMENT_TEXT, 1.0, 1.0, 1.0)
end
@@ -92,7 +186,7 @@ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
</Scripts>
<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
</Button>
<Button name="PostalAttachment1" parent="SendMailFrame" inherits="PostalAttachment" id="1"/>
<Button name="PostalAttachment2" parent="SendMailFrame" inherits="PostalAttachment" id="2"/>
<Button name="PostalAttachment3" parent="SendMailFrame" inherits="PostalAttachment" id="3"/>
@@ -136,18 +230,6 @@ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
</Anchor>
</Anchors>
</FontString>
<FontString name="PostalStatusText" inherits="GameFontNormal">
<Size>
<AbsDimension x="224" y="14"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="125"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString justifyH="left" justifyV="top" name="PostalHelpText" inherits="GameFontNormal" text="POSTAL_HELP">
<Size>
<AbsDimension x="300" y="150"/>
@@ -163,221 +245,6 @@ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
</Layer>
</Layers>
<Frames>
<EditBox name="PostalNameEditBox" letters="12" historyLines="0" autoFocus="false">
<Size>
<AbsDimension x="122" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="105" y="-46"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString inherits="GameFontNormal" text="MAIL_TO_LABEL" justifyH="RIGHT">
<Anchors>
<Anchor point="RIGHT" relativePoint="LEFT">
<Offset>
<AbsDimension x="-12" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
<Size>
<AbsDimension x="8" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-8" y="0"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
</Texture>
<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
<Size>
<AbsDimension x="100" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
</Anchors>
<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
</Texture>
<Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
<Size>
<AbsDimension x="8" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
</Anchors>
<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnTabPressed>
PostalSubjectEditBox:SetFocus()
</OnTabPressed>
<OnEditFocusLost>
this:HighlightText(0, 0)
</OnEditFocusLost>
<OnChar>
pcall(SendMailFrame_SendeeAutocomplete)
</OnChar>
<OnEnterPressed>
PostalSubjectEditBox:SetFocus()
</OnEnterPressed>
<OnEscapePressed>
PostalNameEditBox:ClearFocus()
</OnEscapePressed>
<OnTextChanged>
Postal:CanSend()
</OnTextChanged>
</Scripts>
<FontString inherits="ChatFontNormal"/>
</EditBox>
<Frame name="PostalCostMoneyFrame" inherits="SmallMoneyFrameTemplate">
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-46" y="-48"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString inherits="GameFontNormal" text="SEND_MAIL_COST">
<Anchors>
<Anchor point="RIGHT" relativePoint="LEFT">
<Offset>
<AbsDimension x="-3" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
SmallMoneyFrame_OnLoad()
MoneyFrame_SetType("STATIC")
MoneyFrame_Update("PostalCostMoneyFrame", GetSendMailPrice())
</OnLoad>
</Scripts>
</Frame>
<EditBox name="PostalSubjectEditBox" letters="64" historyLines="0" autoFocus="false">
<Size>
<AbsDimension x="237" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="PostalNameEditBox" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-3"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString inherits="GameFontNormal" text="MAIL_SUBJECT_LABEL" justifyH="RIGHT">
<Anchors>
<Anchor point="RIGHT" relativePoint="LEFT">
<Offset>
<AbsDimension x="-12" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
<Size>
<AbsDimension x="8" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-8" y="0"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
</Texture>
<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
<Size>
<AbsDimension x="221" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
</Anchors>
<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
</Texture>
<Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
<Size>
<AbsDimension x="8" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
</Anchors>
<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnTabPressed>
PostalNameEditBox:SetFocus()
</OnTabPressed>
<OnEscapePressed>
PostalSubjectEditBox:ClearFocus()
</OnEscapePressed>
</Scripts>
<FontString inherits="ChatFontNormal"/>
</EditBox>
<Frame name="PostalMoneyFrame" inherits="SmallMoneyFrameTemplate">
<Anchors>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="183" y="84"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Button name="PostalCancelButton" inherits="UIPanelButtonTemplate" text="CANCEL">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-39" y="80"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
HideUIPanel(MailFrame)
</OnClick>
</Scripts>
</Button>
<Button name="PostalMailButton" inherits="UIPanelButtonTemplate" text="SEND_LABEL">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="RIGHT" relativeTo="SendMailCancelButton" relativePoint="LEFT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PostalAcceptSendFrame:Show()
</OnClick>
</Scripts>
</Button>
<Button name="PostalAbortButton" hidden="true" inherits="UIPanelButtonTemplate" text="POSTAL_ABORT">
<Size>
<AbsDimension x="80" y="22"/>
@@ -406,164 +273,6 @@ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
</Scripts>
</Frame>
<Button name="MailFrameTab3" inherits="FriendsFrameTabTemplate" id="3" parent="MailFrame" text="Mass Mail">
<Anchors>
<Anchor point="LEFT" relativeTo="MailFrameTab2" relativePoint="RIGHT">
<Offset>
<AbsDimension x="-8" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
Postal:MailFrameTab_OnClick()
</OnClick>
</Scripts>
</Button>
<Frame name="PostalAcceptSendFrame" toplevel="true" frameStrata="DIALOG" movable="true" enableMouse="true" hidden="true" parent="PostalFrame">
<Size>
<AbsDimension x="400" y="150"/>
</Size>
<Anchors>
<Anchor point="CENTER" relativeTo="UIParent"/>
</Anchors>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11"/>
</BackgroundInsets>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<EdgeSize>
<AbsValue val="32"/>
</EdgeSize>
</Backdrop>
<Layers>
<Layer level="ARTWORK">
<Texture name="$parentHeaderTexture" file="Interface\DialogFrame\UI-DialogBox-Header">
<Size>
<AbsDimension x="256" y="64"/>
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="12"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<FontString inherits="GameFontNormal" text="POSTAL_SEND">
<Anchors>
<Anchor point="TOP" relativeTo="$parentHeaderTexture">
<Offset>
<AbsDimension x="0" y="-14"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentInfo" justifyV="top" inherits="GameFontNormal" text="POSTAL_SENDINFO">
<Size>
<AbsDimension x="350" y="32"/>
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-78"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentInfoString" justifyV="top" inherits="GameFontNormal" text="POSTAL_SENDINFO2">
<Size>
<AbsDimension x="350" y="12"/>
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-30"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentInfoItems" justifyV="top" inherits="GameFontNormal" text="">
<Size>
<AbsDimension x="350" y="12"/>
</Size>
<Anchors>
<Anchor point="TOP" relativeTo="$parentInfoString" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Frame name="$parentMoneyFrame" inherits="SmallMoneyFrameTemplate">
<Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parentInfo">
<Offset>
<AbsDimension x="0" y="5"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
SmallMoneyFrame_OnLoad();
MoneyFrame_SetType("STATIC");
MoneyFrame_Update(this:GetName(), GetSendMailPrice())
</OnLoad>
</Scripts>
</Frame>
<Button name="$parentSendButton" hidden="false" inherits="GameMenuButtonTemplate" text="POSTAL_SENDBUTTON">
<Size>
<AbsDimension x="60" y="21"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="-32" y="8"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PostalGlobalFrame.queue = Postal:FillItemTable();
PostalGlobalFrame.total = getn(PostalGlobalFrame.queue);
Postal:ClearItems();
PostalGlobalFrame:Show();
this:GetParent():Hide();
POSTAL_CANSENDNEXT = 1
</OnClick>
</Scripts>
</Button>
<Button name="$parentCancelButton" hidden="false" inherits="GameMenuButtonTemplate" text="POSTAL_CANCELBUTTON">
<Size>
<AbsDimension x="60" y="21"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="32" y="8"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
this:GetParent():Hide()
</OnClick>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnShow>
getglobal(this:GetName() .. "InfoItems"):SetText(PostalFrame.num .. " " .. POSTAL_ITEMS);
MoneyFrame_Update(this:GetName() .. "MoneyFrame", PostalFrame.num*GetSendMailPrice())
</OnShow>
</Scripts>
</Frame>
<Frame name="PostalInboxFrame" parent="UIParent">
<Scripts>
<OnUpdate>