empty mailbox frame message

This commit is contained in:
Salikh Gurgenidze
2025-12-28 04:27:46 +04:00
parent 91ed711290
commit a63e8f8b30
2 changed files with 32 additions and 1 deletions
+15 -1
View File
@@ -164,6 +164,16 @@ function MailboxFrame:Update()
end
-- Display items
local emptyMessage = getglobal("Guda_MailboxFrame_EmptyMessage")
if emptyMessage then
if totalItems == 0 then
emptyMessage:SetText("No mailbox data found for this character.\n\nVisit a mailbox in-game to save your mail data.")
emptyMessage:Show()
else
emptyMessage:Hide()
end
end
self:DisplayItems(filteredItems, charFullName, totalItems)
end
@@ -308,7 +318,11 @@ function MailboxFrame:DisplayItems(items, charFullName, totalMails)
-- Update pagination text
local paginationText = getglobal("Guda_MailboxFrame_Pagination_Text")
if paginationText then
paginationText:SetText(string.format("%d/%d (items: %d)", currentPage, totalPages, totalMails or 0))
if totalMails == 0 then
paginationText:SetText("No Mail")
else
paginationText:SetText(string.format("%d/%d (items: %d)", currentPage, totalPages, totalMails or 0))
end
end
end
+17
View File
@@ -255,6 +255,23 @@
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="Guda_MailboxFrame_EmptyMessage" inherits="GameFontNormal" justifyH="CENTER" hidden="true">
<Size>
<AbsDimension x="300" y="0"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="0.82" b="0"/>
</FontString>
</Layer>
</Layers>
</Frame>
<!-- Pagination -->