From 4e3a31c2aefaa929e7851c5f7bd3606ee3d0e334 Mon Sep 17 00:00:00 2001 From: outlying Date: Wed, 14 Jan 2026 09:11:53 +0100 Subject: [PATCH 1/3] Base info button --- UI.lua | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/UI.lua b/UI.lua index 4f7be99..7283ef3 100644 --- a/UI.lua +++ b/UI.lua @@ -16,11 +16,53 @@ function CreateItemSplitterDialog( frame:SetScript("OnDragStop", frame.StopMovingOrSizing) frame:EnableMouseWheel(true) - -- Title text - frame.title = frame:CreateFontString(nil, "OVERLAY") - frame.title:SetFontObject("GameFontHighlight") - frame.title:SetPoint("CENTER", frame.TitleBg, "CENTER", 5, 0) - frame.title:SetText("Item Splitter") + -- Title text + frame.title = frame:CreateFontString(nil, "OVERLAY") + frame.title:SetFontObject("GameFontHighlight") + frame.title:SetPoint("CENTER", frame.TitleBg, "CENTER", 5, 0) + frame.title:SetText("Item Splitter") + + -- Info window + local infoFrame = CreateFrame("Frame", nil, frame, "BasicFrameTemplateWithInset") + infoFrame:SetSize(260, 140) + infoFrame:SetPoint("TOPLEFT", frame, "TOPRIGHT", 8, 0) + infoFrame:SetFrameStrata("DIALOG") + infoFrame:Hide() + + infoFrame.title = infoFrame:CreateFontString(nil, "OVERLAY") + infoFrame.title:SetFontObject("GameFontHighlight") + infoFrame.title:SetPoint("CENTER", infoFrame.TitleBg, "CENTER", 5, 0) + infoFrame.title:SetText("Info") + + infoFrame.text = infoFrame:CreateFontString(nil, "OVERLAY") + infoFrame.text:SetFontObject("GameFontHighlightSmall") + infoFrame.text:SetPoint("TOPLEFT", infoFrame, "TOPLEFT", 12, -30) + infoFrame.text:SetPoint("BOTTOMRIGHT", infoFrame, "BOTTOMRIGHT", -12, 12) + infoFrame.text:SetJustifyH("LEFT") + infoFrame.text:SetJustifyV("TOP") + infoFrame.text:SetText("Information about the splitter dialog will go here.") + + infoFrame.CloseButton:SetScript("OnClick", function() + infoFrame:Hide() + end) + + -- Info button on the title bar + local infoButton = CreateFrame("Button", nil, frame) + infoButton:SetSize(32, 32) + infoButton:SetPoint("RIGHT", frame.TitleBg, "RIGHT", -24, 0) + infoButton:SetNormalTexture("Interface\\Common\\help-i") + infoButton:SetHighlightTexture("Interface\\Common\\help-i", "ADD") + infoButton:SetPushedTexture("Interface\\Common\\help-i") + infoButton:SetScript("OnClick", function() + if infoFrame:IsShown() then + infoFrame:Hide() + else + infoFrame:Show() + end + end) + + frame.infoFrame = infoFrame + frame.infoButton = infoButton -- Edit box for number input local editBox = CreateFrame("EditBox", nil, frame, "InputBoxTemplate") @@ -115,9 +157,19 @@ function CreateItemSplitterDialog( frame.autoSplitButton = autoSplitButton - function frame:GetValue() - return frame.editBox:GetNumber() - end + function frame:GetValue() + return frame.editBox:GetNumber() + end + + function frame:SetInfoText(text) + if text and text ~= "" then + frame.infoFrame.text:SetText(text) + end + end + + frame:HookScript("OnHide", function() + frame.infoFrame:Hide() + end) return frame end From ea8bbdae9745238fd8166cd87c6790e08605ba56 Mon Sep 17 00:00:00 2001 From: outlying Date: Wed, 14 Jan 2026 09:15:21 +0100 Subject: [PATCH 2/3] Wisual OK --- UI.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI.lua b/UI.lua index 7283ef3..4d4c25c 100644 --- a/UI.lua +++ b/UI.lua @@ -49,7 +49,7 @@ function CreateItemSplitterDialog( -- Info button on the title bar local infoButton = CreateFrame("Button", nil, frame) infoButton:SetSize(32, 32) - infoButton:SetPoint("RIGHT", frame.TitleBg, "RIGHT", -24, 0) + infoButton:SetPoint("LEFT", frame.TitleBg, "LEFT", 0, -2) infoButton:SetNormalTexture("Interface\\Common\\help-i") infoButton:SetHighlightTexture("Interface\\Common\\help-i", "ADD") infoButton:SetPushedTexture("Interface\\Common\\help-i") From c7a7d0ae0c66d339a7946eb44890345b2756187f Mon Sep 17 00:00:00 2001 From: outlying Date: Wed, 14 Jan 2026 09:29:13 +0100 Subject: [PATCH 3/3] Add text + version --- UI.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI.lua b/UI.lua index 4d4c25c..e7ef723 100644 --- a/UI.lua +++ b/UI.lua @@ -40,7 +40,7 @@ function CreateItemSplitterDialog( infoFrame.text:SetPoint("BOTTOMRIGHT", infoFrame, "BOTTOMRIGHT", -12, 12) infoFrame.text:SetJustifyH("LEFT") infoFrame.text:SetJustifyV("TOP") - infoFrame.text:SetText("Information about the splitter dialog will go here.") + infoFrame.text:SetText("Item Splitter is maintained by Mermido-Silvermoon and built after hours.\nDonations in the form of in-game gold are always appreciated.\n\nFor technical issues or bug reports, please use:\ngithub.com/outlying/ItemSplitter\n\nVersion: @project-version@") infoFrame.CloseButton:SetScript("OnClick", function() infoFrame:Hide()