almost done with new send frame

This commit is contained in:
Manuel Simon Hirsig
2016-02-21 20:42:56 +01:00
parent 8c181e6bdd
commit 76974fdfbf
2 changed files with 41 additions and 40 deletions
+13 -12
View File
@@ -243,6 +243,7 @@ function Postal:OnEnable()
-- hack to avoid automatic subject setting/button enabling
SendMailMailButton:Hide()
SendMailSubjectEditBox:Hide()
SendMailSubjectEditBox.SetText = function(self, text) PostalSubjectEditBox:SetText(text) end
SendMailNameEditBox:SetScript('OnTabPressed', function()
PostalSubjectEditBox:SetFocus()
end)
@@ -534,18 +535,6 @@ function Postal:SendMail()
subject = subject..format(' (Part %d of %d)', this.total - getn(this.queue), this.total)
end
if this.first then
this.first = false
if this.money then
if this.cod then
SetSendMailCOD(this.money)
else
SetSendMailMoney(this.money)
end
end
end
if item then
if GetSendMailItem() and PostalFrame.mailbag and PostalFrame.mailitem then
-- There's already an item in the slot
@@ -571,6 +560,18 @@ function Postal:SendMail()
end
end
if this.first then
this.first = false
if this.money then
if this.cod then
SetSendMailCOD(this.money)
else
SetSendMailMoney(this.money)
end
end
end
SendMail(this.to, subject, this.body)
return
end
+28 -28
View File
@@ -187,27 +187,27 @@ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
<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"/>
<Button name="PostalAttachment4" parent="SendMailFrame" inherits="PostalAttachment" id="4"/>
<Button name="PostalAttachment5" parent="SendMailFrame" inherits="PostalAttachment" id="5"/>
<Button name="PostalAttachment6" parent="SendMailFrame" inherits="PostalAttachment" id="6"/>
<Button name="PostalAttachment7" parent="SendMailFrame" inherits="PostalAttachment" id="7"/>
<Button name="PostalAttachment8" parent="SendMailFrame" inherits="PostalAttachment" id="8"/>
<Button name="PostalAttachment9" parent="SendMailFrame" inherits="PostalAttachment" id="9"/>
<Button name="PostalAttachment10" parent="SendMailFrame" inherits="PostalAttachment" id="10"/>
<Button name="PostalAttachment11" parent="SendMailFrame" inherits="PostalAttachment" id="11"/>
<Button name="PostalAttachment12" parent="SendMailFrame" inherits="PostalAttachment" id="12"/>
<Button name="PostalAttachment13" parent="SendMailFrame" inherits="PostalAttachment" id="13"/>
<Button name="PostalAttachment14" parent="SendMailFrame" inherits="PostalAttachment" id="14"/>
<Button name="PostalAttachment15" parent="SendMailFrame" inherits="PostalAttachment" id="15"/>
<Button name="PostalAttachment16" parent="SendMailFrame" inherits="PostalAttachment" id="16"/>
<Button name="PostalAttachment17" parent="SendMailFrame" inherits="PostalAttachment" id="17"/>
<Button name="PostalAttachment18" parent="SendMailFrame" inherits="PostalAttachment" id="18"/>
<Button name="PostalAttachment19" parent="SendMailFrame" inherits="PostalAttachment" id="19"/>
<Button name="PostalAttachment20" parent="SendMailFrame" inherits="PostalAttachment" id="20"/>
<Button name="PostalAttachment21" parent="SendMailFrame" inherits="PostalAttachment" id="21"/>
<Button name="PostalAttachment1" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment2" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment3" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment4" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment5" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment6" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment7" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment8" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment9" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment10" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment11" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment12" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment13" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment14" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment15" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment16" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment17" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment18" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment19" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment20" parent="SendMailFrame" inherits="PostalAttachment"/>
<Button name="PostalAttachment21" parent="SendMailFrame" inherits="PostalAttachment"/>
<Frame name="PostalFrame" parent="MailFrame" hidden="true">
<Size>
@@ -300,13 +300,13 @@ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="PostalBoxItem1CB" id="1" hidden="false" parent="MailItem1" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem2CB" id="2" hidden="false" parent="MailItem2" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem3CB" id="3" hidden="false" parent="MailItem3" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem4CB" id="4" hidden="false" parent="MailItem4" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem5CB" id="5" hidden="false" parent="MailItem5" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem6CB" id="6" hidden="false" parent="MailItem6" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem7CB" id="7" hidden="false" parent="MailItem7" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem1CB" id="1" hidden="true" parent="MailItem1" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem2CB" id="2" hidden="true" parent="MailItem2" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem3CB" id="3" hidden="true" parent="MailItem3" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem4CB" id="4" hidden="true" parent="MailItem4" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem5CB" id="5" hidden="true" parent="MailItem5" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem6CB" id="6" hidden="true" parent="MailItem6" inherits="PostalBoxItemCBTemplate"/>
<CheckButton name="PostalBoxItem7CB" id="7" hidden="true" parent="MailItem7" inherits="PostalBoxItemCBTemplate"/>
<Button name="PostalInboxOpenSelected" parent="InboxFrame" inherits="UIPanelButtonTemplate" text="POSTAL_INBOX_OPENSELECTED">
<Size>
<AbsDimension x="120" y="25"/>