From 1547fcf1b1c76e2661fb7411360ff6762319586b Mon Sep 17 00:00:00 2001 From: Wishmaster117 <140754794+Wishmaster117@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:29:15 +0100 Subject: [PATCH 1/2] strata debug --- TODO.md | 4 +-- UI/MultiBotAceUI.lua | 5 ++- UI/MultiBotGameObjectCopyFrame.lua | 5 ++- UI/MultiBotGameObjectResultsFrame.lua | 5 ++- UI/MultiBotHunterQuickFrame.lua | 20 ++++++++--- UI/MultiBotInventoryFrame.lua | 5 ++- UI/MultiBotItemusFrame.lua | 5 ++- UI/MultiBotPromptDialog.lua | 5 ++- UI/MultiBotQuestAllFrame.lua | 35 +++++++++++++++---- UI/MultiBotQuestCompletedFrame.lua | 5 ++- UI/MultiBotQuestIncompleteFrame.lua | 5 ++- UI/MultiBotQuestLogFrame.lua | 20 ++++++++--- UI/MultiBotRewardFrame.lua | 5 ++- UI/MultiBotShamanQuickFrame.lua | 10 ++++-- UI/MultiBotSpecUI.lua | 37 ++++++++++++++++---- UI/MultiBotSpellBookFrame.lua | 49 +++++++++++++++++++++++++-- UI/MultiBotTalentFrame.lua | 5 ++- 17 files changed, 187 insertions(+), 38 deletions(-) diff --git a/TODO.md b/TODO.md index 47aa172..c94a6f9 100644 --- a/TODO.md +++ b/TODO.md @@ -4,7 +4,6 @@ TODO * Ressortir les UI quetes dans leurs propre fichiers et uniformiser le tempklate de la frame comme celle de Itemus * Uniformiser le templste de la frame reward comme celle de itemus * Essayer de faire disparaitre la barre multibots au bout d'un temps et la faire apparaitre quand on passe la souris dessus. -* Faire en sorte que le réglage strata prenne en compte toutes les frames de multibots * Quand on deplace ou fait quelque chose dans l'ui il faudrait que ça se sauvegarde tout de suite dans les variables dans deco reco * Raidus doit se rafraichir à l'ouverture et fermeture * dans la liste des quêtes des fois c'est l'ID de la queête qui apparait et pas le tritre @@ -14,9 +13,8 @@ TODO * Revoir le positionnement des fleches et pages de Iconos * Mettre une option pour choisir la tailles des icones de la main barre et des quickhunter/shaman * Voir si il y'a pas d'autres option que l'on peut ajouter à la frame options de multibot -* Faire en sorte que le strata soit appliqué a vraiment toutes les frames de multibot * creer le multilangue pour le tooltip: setTooltip(self, "Show / Hide / Move Quick Shaman") des fichiers quickshaman et quickhunter -* Livres des sorts: faire en sorte que l'icone de regrise quand on le ferme avec la croix de la frame +* faire de la main barre + droite et gauche une barre de boutons ou l'on peux disposer les bouton changer l'orde etc... Ajouter la fonction unequipe à Multibit: diff --git a/UI/MultiBotAceUI.lua b/UI/MultiBotAceUI.lua index ad87f72..a1a7195 100644 --- a/UI/MultiBotAceUI.lua +++ b/UI/MultiBotAceUI.lua @@ -142,7 +142,10 @@ function AceUI.CreatePopupHost(title, width, height, missingDepMessage, persiste window:SetHeight(height) window:EnableResize(false) window:SetLayout("Fill") - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end AceUI.SetWindowCloseToHide(window) AceUI.RegisterWindowEscapeClose(window, escapePrefix or "PopupHost") diff --git a/UI/MultiBotGameObjectCopyFrame.lua b/UI/MultiBotGameObjectCopyFrame.lua index 354a071..a597979 100644 --- a/UI/MultiBotGameObjectCopyFrame.lua +++ b/UI/MultiBotGameObjectCopyFrame.lua @@ -51,7 +51,10 @@ function MultiBot.InitializeGameObjectCopyFrame() window:SetHeight(300) window:EnableResize(false) window:SetLayout("Fill") - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end if MultiBot.SetAceWindowCloseToHide then MultiBot.SetAceWindowCloseToHide(window) end if MultiBot.RegisterAceWindowEscapeClose then MultiBot.RegisterAceWindowEscapeClose(window, "GameObjCopy") end diff --git a/UI/MultiBotGameObjectResultsFrame.lua b/UI/MultiBotGameObjectResultsFrame.lua index 3008a0d..ed7a94f 100644 --- a/UI/MultiBotGameObjectResultsFrame.lua +++ b/UI/MultiBotGameObjectResultsFrame.lua @@ -73,7 +73,10 @@ function MultiBot.InitializeGameObjectResultsFrame() window:SetHeight(380) window:EnableResize(false) window:SetLayout("List") - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end if MultiBot.SetAceWindowCloseToHide then MultiBot.SetAceWindowCloseToHide(window) end if MultiBot.RegisterAceWindowEscapeClose then MultiBot.RegisterAceWindowEscapeClose(window, "GameObjPopup") end diff --git a/UI/MultiBotHunterQuickFrame.lua b/UI/MultiBotHunterQuickFrame.lua index 95a989e..11e25e3 100644 --- a/UI/MultiBotHunterQuickFrame.lua +++ b/UI/MultiBotHunterQuickFrame.lua @@ -97,7 +97,10 @@ local function getPopupHost(title, width, height, missingDepMessage, persistence window:SetHeight(height) window:EnableResize(false) window:SetLayout("Fill") - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end window:SetCallback("OnClose", function(widget) widget:Hide() end) @@ -339,7 +342,10 @@ local function createCollapseHandle(service) end local handle = CreateFrame("Button", nil, service.window.frame) - handle:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + handle:SetFrameStrata(strataLevel) + end handle:SetMovable(false) handle:RegisterForClicks("LeftButtonUp", "RightButtonUp") handle:RegisterForDrag("RightButton") @@ -832,7 +838,10 @@ function HunterQuick:EnsureSearchFrame() insets = { left = 4, right = 4, top = 4, bottom = 4 }, }) preview:SetBackdropColor(0, 0, 0, 0.85) - preview:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + preview:SetFrameStrata(strataLevel) + end preview:SetMovable(true) preview:EnableMouse(true) preview:RegisterForDrag("LeftButton") @@ -1248,7 +1257,10 @@ function HunterQuick:EnsureWindow() window:SetLayout("Manual") window:SetWidth((WINDOW_PADDING_X * 2) + ROW_WIDTH) window:SetHeight(WINDOW_HEIGHT) - window.frame:SetFrameStrata("HIGH") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end window.frame:SetClampedToScreen(true) window.frame:SetPoint(WINDOW_DEFAULT_POINT.point, UIParent, WINDOW_DEFAULT_POINT.relPoint, WINDOW_DEFAULT_POINT.x, WINDOW_DEFAULT_POINT.y) window:SetCallback("OnClose", function(widget) diff --git a/UI/MultiBotInventoryFrame.lua b/UI/MultiBotInventoryFrame.lua index bc4a3bb..3f575bf 100644 --- a/UI/MultiBotInventoryFrame.lua +++ b/UI/MultiBotInventoryFrame.lua @@ -840,7 +840,10 @@ function MultiBot.InitializeInventoryFrame() window:SetHeight(INVENTORY_WINDOW_DEFAULTS.height) window:EnableResize(false) window.frame:SetClampedToScreen(true) - window.frame:SetFrameStrata("HIGH") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end window.frame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", INVENTORY_WINDOW_DEFAULTS.pointX, INVENTORY_WINDOW_DEFAULTS.pointY) window:SetCallback("OnClose", function(widget) closeInventoryWindow() diff --git a/UI/MultiBotItemusFrame.lua b/UI/MultiBotItemusFrame.lua index 5013bb7..737a594 100644 --- a/UI/MultiBotItemusFrame.lua +++ b/UI/MultiBotItemusFrame.lua @@ -832,7 +832,10 @@ function MultiBot.InitializeItemusFrame() window:SetHeight(ITEMUS_UI_DEFAULTS.height) window:EnableResize(false) window.frame:SetClampedToScreen(true) - window.frame:SetFrameStrata("HIGH") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end window.frame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", ITEMUS_UI_DEFAULTS.pointX, ITEMUS_UI_DEFAULTS.pointY) window:SetCallback("OnClose", function(widget) widget:Hide() diff --git a/UI/MultiBotPromptDialog.lua b/UI/MultiBotPromptDialog.lua index 44cf153..448353d 100644 --- a/UI/MultiBotPromptDialog.lua +++ b/UI/MultiBotPromptDialog.lua @@ -23,7 +23,10 @@ function ShowPrompt(title, onOk, defaultText) window:SetHeight(PROMPT_WINDOW_HEIGHT) window:EnableResize(false) window:SetLayout("Flow") - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end if MultiBot.SetAceWindowCloseToHide then MultiBot.SetAceWindowCloseToHide(window) end if MultiBot.RegisterAceWindowEscapeClose then MultiBot.RegisterAceWindowEscapeClose(window, "UniversalPrompt") end if MultiBot.BindAceWindowPosition then MultiBot.BindAceWindowPosition(window, "universal_prompt") end diff --git a/UI/MultiBotQuestAllFrame.lua b/UI/MultiBotQuestAllFrame.lua index 3bda880..d2e10c1 100644 --- a/UI/MultiBotQuestAllFrame.lua +++ b/UI/MultiBotQuestAllFrame.lua @@ -72,11 +72,19 @@ local function createSectionHeader(self, text) self.scroll:AddChild(heading) end +local function createEmptySectionHint(self, text) + local hint = self.aceGUI:Create("Label") + hint:SetFullWidth(true) + hint:SetText(" " .. (text or MultiBot.L("tips.quests.gobnosearchdata") or "No quests")) + self.scroll:AddChild(hint) +end + function MultiBot.BuildBotAllList(botName) local frame = MultiBot.InitializeQuestAllFrame() clearList(frame) - for _, link in ipairs(MultiBot.BotQuestsAll[botName] or {}) do + local quests = MultiBot.BotQuestsAll[botName] or {} + for _, link in ipairs(quests) do local questID = tonumber(link:match("|Hquest:(%d+):")) local localizedName = questID and Shared.GetLocalizedQuestName(questID, link) or link local displayLink = link:gsub("%[[^%]]+%]", "|cff00ff00[" .. localizedName .. "]|r") @@ -84,6 +92,10 @@ function MultiBot.BuildBotAllList(botName) createQuestRow(frame, questID, displayLink) end + if #quests == 0 then + createEmptySectionHint(frame) + end + if frame.summary then frame.summary:SetText(botName and ((MultiBot.L("tips.quests.alllist") or "All Quests") .. ": |cff80ff80" .. botName .. "|r") or (MultiBot.L("tips.quests.alllist") or "")) end @@ -97,13 +109,21 @@ function MultiBot.BuildAggregatedAllList() local incompleteEntries = Shared.BuildAggregatedQuestEntries(MultiBot.BotQuestsIncompleted) createSectionHeader(frame, MultiBot.L("tips.quests.compheader")) - for _, entry in ipairs(completeEntries) do - createQuestRowWithBots(frame, entry) + if #completeEntries == 0 then + createEmptySectionHint(frame) + else + for _, entry in ipairs(completeEntries) do + createQuestRowWithBots(frame, entry) + end end createSectionHeader(frame, MultiBot.L("tips.quests.incompheader")) - for _, entry in ipairs(incompleteEntries) do - createQuestRowWithBots(frame, entry) + if #incompleteEntries == 0 then + createEmptySectionHint(frame) + else + for _, entry in ipairs(incompleteEntries) do + createQuestRowWithBots(frame, entry) + end end if frame.summary then @@ -146,7 +166,10 @@ function MultiBot.InitializeQuestAllFrame() window:SetHeight(460) window:EnableResize(false) window:SetLayout("Fill") - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end if MultiBot.SetAceWindowCloseToHide then MultiBot.SetAceWindowCloseToHide(window) end if MultiBot.RegisterAceWindowEscapeClose then MultiBot.RegisterAceWindowEscapeClose(window, "BotQuestAll") end diff --git a/UI/MultiBotQuestCompletedFrame.lua b/UI/MultiBotQuestCompletedFrame.lua index 615c62f..2081f9f 100644 --- a/UI/MultiBotQuestCompletedFrame.lua +++ b/UI/MultiBotQuestCompletedFrame.lua @@ -104,7 +104,10 @@ function MultiBot.InitializeQuestCompletedFrame() window:SetHeight(420) window:EnableResize(false) window:SetLayout("Fill") - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end if MultiBot.SetAceWindowCloseToHide then MultiBot.SetAceWindowCloseToHide(window) end if MultiBot.RegisterAceWindowEscapeClose then MultiBot.RegisterAceWindowEscapeClose(window, "BotQuestCompleted") end diff --git a/UI/MultiBotQuestIncompleteFrame.lua b/UI/MultiBotQuestIncompleteFrame.lua index dd243c9..a06ef94 100644 --- a/UI/MultiBotQuestIncompleteFrame.lua +++ b/UI/MultiBotQuestIncompleteFrame.lua @@ -104,7 +104,10 @@ function MultiBot.InitializeQuestIncompleteFrame() window:SetHeight(420) window:EnableResize(false) window:SetLayout("Fill") - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end if MultiBot.SetAceWindowCloseToHide then MultiBot.SetAceWindowCloseToHide(window) end if MultiBot.RegisterAceWindowEscapeClose then MultiBot.RegisterAceWindowEscapeClose(window, "BotQuestIncomplete") end diff --git a/UI/MultiBotQuestLogFrame.lua b/UI/MultiBotQuestLogFrame.lua index 84bf739..2856c34 100644 --- a/UI/MultiBotQuestLogFrame.lua +++ b/UI/MultiBotQuestLogFrame.lua @@ -147,19 +147,26 @@ function QuestLogFrame:Refresh() end function QuestLogFrame:Toggle() - if not self.window then + local window = self.window + if not window then return end - if self.window:IsShown() then - self.window:Show() + if window:IsShown() then + window:Hide() return end - self.window:Show() + window:Show() self:Refresh() end +function QuestLogFrame:Hide() + if self.window then + self.window:Hide() + end +end + function MultiBot.InitializeQuestLogFrame() if QuestLogFrame.window then return QuestLogFrame @@ -176,7 +183,10 @@ function MultiBot.InitializeQuestLogFrame() window:SetHeight(470) window:EnableResize(false) window:SetLayout("Fill") - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end if MultiBot.SetAceWindowCloseToHide then MultiBot.SetAceWindowCloseToHide(window) end if MultiBot.RegisterAceWindowEscapeClose then MultiBot.RegisterAceWindowEscapeClose(window, "QuestLog") end diff --git a/UI/MultiBotRewardFrame.lua b/UI/MultiBotRewardFrame.lua index 2f1570e..598afa2 100644 --- a/UI/MultiBotRewardFrame.lua +++ b/UI/MultiBotRewardFrame.lua @@ -198,7 +198,10 @@ function MultiBot.InitializeRewardFrame() window.frame:SetClampedToScreen(true) window.frame:SetMovable(true) window.frame:EnableMouse(true) - window.frame:SetFrameStrata("HIGH") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end window.frame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -754, 238) window:Hide() window:SetCallback("OnClose", function(widget) diff --git a/UI/MultiBotShamanQuickFrame.lua b/UI/MultiBotShamanQuickFrame.lua index 5b1d839..801308a 100644 --- a/UI/MultiBotShamanQuickFrame.lua +++ b/UI/MultiBotShamanQuickFrame.lua @@ -291,7 +291,10 @@ local function createCollapseHandle(service) end local handle = CreateFrame("Button", nil, service.window.frame) - handle:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + handle:SetFrameStrata(strataLevel) + end handle:SetMovable(false) handle:RegisterForClicks("LeftButtonUp", "RightButtonUp") handle:RegisterForDrag("RightButton") @@ -867,7 +870,10 @@ function ShamanQuick:EnsureWindow() window:SetLayout("Manual") window:SetWidth((WINDOW_PADDING_X * 2) + ROW_WIDTH) window:SetHeight(WINDOW_HEIGHT) - window.frame:SetFrameStrata("HIGH") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end window.frame:SetClampedToScreen(true) window.frame:SetPoint(WINDOW_DEFAULT_POINT.point, UIParent, WINDOW_DEFAULT_POINT.relPoint, WINDOW_DEFAULT_POINT.x, WINDOW_DEFAULT_POINT.y) window:SetCallback("OnClose", function(widget) diff --git a/UI/MultiBotSpecUI.lua b/UI/MultiBotSpecUI.lua index cd41009..e707a2b 100644 --- a/UI/MultiBotSpecUI.lua +++ b/UI/MultiBotSpecUI.lua @@ -278,7 +278,7 @@ function Spec:RequestList(bot, wrapper) specs = {}, builds = {}, } - + self.activeWrapper = wrapper -- 1) on demande d'abord la spé courante SendChatMessage("talents", "WHISPER", nil, bot) -- 2) on attend ~0.2s puis on enchaîne sur la liste @@ -527,11 +527,24 @@ end local function debugSpecPath(path) if MultiBot and MultiBot.Debug and type(MultiBot.Debug.Once) == "function" then - MultiBot.Debug.Once("spec.dropdown.path", "MultiBot Spec: using " .. tostring(path) .. " path", "33ccff") + --MultiBot.Debug.Once("spec.dropdown.path", "MultiBot Spec: using " .. tostring(path) .. " path", "33ccff") + end +end + +local function disableSetTalentsToggle(wrapper) + if type(wrapper) ~= "table" then + return + end + + if type(wrapper.setDisable) == "function" then + wrapper:setDisable() end end function Spec:HideDropdown() + disableSetTalentsToggle(self.activeWrapper) + self.activeWrapper = nil + if self.dropdownWidget and type(self.dropdownWidget.Release) == "function" then self.dropdownWidget:Release() self.dropdownWidget = nil @@ -559,11 +572,17 @@ local function ensureDropdownFrame(specObject, parentFrame, isEmbedded) frame = CreateFrame("Frame", nil, parentFrame or UIParent) if isEmbedded then - frame:SetFrameStrata("TOOLTIP") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + frame:SetFrameStrata(strataLevel) + end frame:SetFrameLevel((parentFrame and parentFrame:GetFrameLevel() or 1) + 5) frame:SetAllPoints(parentFrame) else - frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + frame:SetFrameStrata(strataLevel) + end if frame.SetBackdrop then frame:SetBackdrop({ bgFile = "Interface/Tooltips/UI-Tooltip-Background", @@ -720,7 +739,10 @@ function Spec:BuildDropdown() widget:SetWidth(92) widget:SetHeight((#pending.specs * 37) + 40) widget:EnableResize(false) - widget.frame:SetFrameStrata("TOOLTIP") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + widget.frame:SetFrameStrata(strataLevel) + end local function saveWindowPosition() local cx, cy = widget.frame:GetCenter() @@ -779,7 +801,10 @@ function Spec:BuildDropdown() button:SetSize(32, 32) button:SetPushedTexture("Interface\\Buttons\\UI-Quickslot-Depress") button:SetHighlightTexture("Interface\\Buttons\\ButtonHilight-Square") - button:SetFrameStrata("TOOLTIP") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + button:SetFrameStrata(strataLevel) + end table.insert(self.buttons, button) end diff --git a/UI/MultiBotSpellBookFrame.lua b/UI/MultiBotSpellBookFrame.lua index b3b0d54..6cb5c0e 100644 --- a/UI/MultiBotSpellBookFrame.lua +++ b/UI/MultiBotSpellBookFrame.lua @@ -56,7 +56,7 @@ local SPELLBOOK_UI_DEFAULTS = { -- Surélévation du FrameLevel pour les textes (rang/titre) afin de rester visibles au-dessus des icônes. TEXT_FRAMELEVEL_BOOST = 60, -- Strata du layer texte (laisser DIALOG pour rester au-dessus de la zone SpellBook). - TEXT_FRAMESTRATA = "DIALOG", + TEXT_FRAMESTRATA = nil, -- Sous-couche de rendu pour les textes (FontString draw layer sublevel, 0..7). TEXT_DRAW_SUBLEVEL = 5, } @@ -206,6 +206,47 @@ local function createSpellIgnoreCheck(parent, x, y) return check end +local function getUnitsRootFrame() + local frames = MultiBot.frames + local multiBar = frames and frames["MultiBar"] + return multiBar and multiBar.frames and multiBar.frames["Units"] +end + +local function setSpellbookButtonEnabled(botName, isEnabled) + if(type(botName) ~= "string" or botName == "") then + return + end + + local unitsRoot = getUnitsRootFrame() + local unitFrame = unitsRoot and unitsRoot.frames and unitsRoot.frames[botName] + if(not unitFrame or not unitFrame.getButton) then + return + end + + local button = unitFrame.getButton("Spellbook") + if(not button) then + return + end + + if(isEnabled and button.setEnable) then + button.setEnable() + return + end + + if(button.setDisable) then + button.setDisable() + end +end + +local function syncSpellbookButtonStateOnHide() + local spellbook = MultiBot.spellbook + if(not spellbook) then + return + end + + setSpellbookButtonEnabled(spellbook.name, false) +end + local function createSpellbookContent(window) local root = CreateFrame("Frame", nil, window.content) root:SetAllPoints(window.content) @@ -342,11 +383,15 @@ function MultiBot.InitializeSpellBookFrame() window:EnableResize(false) window:SetLayout("Fill") window.frame:SetClampedToScreen(true) - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end window:SetCallback("OnClose", function(widget) widget:Hide() end) window:Hide() + window.frame:HookScript("OnHide", syncSpellbookButtonStateOnHide) local root, overlay = createSpellbookContent(window) diff --git a/UI/MultiBotTalentFrame.lua b/UI/MultiBotTalentFrame.lua index d3bd73e..89a9ce5 100644 --- a/UI/MultiBotTalentFrame.lua +++ b/UI/MultiBotTalentFrame.lua @@ -823,7 +823,10 @@ function MultiBot.InitializeTalentFrameModule() window:SetHeight(hostDefaultHeight) window:EnableResize(false) window:SetLayout("Fill") - window.frame:SetFrameStrata("DIALOG") + local strataLevel = MultiBot.GetGlobalStrataLevel and MultiBot.GetGlobalStrataLevel() + if strataLevel then + window.frame:SetFrameStrata(strataLevel) + end registerTalentFrameEscapeClose(window, "TalentGlyphHost") bindTalentFramePosition(window, "talent_glyph_host") setTalentFrameCloseToHide(window) From 165011996f6ec689ef54556a9c866352e3481235 Mon Sep 17 00:00:00 2001 From: Wishmaster117 <140754794+Wishmaster117@users.noreply.github.com> Date: Mon, 30 Mar 2026 12:34:45 +0100 Subject: [PATCH 2/2] add inventory refresh --- TODO.md | 6 +++--- UI/MultiBotInventoryItem.lua | 14 +++++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index c94a6f9..99c9b71 100644 --- a/TODO.md +++ b/TODO.md @@ -7,14 +7,14 @@ TODO * Quand on deplace ou fait quelque chose dans l'ui il faudrait que ça se sauvegarde tout de suite dans les variables dans deco reco * Raidus doit se rafraichir à l'ouverture et fermeture * dans la liste des quêtes des fois c'est l'ID de la queête qui apparait et pas le tritre -* Afficher le pognon et les places de sacs dans la frame inventaire -* La fenêtre inventaire doit se rafraichir par exemple quand on fait le bot bouffer il faut que ce qu'il a bouffé se décompte -* Iconos ne mémorise pas sa position +* Afficher le pognon et les places de sacs dans la frame inventaire. +* Iconos ne mémorise pas sa position et n'a pas de strata * Revoir le positionnement des fleches et pages de Iconos * Mettre une option pour choisir la tailles des icones de la main barre et des quickhunter/shaman * Voir si il y'a pas d'autres option que l'on peut ajouter à la frame options de multibot * creer le multilangue pour le tooltip: setTooltip(self, "Show / Hide / Move Quick Shaman") des fichiers quickshaman et quickhunter * faire de la main barre + droite et gauche une barre de boutons ou l'on peux disposer les bouton changer l'orde etc... +* Ajouter des emplacements de sacs à la fenêtre inventaire Ajouter la fonction unequipe à Multibit: diff --git a/UI/MultiBotInventoryItem.lua b/UI/MultiBotInventoryItem.lua index eab7f7c..dd94cf3 100644 --- a/UI/MultiBotInventoryItem.lua +++ b/UI/MultiBotInventoryItem.lua @@ -164,6 +164,10 @@ local function sendInventoryItemCommand(command, button, botName, options) requestInventoryRefresh() end + if options.followupRefreshDelay ~= nil then + requestInventoryRefresh(options.followupRefreshDelay) + end + return true end @@ -199,11 +203,19 @@ local function handleInventoryItemClick(button) return end - if action == "e" or action == "u" or action == "give" then + if action == "e" or action == "give" then sendInventoryItemCommand(action, button, botName) return end + if action == "u" then + sendInventoryItemCommand(action, button, botName, { + refreshDelay = 0.12, + followupRefreshDelay = 0.45, + }) + return + end + if action ~= "destroy" then return end