Add icons for returned & AH mails

This commit is contained in:
Sica
2025-03-17 01:55:37 +01:00
parent 44fd57dff3
commit 814a322b87
10 changed files with 136 additions and 2 deletions
BIN
View File
Binary file not shown.
Binary file not shown.
+32
View File
@@ -8,6 +8,16 @@ local ATTACHMENTS_MAX = 21
local ATTACHMENTS_PER_ROW_SEND = 7
local ATTACHMENTS_MAX_ROWS_SEND = 3
local INBOX_AUCTIONHOUSES = {
[ "Stormwind Auction House" ] = true,
[ "Alliance Auction House" ] = true,
[ "Darnassus Auction House" ] = true,
[ "Undercity Auction House" ] = true,
[ "Thunder Bluff Auction House" ] = true,
[ "Horde Auction House" ] = true,
[ "Blackwater Auction House" ] = true,
}
m.timer = 0
m.orig = {}
m.hooks = {}
@@ -164,6 +174,23 @@ function Mail.MAIL_INBOX_UPDATE()
if Inbox_opening then
m.inbox_update = true
end
for i = 1, 7 do
local index = (i + (api.InboxFrame.pageNum - 1) * 7)
if index <= api.GetInboxNumItems() then
local _, _, sender, _, _, _, _, _, _, wasReturned = api.GetInboxHeaderInfo( index )
if INBOX_AUCTIONHOUSES[ sender ] then
api[ "TurtleMailAuctionIcon" .. i ]:Show()
else
api[ "TurtleMailAuctionIcon" .. i ]:Hide()
end
if wasReturned then
api[ "TurtleMailReturnedArrow" .. i ]:Show()
else
api[ "TurtleMailReturnedArrow" .. i ]:Hide()
end
end
end
end
---@param name string
@@ -182,6 +209,11 @@ function Mail.inbox_load()
api.MailFrame:SetMovable( true )
api.MailFrame:SetScript( "OnDragStop", m.on_drag_stop )
for i = 1, 7 do
api[ "TurtleMailAuctionIcon" .. i .. "Texture" ]:SetVertexColor( api.NORMAL_FONT_COLOR.r, api.NORMAL_FONT_COLOR.g, api.NORMAL_FONT_COLOR.b )
api[ "TurtleMailReturnedArrow" .. i .. "Texture" ]:SetVertexColor( api.NORMAL_FONT_COLOR.r, api.NORMAL_FONT_COLOR.g, api.NORMAL_FONT_COLOR.b )
end
end
function Inbox_OpenAll()
+1 -1
View File
@@ -2,7 +2,7 @@
## Interface: 11200
## Title: |cffabd473Turtle|cffffffffMail
## Author: shirsig/sica
## Version: 1.2.1
## Version: 1.3
## Notes: Mailbox enhancement
## SavedVariables: TurtleMail_AutoCompleteNames
## SavedVariablesPerCharacter: TurtleMail_To TurtleMail_Point
+92
View File
@@ -189,6 +189,98 @@
<Button name="MailAttachment20" parent="SendMailFrame" inherits="MailAttachment"/>
<Button name="MailAttachment21" parent="SendMailFrame" inherits="MailAttachment"/>
<Frame name="TurtleMailReturnedArrowTemplate" virtual="true" hidden="true">
<Size>
<AbsDimension x="32" y="32"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="0" y="8"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentTexture" file="Interface\Addons\TurtleMail\TurtleMail-RetArrow.blp">
<Size>
<AbsDimension x="32" y="32"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnEnter>
GameTooltip:SetOwner( this, "ANCHOR_RIGHT" );
GameTooltip:SetText( L[ "This mail was returned to you." ] );
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
</Scripts>
</Frame>
<Frame name="TurtleMailReturnedArrow1" parent="MailItem1ExpireTime" hidden="true" inherits="TurtleMailReturnedArrowTemplate"/>
<Frame name="TurtleMailReturnedArrow2" parent="MailItem2ExpireTime" hidden="true" inherits="TurtleMailReturnedArrowTemplate"/>
<Frame name="TurtleMailReturnedArrow3" parent="MailItem3ExpireTime" hidden="true" inherits="TurtleMailReturnedArrowTemplate"/>
<Frame name="TurtleMailReturnedArrow4" parent="MailItem4ExpireTime" hidden="true" inherits="TurtleMailReturnedArrowTemplate"/>
<Frame name="TurtleMailReturnedArrow5" parent="MailItem5ExpireTime" hidden="true" inherits="TurtleMailReturnedArrowTemplate"/>
<Frame name="TurtleMailReturnedArrow6" parent="MailItem6ExpireTime" hidden="true" inherits="TurtleMailReturnedArrowTemplate"/>
<Frame name="TurtleMailReturnedArrow7" parent="MailItem7ExpireTime" hidden="true" inherits="TurtleMailReturnedArrowTemplate"/>
<Frame name="TurtleMailAuctionTemplate" virtual="true" hidden="true">
<Size>
<AbsDimension x="32" y="32"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="4" y="8"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentTexture" file="Interface\Addons\TurtleMail\TurtleMail-AH.blp">
<Size>
<AbsDimension x="28" y="28"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="-4" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnEnter>
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
GameTooltip:SetText( L[ "This mail was sent by an auctionhouse." ] );
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
</Scripts>
</Frame>
<Frame name="TurtleMailAuctionIcon1" parent="MailItem1ExpireTime" hidden="true" inherits="TurtleMailAuctionTemplate"/>
<Frame name="TurtleMailAuctionIcon2" parent="MailItem2ExpireTime" hidden="true" inherits="TurtleMailAuctionTemplate"/>
<Frame name="TurtleMailAuctionIcon3" parent="MailItem3ExpireTime" hidden="true" inherits="TurtleMailAuctionTemplate"/>
<Frame name="TurtleMailAuctionIcon4" parent="MailItem4ExpireTime" hidden="true" inherits="TurtleMailAuctionTemplate"/>
<Frame name="TurtleMailAuctionIcon5" parent="MailItem5ExpireTime" hidden="true" inherits="TurtleMailAuctionTemplate"/>
<Frame name="TurtleMailAuctionIcon6" parent="MailItem6ExpireTime" hidden="true" inherits="TurtleMailAuctionTemplate"/>
<Frame name="TurtleMailAuctionIcon7" parent="MailItem7ExpireTime" hidden="true" inherits="TurtleMailAuctionTemplate"/>
<CheckButton name="SendMailCODAllButton" parent="SendMailFrame" inherits="OptionsCheckButtonTemplate" >
<Size x="16" y="16"/>
<Anchors>
+2
View File
@@ -4,4 +4,6 @@ if GetLocale() == "deDE" then
L[ "each mail" ] = "Jede Nachricht"
L[ "Money received" ] = "Geld erhalten"
L[ "All mails" ] = "Alle Nachrichten"
L[ "This mail was returned to you." ] = "Diese Nachricht wurde an dich zurückgesendet."
L[ "This mail was sent by an auctionhouse." ] = "Diese Nachricht wurde von einem Auktionshaus gesendet."
end
+2
View File
@@ -4,4 +4,6 @@ if GetLocale() == "esES" then
L[ "each mail" ] = "cada mail"
L[ "Money received" ] = "Dinero recibido"
L[ "All mails" ] = "Todos los mails"
L[ "This mail was returned to you." ] = "Este correo fue devuelto a ti."
L[ "This mail was sent by an auctionhouse." ] = "Este correo fue enviado por una casa de subastas."
end
+2
View File
@@ -4,4 +4,6 @@ if GetLocale() == "frFR" then
L[ "each mail" ] = "chaque message"
L[ "Money received" ] = "Argent reçu"
L[ "All mails" ] = "Tous mails"
L[ "This mail was returned to you." ] = "Ce courrier vous a été retourné."
L[ "This mail was sent by an auctionhouse." ] = "Ce courrier a été envoyé par une maison de vente aux enchères."
end
+3 -1
View File
@@ -5,4 +5,6 @@ L[ "collected" ] = nil
L[ "1st mail" ] = nil
L[ "each mail" ] = nil
L[ "Money received" ] = nil
L[ "All mails" ] = nil
L[ "All mails" ] = nil
L[ "This mail was returned to you." ] = nil
L[ "This mail was sent by an auctionhouse." ] = nil
+2
View File
@@ -4,4 +4,6 @@ if GetLocale() == "ruRU" then
L[ "each mail" ] = "Каждое письмо"
L[ "Money received" ] = "Деньги получены"
L[ "All mails" ] = "Bce письма"
L[ "This mail was returned to you." ] = "Это письмо было возвращено вам."
L[ "This mail was sent by an auctionhouse." ] = "Это письмо было отправлено аукционным домом."
end