Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ 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
* 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
* 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 des emplacements de sacs à la fenêtre inventaire


Ajouter la fonction unequipe à Multibit:
Expand Down
5 changes: 4 additions & 1 deletion UI/MultiBotAceUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 4 additions & 1 deletion UI/MultiBotGameObjectCopyFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion UI/MultiBotGameObjectResultsFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 16 additions & 4 deletions UI/MultiBotHunterQuickFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion UI/MultiBotInventoryFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
14 changes: 13 additions & 1 deletion UI/MultiBotInventoryItem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion UI/MultiBotItemusFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 4 additions & 1 deletion UI/MultiBotPromptDialog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 29 additions & 6 deletions UI/MultiBotQuestAllFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,30 @@ 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")

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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion UI/MultiBotQuestCompletedFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion UI/MultiBotQuestIncompleteFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 15 additions & 5 deletions UI/MultiBotQuestLogFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion UI/MultiBotRewardFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 8 additions & 2 deletions UI/MultiBotShamanQuickFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down
Loading
Loading