from retail

This commit is contained in:
NoM0Re
2025-01-25 17:46:46 +01:00
parent 1152abe6a5
commit 87c1e2fbaf
7 changed files with 54 additions and 77 deletions
+22 -60
View File
@@ -241,48 +241,31 @@ function OptionsPrivate.CreateFrame()
self.dynamicTextCodesFrame:Hide()
self:HideTip()
end
local widgets = {
{ window = "texture", title = L["Texture Picker"], fn = "TexturePicker" },
{ window = "icon", title = L["Icon Picker"], fn = "IconPicker" },
{ window = "model", title = L["Model Picker"], fn = "ModelPicker" },
{ window = "importexport", title = L["Import / Export"], fn = "ImportExport" },
{ window = "texteditor", title = L["Code Editor"], fn = "TextEditor" },
{ window = "codereview", title = L["Custom Code Viewer"], fn = "CodeReview" },
{ window = "debuglog", title = L["Debug Log"], fn = "DebugLog" },
{ window = "update", title = L["Update"], fn = "UpdateFrame" },
}
if self.window == "texture" then
OptionsPrivate.SetTitle(L["Texture Picker"])
self.texturePicker.frame:Show()
else
self.texturePicker.frame:Hide()
for _, widget in ipairs(widgets) do
local obj = OptionsPrivate[widget.fn](self, true)
if self.window == widget.window then
OptionsPrivate.SetTitle(widget.title)
if obj then
obj.frame:Show()
end
else
if obj then
obj.frame:Hide()
end
end
end
if self.window == "icon" then
OptionsPrivate.SetTitle(L["Icon Picker"])
self.iconPicker.frame:Show()
else
self.iconPicker.frame:Hide()
end
if self.window == "model" then
OptionsPrivate.SetTitle(L["Model Picker"])
self.modelPicker.frame:Show()
else
self.modelPicker.frame:Hide()
end
if self.window == "importexport" then
OptionsPrivate.SetTitle(L["Import / Export"])
self.importexport.frame:Show()
else
self.importexport.frame:Hide()
end
if self.window == "texteditor" then
OptionsPrivate.SetTitle(L["Code Editor"])
self.texteditor.frame:Show()
else
self.texteditor.frame:Hide()
end
if self.window == "codereview" then
OptionsPrivate.SetTitle(L["Custom Code Viewer"])
self.codereview.frame:Show()
else
self.codereview.frame:Hide()
end
if self.window == "newView" then
OptionsPrivate.SetTitle(L["New Template"])
self.newView.frame:Show()
@@ -291,18 +274,6 @@ function OptionsPrivate.CreateFrame()
self.newView.frame:Hide()
end
end
if self.window == "update" then
OptionsPrivate.SetTitle(L["Update"])
self.update.frame:Show()
else
self.update.frame:Hide()
end
if self.window == "debuglog" then
OptionsPrivate.SetTitle(L["Debug Log"])
self.debugLog.frame:Show()
else
self.debugLog.frame:Hide()
end
if self.window == "default" then
if self.loadProgessVisible then
self.loadProgress:Show()
@@ -490,15 +461,6 @@ function OptionsPrivate.CreateFrame()
container.content:SetPoint("BOTTOMRIGHT", 0, 0)
frame.container = container
frame.texturePicker = OptionsPrivate.TexturePicker(frame)
frame.iconPicker = OptionsPrivate.IconPicker(frame)
frame.modelPicker = OptionsPrivate.ModelPicker(frame)
frame.importexport = OptionsPrivate.ImportExport(frame)
frame.texteditor = OptionsPrivate.TextEditor(frame)
frame.codereview = OptionsPrivate.CodeReview(frame)
frame.update = OptionsPrivate.UpdateFrame(frame)
frame.debugLog = OptionsPrivate.DebugLog(frame)
frame.moversizer, frame.mover = OptionsPrivate.MoverSizer(frame)
-- filter line