From 1f003118f0caa00f0fc0ffbef92fcb95c447a832 Mon Sep 17 00:00:00 2001 From: EinBaum Date: Sat, 7 Oct 2017 16:16:50 +0200 Subject: [PATCH] Display page number in inbox window title --- Mail.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mail.lua b/Mail.lua index b8328be..ecc3a02 100644 --- a/Mail.lua +++ b/Mail.lua @@ -152,6 +152,12 @@ function hook.InboxFrame_Update() _G['MailItem' .. i]:Hide() _G['MailItem' .. i]:Show() end + do + local currentPage = InboxFrame.pageNum + local totalPages = math.ceil(GetInboxNumItems() / INBOXITEMS_TO_DISPLAY) + local text = totalPages > 0 and (currentPage .. "/" .. totalPages) or ("Empty") + InboxTitleText:SetText("Inbox [" .. text .. "]") + end Inbox_UpdateLock() end