from retail

This commit is contained in:
NoM0Re
2025-01-25 17:45:42 +01:00
parent 6eafc394ae
commit 1152abe6a5
10 changed files with 82 additions and 44 deletions
@@ -209,14 +209,12 @@ function OptionsPrivate.CreateFrame()
if self.minimized then
WeakAurasOptionsTitleText:Hide()
self.buttonsContainer.frame:Hide()
self.texturePicker.frame:Hide()
self.iconPicker.frame:Hide()
self.modelPicker.frame:Hide()
self.importexport.frame:Hide()
self.update.frame:Hide()
self.texteditor.frame:Hide()
self.codereview.frame:Hide()
self.debugLog.frame:Hide()
for _, fn in ipairs({"TexturePicker", "IconPicker", "ModelPicker", "ImportExport", "TextEditor", "CodeReview", "UpdateFrame", "DebugLog"}) do
local obj = OptionsPrivate[fn](self, true)
if obj then
obj.frame:Hide()
end
end
if self.newView then
self.newView.frame:Hide()
end
+24 -10
View File
@@ -1329,14 +1329,28 @@ end
local methods = {
Open = function(self, data, children, target, linkedAuras, sender, callbackFunc)
if(self.optionsWindow.window == "importexport") then
self.optionsWindow.importexport:Close();
elseif(self.optionsWindow.window == "texture") then
self.optionsWindow.texturePicker:CancelClose();
elseif(self.optionsWindow.window == "icon") then
self.optionsWindow.iconPicker:CancelClose();
elseif(self.optionsWindow.window == "model") then
self.optionsWindow.modelPicker:CancelClose();
local optionsWindow = self.optionsWindow
local optionsWindowTitle = self.optionsWindow.window
if(optionsWindowTitle == "importexport") then
local importexport = OptionsPrivate.ImportExport(optionsWindow, true)
if importexport then
importexport:Close();
end
elseif(optionsWindowTitle == "texture") then
local texturepicker = OptionsPrivate.TexturePicker(optionsWindow, true)
if texturepicker then
texturepicker:CancelClose();
end
elseif(optionsWindowTitle == "icon") then
local iconpicker = OptionsPrivate.IconPicker(optionsWindow, true)
if iconpicker then
iconpicker:CancelClose();
end
elseif(optionsWindowTitle == "model") then
local modelpicker = OptionsPrivate.ModelPicker(optionsWindow, true)
if modelpicker then
modelpicker:CancelClose();
end
end
self.optionsWindow.window = "update"
self.optionsWindow:UpdateFrameVisible()
@@ -2207,7 +2221,7 @@ local function ConstructUpdateFrame(frame)
return group
end
function OptionsPrivate.UpdateFrame(frame)
updateFrame = updateFrame or ConstructUpdateFrame(frame)
function OptionsPrivate.UpdateFrame(frame, noConstruct)
updateFrame = updateFrame or (not noConstruct and ConstructUpdateFrame(frame))
return updateFrame
end
+16 -12
View File
@@ -875,7 +875,10 @@ function WeakAuras.ShowOptions(msg)
end
if (frame.window == "codereview") then
frame.codereview:Close();
local codereview = OptionsPrivate.CodeReview(frame, true)
if codereview then
codereview:Close();
end
end
if firstLoad then
@@ -908,27 +911,27 @@ function OptionsPrivate.GetPickedDisplay()
end
function OptionsPrivate.OpenTextEditor(...)
frame.texteditor:Open(...);
OptionsPrivate.TextEditor(frame):Open(...);
end
function OptionsPrivate.ExportToString(id)
frame.importexport:Open("export", id);
OptionsPrivate.ImportExport(frame):Open("export", id);
end
function OptionsPrivate.ExportToTable(id)
frame.importexport:Open("table", id);
OptionsPrivate.ImportExport(frame):Open("table", id);
end
function OptionsPrivate.ImportFromString()
frame.importexport:Open("import");
OptionsPrivate.ImportExport(frame):Open("import");
end
function OptionsPrivate.OpenDebugLog(text)
frame.debugLog:Open(text)
OptionsPrivate.DebugLog(frame):Open(text)
end
function OptionsPrivate.OpenUpdate(data, children, target, linkedAuras, sender, callbackFunc)
return frame.update:Open(data, children, target, linkedAuras, sender, callbackFunc)
return OptionsPrivate.UpdateFrame(frame):Open(data, children, target, linkedAuras, sender, callbackFunc)
end
function OptionsPrivate.ConvertDisplay(data, newType)
@@ -1675,11 +1678,11 @@ function WeakAuras.UpdateThumbnail(data)
end
function OptionsPrivate.OpenTexturePicker(baseObject, paths, properties, textures, SetTextureFunc)
frame.texturePicker:Open(baseObject, paths, properties, textures, SetTextureFunc)
OptionsPrivate.TexturePicker(frame):Open(baseObject, paths, properties, textures, SetTextureFunc)
end
function OptionsPrivate.OpenIconPicker(baseObject, paths, groupIcon)
frame.iconPicker:Open(baseObject, paths, groupIcon)
OptionsPrivate.IconPicker(frame):Open(baseObject, paths, groupIcon)
end
function OptionsPrivate.OpenModelPicker(baseObject, path)
@@ -1690,13 +1693,14 @@ function OptionsPrivate.OpenModelPicker(baseObject, path)
WeakAuras.prettyPrint(string.format(L["ModelPaths could not be loaded, the addon is %s"], reason));
WeakAuras.ModelPaths = {};
end
frame.modelPicker.modelTree:SetTree(WeakAuras.ModelPaths);
OptionsPrivate.ModelPicker(frame).modelTree:SetTree(WeakAuras.ModelPaths)
end
frame.modelPicker:Open(baseObject, path);
OptionsPrivate.ModelPicker(frame):Open(baseObject, path);
end
function OptionsPrivate.OpenCodeReview(data)
frame.codereview:Open(data);
OptionsPrivate.CodeReview(frame):Open(data);
end
function OptionsPrivate.OpenTriggerTemplate(data, targetId)
+1
View File
@@ -14,6 +14,7 @@
## Dependencies: WeakAuras
## SavedVariables: WeakAurasOptionsSaved
embeds.xml
locales.xml
ForAllIndentsAndPurposes.lua
+8
View File
@@ -0,0 +1,8 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Include file="Libs\AceGUI-3.0\AceGUI-3.0.xml"/>
<Include file="Libs\AceConfig-3.0\AceConfig-3.0.xml"/>
<Include file="Libs\AceGUI-3.0-SharedMediaWidgets\widget.xml"/>
<Include file="Libs\LibUIDropDownMenu\LibUIDropDownMenu.xml"/>
<Include file="Libs\LibAPIAutoComplete-1.0\LibAPIAutoComplete-1.0.xml"/>
</Ui>