From d41968acd6411cd9193af3966c06b331a9047f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Thu, 15 Jan 2026 01:09:56 +0100 Subject: [PATCH] add click targets and scan guards --- TradeSkillMaster/Auction/AuctionFrame.lua | 3 ++- TradeSkillMaster/TradeSkillMaster.toc | 2 +- .../TradeSkillMaster_AuctionDB.toc | 4 ++-- TradeSkillMaster_Auctioning/modules/GUI.lua | 19 +++++++++++++++++-- TradeSkillMaster_Mailing/Modules/Inbox.lua | 10 +++++----- 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/TradeSkillMaster/Auction/AuctionFrame.lua b/TradeSkillMaster/Auction/AuctionFrame.lua index fe349a5..726776b 100644 --- a/TradeSkillMaster/Auction/AuctionFrame.lua +++ b/TradeSkillMaster/Auction/AuctionFrame.lua @@ -43,6 +43,7 @@ function private:CreateTSMAHTab(moduleName, callbackShow, callbackHide) tab:SetText(TSMAPI.Design:GetInlineColor("link2")..moduleName.."|r") tab:SetNormalFontObject(GameFontHighlightSmall) tab.isTSMTab = moduleName + _G["TSM"..moduleName.."TabButton"] = tab tab:SetPoint("LEFT", _G["AuctionFrameTab"..n-1], "RIGHT", -8, 0) tab:Show() PanelTemplates_SetNumTabs(AuctionFrame, n) @@ -295,4 +296,4 @@ do else private:RegisterEvent("ADDON_LOADED") end -end \ No newline at end of file +end diff --git a/TradeSkillMaster/TradeSkillMaster.toc b/TradeSkillMaster/TradeSkillMaster.toc index e17b611..93132f7 100644 --- a/TradeSkillMaster/TradeSkillMaster.toc +++ b/TradeSkillMaster/TradeSkillMaster.toc @@ -2,7 +2,7 @@ ## Title: |cff00fe00TradeSkillMaster: Revived|r ## Notes: Core addon for the TradeSkillMaster suite, revived for Wrath of the Lich King. Does nothing without modules installed. ## Author: Sapu94, Bart39, Gnomezilla [Warmane-Icecrown(A)], BlueAo [Warmane], andrew6180, Yoshiyuka, DimaSheiko, and other contributors... -## Version: 2.3.34 +## Version: 2.3.39 ## SavedVariables: TradeSkillMasterAppDB, AscensionTSMDB ## OptionalDeps: AccurateTime, Ace3, LibDataBroker-1.1, LibDBIcon-1.0, LibExtraTip, TipHelper, LibParse, LibCompress, LibGraph-2.0, SharedMedia, TheUndermineJournal, TheUndermineJournalGE ## X-Embeds: AccurateTime, Ace3, LibDataBroker-1.1, LibDBIcon-1.0, LibExtraTip, TipHelper, LibParse, LibCompress, LibGraph-2.0 diff --git a/TradeSkillMaster_AuctionDB/TradeSkillMaster_AuctionDB.toc b/TradeSkillMaster_AuctionDB/TradeSkillMaster_AuctionDB.toc index 1348b19..ef5f55f 100644 --- a/TradeSkillMaster_AuctionDB/TradeSkillMaster_AuctionDB.toc +++ b/TradeSkillMaster_AuctionDB/TradeSkillMaster_AuctionDB.toc @@ -2,10 +2,10 @@ ## Title: |cff00ff00TradeSkillMaster_AuctionDB|r ## Notes: Stores auction house data and calculates market prices. ## Author: Sapu94, Bart39 -## Version: 2.3.34 +## Version: 2.3.39 ## SavedVariables: AscensionTSM_AuctionDB ## Dependency: TradeSkillMaster -## X-Curse-Packaged-Version: 2.3.34 +## X-Curse-Packaged-Version: 2.3.39 ## X-Curse-Project-Name: TradeSkillMaster_AuctionDB ## X-Curse-Project-ID: tradeskillmaster_auctiondb ## X-Curse-Repository-ID: wow/tradeskillmaster_auctiondb/mainline diff --git a/TradeSkillMaster_Auctioning/modules/GUI.lua b/TradeSkillMaster_Auctioning/modules/GUI.lua index f2b4841..8f36bf0 100644 --- a/TradeSkillMaster_Auctioning/modules/GUI.lua +++ b/TradeSkillMaster_Auctioning/modules/GUI.lua @@ -12,6 +12,17 @@ local GUI = TSM:NewModule("GUI", "AceEvent-3.0", "AceHook-3.0") local AceGUI = LibStub("AceGUI-3.0") local private = {} +function private:SetSelectionButtonsEnabled(enabled) + if not private.selectionFrame then return end + local action = enabled and "Enable" or "Disable" + if private.selectionFrame.postBtn then + private.selectionFrame.postBtn[action](private.selectionFrame.postBtn) + end + if private.selectionFrame.cancelBtn then + private.selectionFrame.cancelBtn[action](private.selectionFrame.cancelBtn) + end +end + function private:CreateButtons(parent) local height = 24 local frame = CreateFrame("Frame", nil, parent) @@ -62,6 +73,7 @@ function private:CreateButtons(parent) if self.which == "stop" and self.isDone then GUI:HideSelectionFrame() private.selectionFrame:Show() + private:SetSelectionButtonsEnabled(true) elseif frame:IsVisible() and private.OnAction then private:OnAction(self.which) end @@ -93,6 +105,7 @@ function private:CreateButtons(parent) button:SetText(L["Skip"]) button.which = "skip" button:SetScript("OnClick", OnClick) + _G["TSMAuctioningCancelSkipButton"] = button frame.skip = button local button = TSMAPI.GUI:CreateButton(frame, 18) @@ -752,7 +765,7 @@ function GUI:CreateSelectionFrame(parent) frame.helpText = helpText local btnWidth = floor((stContainer:GetWidth() - 10)/3) - local postBtn = TSMAPI.GUI:CreateButton(frame, 16) + local postBtn = TSMAPI.GUI:CreateButton(frame, 16, "TSMAuctioningPostScanButton") postBtn:SetPoint("BOTTOMLEFT", 5, 5) postBtn:SetHeight(20) postBtn:SetWidth(btnWidth) @@ -764,7 +777,7 @@ function GUI:CreateSelectionFrame(parent) end) frame.postBtn = postBtn - local cancelBtn = TSMAPI.GUI:CreateButton(frame, 16) + local cancelBtn = TSMAPI.GUI:CreateButton(frame, 16, "TSMAuctioningCancelScanButton") cancelBtn:SetPoint("BOTTOMLEFT", postBtn, "BOTTOMRIGHT", 5, 0) cancelBtn:SetHeight(20) cancelBtn:SetWidth(btnWidth) @@ -908,6 +921,7 @@ function GUI:CreateScanFrame(parent) end function GUI:StartScan(frame) + private:SetSelectionButtonsEnabled(false) private.selectionFrame:Hide() private.scanFrame = private.scanFrame or GUI:CreateScanFrame(frame) private.scanFrame:Show() @@ -967,6 +981,7 @@ function GUI:ShowSelectionFrame(frame) if private.scanFrame then private.scanFrame:Hide() end private.selectionFrame = private.selectionFrame or GUI:CreateSelectionFrame(frame) private.selectionFrame:Show() + private:SetSelectionButtonsEnabled(true) TSMAPI.AuctionScan:StopScan(false) end diff --git a/TradeSkillMaster_Mailing/Modules/Inbox.lua b/TradeSkillMaster_Mailing/Modules/Inbox.lua index 894d296..08e529b 100644 --- a/TradeSkillMaster_Mailing/Modules/Inbox.lua +++ b/TradeSkillMaster_Mailing/Modules/Inbox.lua @@ -74,7 +74,7 @@ function Inbox:CreateTab(parent) st:SetData({}) frame.st = st - local btn = TSMAPI.GUI:CreateButton(frame, 18, "TSMMailingSalesButton") + local btn = TSMAPI.GUI:CreateButton(frame, 18, "TSMMailingOpenAllButton") btn:SetPoint("BOTTOMLEFT", 5, 30) btn:SetPoint("BOTTOMRIGHT", -5, 30) btn:SetHeight(20) @@ -91,7 +91,7 @@ function Inbox:CreateTab(parent) local btnWidth = (frame:GetWidth() - label:GetWidth() - 25) / 5 - local btn = TSMAPI.GUI:CreateButton(frame, 18, "TSMMailingBuysButton") + local btn = TSMAPI.GUI:CreateButton(frame, 18, "TSMMailingSalesButton") btn:SetPoint("BOTTOMLEFT", label, "BOTTOMRIGHT", 5, 0) btn:SetWidth(btnWidth) btn:SetHeight(20) @@ -99,7 +99,7 @@ function Inbox:CreateTab(parent) btn:SetScript("OnClick", function() private:StartAutoLooting("sales") end) frame.salesBtn = btn - local btn = TSMAPI.GUI:CreateButton(frame, 18, "TSMMailingCancelsButton") + local btn = TSMAPI.GUI:CreateButton(frame, 18, "TSMMailingBuysButton") btn:SetPoint("BOTTOMLEFT", frame.salesBtn, "BOTTOMRIGHT", 5, 0) btn:SetWidth(btnWidth) btn:SetHeight(20) @@ -107,7 +107,7 @@ function Inbox:CreateTab(parent) btn:SetScript("OnClick", function() private:StartAutoLooting("buys") end) frame.buysBtn = btn - local btn = TSMAPI.GUI:CreateButton(frame, 18, "TSMMailingExpiresButton") + local btn = TSMAPI.GUI:CreateButton(frame, 18, "TSMMailingCancelsButton") btn:SetPoint("BOTTOMLEFT", frame.buysBtn, "BOTTOMRIGHT", 5, 0) btn:SetWidth(btnWidth) btn:SetHeight(20) @@ -115,7 +115,7 @@ function Inbox:CreateTab(parent) btn:SetScript("OnClick", function() private:StartAutoLooting("cancels") end) frame.cancelsBtn = btn - local btn = TSMAPI.GUI:CreateButton(frame, 18) + local btn = TSMAPI.GUI:CreateButton(frame, 18, "TSMMailingExpiresButton") btn:SetPoint("BOTTOMLEFT", frame.cancelsBtn, "BOTTOMRIGHT", 5, 0) btn:SetWidth(btnWidth) btn:SetHeight(20)