From e0c025ec221388d8d60c17fff4afaebd186b64c3 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 7 Jan 2018 18:23:16 +0100 Subject: [PATCH] gui: add unitframe update functions --- modules/gui.lua | 918 ++++++++++++++++-------------------------------- 1 file changed, 312 insertions(+), 606 deletions(-) diff --git a/modules/gui.lua b/modules/gui.lua index 976cfa36..7f35ce54 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1,5 +1,5 @@ pfUI:RegisterModule("gui", function () - local function CreateConfig(parent, caption, category, config, widget, values, skip, named, type) + local function CreateConfig(ufunc, parent, caption, category, config, widget, values, skip, named, type) -- parent object placement if parent.objectCount == nil then parent.objectCount = 1 @@ -147,9 +147,11 @@ pfUI:RegisterModule("gui", function () frame.input:SetScript("OnTextChanged", function(self) if ( type and type ~= "number" ) or tonumber(this:GetText()) then - if this:GetText() ~= this:GetParent().category[this:GetParent().config] then pfUI.gui.settingChanged = true end + if this:GetText() ~= this:GetParent().category[this:GetParent().config] then + this:GetParent().category[this:GetParent().config] = this:GetText() + if ufunc then ufunc() else pfUI.gui.settingChanged = true end + end this:SetTextColor(.2,1,.8,1) - this:GetParent().category[this:GetParent().config] = this:GetText() else this:SetTextColor(1,.3,.3,1) end @@ -186,7 +188,8 @@ pfUI:RegisterModule("gui", function () else this:GetParent().category[this:GetParent().config] = "0" end - pfUI.gui.settingChanged = true + + if ufunc then ufunc() else pfUI.gui.settingChanged = true end end) if category[config] == "1" then frame.input:SetChecked() end @@ -219,8 +222,8 @@ pfUI:RegisterModule("gui", function () info.func = function() UIDropDownMenu_SetSelectedID(frame.input, this:GetID(), 0) if category[config] ~= value then - pfUI.gui.settingChanged = true category[config] = value + if ufunc then ufunc() else pfUI.gui.settingChanged = true end end end @@ -345,6 +348,16 @@ pfUI:RegisterModule("gui", function () this:GetParent():Hide() end) + -- update functions + local update = setmetatable({}, { __index = function(tab,key) + local value = tostring(key) + if pfUI[value] and pfUI[value].UpdateConfig then + return function() pfUI[value]:UpdateConfig() end + elseif pfUI.uf[value] and pfUI.uf[value].UpdateConfig then + return function() pfUI.uf[value]:UpdateConfig() end + end + end}) + -- initialize dropdown menus pfUI.gui.dropdowns = { } @@ -527,23 +540,23 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.settings.tabs.general = pfUI.gui.tabs.settings.tabs:CreateTabChild(T["General"], true) pfUI.gui.tabs.settings.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Language"], C.global, "language", "dropdown", pfUI.gui.dropdowns.languages) - CreateConfig(this, T["Enable Region Compatible Font"], C.global, "force_region", "checkbox") - CreateConfig(this, T["Standard Text Font"], C.global, "font_default", "dropdown", pfUI.gui.dropdowns.fonts) - CreateConfig(this, T["Standard Text Font Size"], C.global, "font_size") - CreateConfig(this, T["Unit Frame Text Font"], C.global, "font_unit", "dropdown", pfUI.gui.dropdowns.fonts) - CreateConfig(this, T["Unit Frame Text Size"], C.global, "font_unit_size") - CreateConfig(this, T["Scrolling Combat Text Font"], C.global, "font_combat", "dropdown", pfUI.gui.dropdowns.fonts) - CreateConfig(this, T["Enable Native UI-Scale"], C.global, "pixelperfect", "checkbox") - CreateConfig(this, T["Enable Maximum Graphic Details"], C.global, "hdgraphic", "checkbox") - CreateConfig(this, T["Enable Offscreen Frame Positions"], C.global, "offscreen", "checkbox") - CreateConfig(this, T["Enable Single Line UIErrors"], C.global, "errors_limit", "checkbox") - CreateConfig(this, T["Disable All UIErrors"], C.global, "errors_hide", "checkbox") + CreateConfig(nil, this, T["Language"], C.global, "language", "dropdown", pfUI.gui.dropdowns.languages) + CreateConfig(nil, this, T["Enable Region Compatible Font"], C.global, "force_region", "checkbox") + CreateConfig(nil, this, T["Standard Text Font"], C.global, "font_default", "dropdown", pfUI.gui.dropdowns.fonts) + CreateConfig(nil, this, T["Standard Text Font Size"], C.global, "font_size") + CreateConfig(nil, this, T["Unit Frame Text Font"], C.global, "font_unit", "dropdown", pfUI.gui.dropdowns.fonts) + CreateConfig(nil, this, T["Unit Frame Text Size"], C.global, "font_unit_size") + CreateConfig(nil, this, T["Scrolling Combat Text Font"], C.global, "font_combat", "dropdown", pfUI.gui.dropdowns.fonts) + CreateConfig(nil, this, T["Enable Native UI-Scale"], C.global, "pixelperfect", "checkbox") + CreateConfig(nil, this, T["Enable Maximum Graphic Details"], C.global, "hdgraphic", "checkbox") + CreateConfig(nil, this, T["Enable Offscreen Frame Positions"], C.global, "offscreen", "checkbox") + CreateConfig(nil, this, T["Enable Single Line UIErrors"], C.global, "errors_limit", "checkbox") + CreateConfig(nil, this, T["Disable All UIErrors"], C.global, "errors_hide", "checkbox") -- Delete / Reset - CreateConfig(this, T["Delete / Reset"], nil, nil, "header") + CreateConfig(nil, this, T["Delete / Reset"], nil, nil, "header") - CreateConfig(this, T["|cffff5555EVERYTHING"], C.global, "profile", "button", function() + CreateConfig(nil, this, T["|cffff5555EVERYTHING"], C.global, "profile", "button", function() CreateQuestionDialog(T["Do you really want to reset |cffffaaaaEVERYTHING|r?\n\nThis will reset:\n - Current Configuration\n - Current Frame Positions\n - Firstrun Wizard\n - Addon Cache\n - Saved Profiles"], function() _G["pfUI_init"] = {} @@ -556,7 +569,7 @@ pfUI:RegisterModule("gui", function () end) end) - CreateConfig(this, T["Cache"], C.global, "profile", "button", function() + CreateConfig(nil, this, T["Cache"], C.global, "profile", "button", function() CreateQuestionDialog(T["Do you really want to reset the Cache?"], function() _G["pfUI_playerDB"] = {} @@ -565,7 +578,7 @@ pfUI:RegisterModule("gui", function () end) end, true) - CreateConfig(this, T["Firstrun"], C.global, "profile", "button", function() + CreateConfig(nil, this, T["Firstrun"], C.global, "profile", "button", function() CreateQuestionDialog(T["Do you really want to reset the Firstrun Wizard Settings?"], function() _G["pfUI_init"] = {} @@ -574,7 +587,7 @@ pfUI:RegisterModule("gui", function () end) end, true) - CreateConfig(this, T["Configuration"], C.global, "profile", "button", function() + CreateConfig(nil, this, T["Configuration"], C.global, "profile", "button", function() CreateQuestionDialog(T["Do you really want to reset your configuration?\nThis also includes frame positions"], function() _G["pfUI_config"] = {} @@ -586,7 +599,7 @@ pfUI:RegisterModule("gui", function () -- Profiles - CreateConfig(this, T["Profile"], nil, nil, "header") + CreateConfig(nil, this, T["Profile"], nil, nil, "header") local values = {} for name, config in pairs(pfUI_profiles) do table.insert(values, name) end @@ -597,10 +610,10 @@ pfUI:RegisterModule("gui", function () pfUIDropDownMenuProfile.Refresh() end - CreateConfig(this, T["Select profile"], C.global, "profile", "dropdown", values, false, "Profile") + CreateConfig(nil, this, T["Select profile"], C.global, "profile", "dropdown", values, false, "Profile") -- load profile - CreateConfig(this, T["Load profile"], C.global, "profile", "button", function() + CreateConfig(nil, this, T["Load profile"], C.global, "profile", "button", function() if C.global.profile and pfUI_profiles[C.global.profile] then CreateQuestionDialog(T["Load profile"] .. " '|cff33ffcc" .. C.global.profile .. "|r'?", function() local selp = C.global.profile @@ -612,7 +625,7 @@ pfUI:RegisterModule("gui", function () end) -- delete profile - CreateConfig(this, T["Delete profile"], C.global, "profile", "button", function() + CreateConfig(nil, this, T["Delete profile"], C.global, "profile", "button", function() if C.global.profile and pfUI_profiles[C.global.profile] then CreateQuestionDialog(T["Delete profile"] .. " '|cff33ffcc" .. C.global.profile .. "|r'?", function() pfUI_profiles[C.global.profile] = nil @@ -623,7 +636,7 @@ pfUI:RegisterModule("gui", function () end, true) -- save profile - CreateConfig(this, T["Save profile"], C.global, "profile", "button", function() + CreateConfig(nil, this, T["Save profile"], C.global, "profile", "button", function() if C.global.profile and pfUI_profiles[C.global.profile] then CreateQuestionDialog(T["Save current settings to profile"] .. " '|cff33ffcc" .. C.global.profile .. "|r'?", function() if pfUI_profiles[C.global.profile] then @@ -635,7 +648,7 @@ pfUI:RegisterModule("gui", function () end, true) -- create profile - CreateConfig(this, T["Create Profile"], C.global, "profile", "button", function() + CreateConfig(nil, this, T["Create Profile"], C.global, "profile", "button", function() CreateQuestionDialog(T["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."], function() local profile = this:GetParent().input:GetText() @@ -661,15 +674,15 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.settings.tabs.appearance = pfUI.gui.tabs.settings.tabs:CreateTabChild(T["Appearance"], true) pfUI.gui.tabs.settings.tabs.appearance:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Background Color"], C.appearance.border, "background", "color") - CreateConfig(this, T["Border Color"], C.appearance.border, "color", "color") - CreateConfig(this) -- spacer - CreateConfig(this, T["Global Border Size"], C.appearance.border, "default") - CreateConfig(this, T["Action Bar Border Size"], C.appearance.border, "actionbars") - CreateConfig(this, T["Unit Frame Border Size"], C.appearance.border, "unitframes") - CreateConfig(this, T["Panel Border Size"], C.appearance.border, "panels") - CreateConfig(this, T["Chat Border Size"], C.appearance.border, "chat") - CreateConfig(this, T["Bags Border Size"], C.appearance.border, "bags") + CreateConfig(nil, this, T["Background Color"], C.appearance.border, "background", "color") + CreateConfig(nil, this, T["Border Color"], C.appearance.border, "color", "color") + CreateConfig(nil, this) -- spacer + CreateConfig(nil, this, T["Global Border Size"], C.appearance.border, "default") + CreateConfig(nil, this, T["Action Bar Border Size"], C.appearance.border, "actionbars") + CreateConfig(nil, this, T["Unit Frame Border Size"], C.appearance.border, "unitframes") + CreateConfig(nil, this, T["Panel Border Size"], C.appearance.border, "panels") + CreateConfig(nil, this, T["Chat Border Size"], C.appearance.border, "chat") + CreateConfig(nil, this, T["Bags Border Size"], C.appearance.border, "bags") this.setup = true end end) @@ -678,14 +691,14 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.settings.tabs.cooldown = pfUI.gui.tabs.settings.tabs:CreateTabChild(T["Cooldown"], true) pfUI.gui.tabs.settings.tabs.cooldown:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Cooldown Color (Less than 3 Sec)"], C.appearance.cd, "lowcolor", "color") - CreateConfig(this, T["Cooldown Color (Seconds)"], C.appearance.cd, "normalcolor", "color") - CreateConfig(this, T["Cooldown Color (Minutes)"], C.appearance.cd, "minutecolor", "color") - CreateConfig(this, T["Cooldown Color (Hours)"], C.appearance.cd, "hourcolor", "color") - CreateConfig(this, T["Cooldown Color (Days)"], C.appearance.cd, "daycolor", "color") - CreateConfig(this, T["Cooldown Text Threshold"], C.appearance.cd, "threshold") - CreateConfig(this, T["Cooldown Text Font Size"], C.appearance.cd, "font_size") - CreateConfig(this, T["Display Debuff Durations"], C.appearance.cd, "debuffs", "checkbox") + CreateConfig(nil, this, T["Cooldown Color (Less than 3 Sec)"], C.appearance.cd, "lowcolor", "color") + CreateConfig(nil, this, T["Cooldown Color (Seconds)"], C.appearance.cd, "normalcolor", "color") + CreateConfig(nil, this, T["Cooldown Color (Minutes)"], C.appearance.cd, "minutecolor", "color") + CreateConfig(nil, this, T["Cooldown Color (Hours)"], C.appearance.cd, "hourcolor", "color") + CreateConfig(nil, this, T["Cooldown Color (Days)"], C.appearance.cd, "daycolor", "color") + CreateConfig(nil, this, T["Cooldown Text Threshold"], C.appearance.cd, "threshold") + CreateConfig(nil, this, T["Cooldown Text Font Size"], C.appearance.cd, "font_size") + CreateConfig(nil, this, T["Display Debuff Durations"], C.appearance.cd, "debuffs", "checkbox") this.setup = true end end) @@ -694,8 +707,8 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.settings.tabs.gm = pfUI.gui.tabs.settings.tabs:CreateTabChild(T["GM-Mode"], true) pfUI.gui.tabs.settings.tabs.gm:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Disable GM-Mode"], C.gm, "disable", "checkbox") - CreateConfig(this, T["Selected Core"], C.gm, "server", "dropdown", pfUI.gui.dropdowns.gmserver_text) + CreateConfig(nil, this, T["Disable GM-Mode"], C.gm, "disable", "checkbox") + CreateConfig(nil, this, T["Selected Core"], C.gm, "server", "dropdown", pfUI.gui.dropdowns.gmserver_text) this.setup = true end @@ -710,247 +723,29 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.uf.tabs.general = pfUI.gui.tabs.uf.tabs:CreateTabChild(T["General"], true) pfUI.gui.tabs.uf.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Disable pfUI Unit Frames"], C.unitframes, "disable", "checkbox") - CreateConfig(this, T["Enable Pastel Colors"], C.unitframes, "pastel", "checkbox") - CreateConfig(this, T["Enable Custom Color Health Bars"], C.unitframes, "custom", "checkbox") - CreateConfig(this, T["Custom Health Bar Color"], C.unitframes, "customcolor", "color") - CreateConfig(this, T["Enable Custom Color Health Bar Background"], C.unitframes, "custombg", "checkbox") - CreateConfig(this, T["Custom Health Bar Background Color"], C.unitframes, "custombgcolor", "color") - CreateConfig(this, T["Healthbar Animation Speed"], C.unitframes, "animation_speed", "dropdown", pfUI.gui.dropdowns.uf_animationspeed) - CreateConfig(this, T["Portrait Alpha"], C.unitframes, "portraitalpha") - CreateConfig(this, T["Always Use 2D Portraits"], C.unitframes, "always2dportrait", "checkbox") - CreateConfig(this, T["Enable 2D Portraits As Fallback"], C.unitframes, "portraittexture", "checkbox") - CreateConfig(this, T["Unit Frame Layout"], C.unitframes, "layout", "dropdown", pfUI.gui.dropdowns.uf_layout) - CreateConfig(this, T["Enable 40y-Range Check"], C.unitframes, "rangecheck", "checkbox") - CreateConfig(this, T["Range Check Interval"], C.unitframes, "rangechecki", "dropdown", pfUI.gui.dropdowns.uf_rangecheckinterval) - CreateConfig(this, T["Combopoint Size"], C.unitframes, "combosize") - CreateConfig(this, T["Abbreviate Numbers (4200 -> 4.2k)"], C.unitframes, "abbrevnum", "checkbox") - CreateConfig(this, T["Show PvP Icon"], C.unitframes.player, "showPVP", "checkbox") - CreateConfig(this, T["Enable Energy Ticks"], C.unitframes.player, "energy", "checkbox") - this.setup = true - end - end) - - -- >> Player - pfUI.gui.tabs.uf.tabs.player = pfUI.gui.tabs.uf.tabs:CreateTabChild(T["Player"], true) - pfUI.gui.tabs.uf.tabs.player:SetScript("OnShow", function() - if not this.setup then - CreateConfig(this, T["Display Player Frame"], C.unitframes.player, "visible", "checkbox") - CreateConfig(this, T["Portrait Position"], C.unitframes.player, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) - CreateConfig(this, T["Status Bar Texture"], C.unitframes.player, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) - CreateConfig(this, T["Health Bar Width"], C.unitframes.player, "width") - CreateConfig(this, T["Health Bar Height"], C.unitframes.player, "height") - CreateConfig(this, T["Power Bar Height"], C.unitframes.player, "pheight") - CreateConfig(this, T["Power Bar Width"], C.unitframes.player, "pwidth") - CreateConfig(this, T["Power Bar Anchor"], C.unitframes.player, "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position) - CreateConfig(this, T["Spacing"], C.unitframes.player, "pspace") - CreateConfig(this, T["Buff Position"], C.unitframes.player, "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Buff Size"], C.unitframes.player, "buffsize") - CreateConfig(this, T["Buff Limit"], C.unitframes.player, "bufflimit") - CreateConfig(this, T["Buffs Per Row"], C.unitframes.player, "buffperrow") - CreateConfig(this, T["Debuff Position"], C.unitframes.player, "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Debuff Size"], C.unitframes.player, "debuffsize") - CreateConfig(this, T["Debuff Limit"], C.unitframes.player, "debufflimit") - CreateConfig(this, T["Debuffs Per Row"], C.unitframes.player, "debuffperrow") - CreateConfig(this, T["Invert Health Bar"], C.unitframes.player, "invert_healthbar", "checkbox") - CreateConfig(this, T["Enable Vertical Health Bar"], C.unitframes.player, "verticalbar", "checkbox") - CreateConfig(this, T["Enable Buff Indicators"], C.unitframes.player, "buff_indicator", "checkbox") - CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.player, "debuff_indicator", "checkbox") - CreateConfig(this, T["Enable Clickcast"], C.unitframes.player, "clickcast", "checkbox") - CreateConfig(this, T["Enable Range Fading"], C.unitframes.player, "faderange", "checkbox") - CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.player, "showtooltip", "checkbox") - CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.player, "healthcolor", "checkbox") - CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.player, "powercolor", "checkbox") - CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.player, "levelcolor", "checkbox") - CreateConfig(this, T["Enable Class Color in Text"], C.unitframes.player, "classcolor", "checkbox") - CreateConfig(this, T["Health Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.player, "txthpleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.player, "txthpcenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.player, "txthpright", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Power Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.player, "txtpowerleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.player, "txtpowercenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.player, "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts) + CreateConfig(nil, this, T["Disable pfUI Unit Frames"], C.unitframes, "disable", "checkbox") + CreateConfig(nil, this, T["Enable Pastel Colors"], C.unitframes, "pastel", "checkbox") + CreateConfig(nil, this, T["Enable Custom Color Health Bars"], C.unitframes, "custom", "checkbox") + CreateConfig(nil, this, T["Custom Health Bar Color"], C.unitframes, "customcolor", "color") + CreateConfig(nil, this, T["Enable Custom Color Health Bar Background"], C.unitframes, "custombg", "checkbox") + CreateConfig(nil, this, T["Custom Health Bar Background Color"], C.unitframes, "custombgcolor", "color") + CreateConfig(nil, this, T["Healthbar Animation Speed"], C.unitframes, "animation_speed", "dropdown", pfUI.gui.dropdowns.uf_animationspeed) + CreateConfig(nil, this, T["Portrait Alpha"], C.unitframes, "portraitalpha") + CreateConfig(nil, this, T["Always Use 2D Portraits"], C.unitframes, "always2dportrait", "checkbox") + CreateConfig(nil, this, T["Enable 2D Portraits As Fallback"], C.unitframes, "portraittexture", "checkbox") + CreateConfig(nil, this, T["Unit Frame Layout"], C.unitframes, "layout", "dropdown", pfUI.gui.dropdowns.uf_layout) + CreateConfig(nil, this, T["Enable 40y-Range Check"], C.unitframes, "rangecheck", "checkbox") + CreateConfig(nil, this, T["Range Check Interval"], C.unitframes, "rangechecki", "dropdown", pfUI.gui.dropdowns.uf_rangecheckinterval) + CreateConfig(nil, this, T["Combopoint Size"], C.unitframes, "combosize") + CreateConfig(nil, this, T["Abbreviate Numbers (4200 -> 4.2k)"], C.unitframes, "abbrevnum", "checkbox") + CreateConfig(nil, this, T["Show PvP Icon"], C.unitframes.player, "showPVP", "checkbox") + CreateConfig(nil, this, T["Enable Energy Ticks"], C.unitframes.player, "energy", "checkbox") this.setup = true end end) -- >> Target - pfUI.gui.tabs.uf.tabs.target = pfUI.gui.tabs.uf.tabs:CreateTabChild(T["Target"], true) - pfUI.gui.tabs.uf.tabs.target:SetScript("OnShow", function() - if not this.setup then - CreateConfig(this, T["Display Target Frame"], C.unitframes.target, "visible", "checkbox") - CreateConfig(this, T["Enable Target Switch Animation"], C.unitframes.target, "animation", "checkbox") - CreateConfig(this, T["Portrait Position"], C.unitframes.target, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) - CreateConfig(this, T["Status Bar Texture"], C.unitframes.target, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) - CreateConfig(this, T["Health Bar Width"], C.unitframes.target, "width") - CreateConfig(this, T["Health Bar Height"], C.unitframes.target, "height") - CreateConfig(this, T["Power Bar Height"], C.unitframes.target, "pheight") - CreateConfig(this, T["Power Bar Width"], C.unitframes.target, "pwidth") - CreateConfig(this, T["Power Bar Anchor"], C.unitframes.target, "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position) - CreateConfig(this, T["Spacing"], C.unitframes.target, "pspace") - CreateConfig(this, T["Buff Position"], C.unitframes.target, "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Buff Size"], C.unitframes.target, "buffsize") - CreateConfig(this, T["Buff Limit"], C.unitframes.target, "bufflimit") - CreateConfig(this, T["Buffs Per Row"], C.unitframes.target, "buffperrow") - CreateConfig(this, T["Debuff Position"], C.unitframes.target, "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Debuff Size"], C.unitframes.target, "debuffsize") - CreateConfig(this, T["Debuff Limit"], C.unitframes.target, "debufflimit") - CreateConfig(this, T["Debuffs Per Row"], C.unitframes.target, "debuffperrow") - CreateConfig(this, T["Invert Health Bar"], C.unitframes.target, "invert_healthbar", "checkbox") - CreateConfig(this, T["Enable Vertical Health Bar"], C.unitframes.target, "verticalbar", "checkbox") - CreateConfig(this, T["Enable Buff Indicators"], C.unitframes.target, "buff_indicator", "checkbox") - CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.target, "debuff_indicator", "checkbox") - CreateConfig(this, T["Enable Clickcast"], C.unitframes.target, "clickcast", "checkbox") - CreateConfig(this, T["Enable Range Fading"], C.unitframes.target, "faderange", "checkbox") - CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.target, "showtooltip", "checkbox") - CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.target, "healthcolor", "checkbox") - CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.target, "powercolor", "checkbox") - CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.target, "levelcolor", "checkbox") - CreateConfig(this, T["Enable Class Color in Text"], C.unitframes.target, "classcolor", "checkbox") - CreateConfig(this, T["Health Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.target, "txthpleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.target, "txthpcenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.target, "txthpright", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Power Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.target, "txtpowerleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.target, "txtpowercenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.target, "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts) - this.setup = true - end - end) - - -- >> Target-Target - pfUI.gui.tabs.uf.tabs.targettarget = pfUI.gui.tabs.uf.tabs:CreateTabChild(T["Target-Target"], true) - pfUI.gui.tabs.uf.tabs.targettarget:SetScript("OnShow", function() - if not this.setup then - CreateConfig(this, T["Display Target of Target Frame"], C.unitframes.ttarget, "visible", "checkbox") - CreateConfig(this, T["Portrait Position"], C.unitframes.ttarget, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) - CreateConfig(this, T["Status Bar Texture"], C.unitframes.ttarget, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) - CreateConfig(this, T["Health Bar Width"], C.unitframes.ttarget, "width") - CreateConfig(this, T["Health Bar Height"], C.unitframes.ttarget, "height") - CreateConfig(this, T["Power Bar Height"], C.unitframes.ttarget, "pheight") - CreateConfig(this, T["Power Bar Width"], C.unitframes.ttarget, "pwidth") - CreateConfig(this, T["Power Bar Anchor"], C.unitframes.ttarget, "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position) - CreateConfig(this, T["Spacing"], C.unitframes.ttarget, "pspace") - CreateConfig(this, T["Buff Position"], C.unitframes.ttarget, "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Buff Size"], C.unitframes.ttarget, "buffsize") - CreateConfig(this, T["Buff Limit"], C.unitframes.ttarget, "bufflimit") - CreateConfig(this, T["Buffs Per Row"], C.unitframes.ttarget, "buffperrow") - CreateConfig(this, T["Debuff Position"], C.unitframes.ttarget, "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Debuff Size"], C.unitframes.ttarget, "debuffsize") - CreateConfig(this, T["Debuff Limit"], C.unitframes.ttarget, "debufflimit") - CreateConfig(this, T["Debuffs Per Row"], C.unitframes.ttarget, "debuffperrow") - CreateConfig(this, T["Invert Health Bar"], C.unitframes.ttarget, "invert_healthbar", "checkbox") - CreateConfig(this, T["Enable Vertical Health Bar"], C.unitframes.ttarget, "verticalbar", "checkbox") - CreateConfig(this, T["Enable Buff Indicators"], C.unitframes.ttarget, "buff_indicator", "checkbox") - CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.ttarget, "debuff_indicator", "checkbox") - CreateConfig(this, T["Enable Clickcast"], C.unitframes.ttarget, "clickcast", "checkbox") - CreateConfig(this, T["Enable Range Fading"], C.unitframes.ttarget, "faderange", "checkbox") - CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.ttarget, "showtooltip", "checkbox") - CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.ttarget, "healthcolor", "checkbox") - CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.ttarget, "powercolor", "checkbox") - CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.ttarget, "levelcolor", "checkbox") - CreateConfig(this, T["Enable Class Color in Text"], C.unitframes.ttarget, "classcolor", "checkbox") - CreateConfig(this, T["Health Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.ttarget, "txthpleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.ttarget, "txthpcenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.ttarget, "txthpright", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Power Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.ttarget, "txtpowerleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.ttarget, "txtpowercenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.ttarget, "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts) - this.setup = true - end - end) - - -- >> Pet - pfUI.gui.tabs.uf.tabs.pet = pfUI.gui.tabs.uf.tabs:CreateTabChild(T["Pet"], true) - pfUI.gui.tabs.uf.tabs.pet:SetScript("OnShow", function() - if not this.setup then - CreateConfig(this, T["Display Pet Frame"], C.unitframes.pet, "visible", "checkbox") - CreateConfig(this, T["Portrait Position"], C.unitframes.pet, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) - CreateConfig(this, T["Status Bar Texture"], C.unitframes.pet, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) - CreateConfig(this, T["Health Bar Width"], C.unitframes.pet, "width") - CreateConfig(this, T["Health Bar Height"], C.unitframes.pet, "height") - CreateConfig(this, T["Power Bar Height"], C.unitframes.pet, "pheight") - CreateConfig(this, T["Power Bar Width"], C.unitframes.pet, "pwidth") - CreateConfig(this, T["Power Bar Anchor"], C.unitframes.pet, "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position) - CreateConfig(this, T["Spacing"], C.unitframes.pet, "pspace") - CreateConfig(this, T["Buff Position"], C.unitframes.pet, "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Buff Size"], C.unitframes.pet, "buffsize") - CreateConfig(this, T["Buff Limit"], C.unitframes.pet, "bufflimit") - CreateConfig(this, T["Buffs Per Row"], C.unitframes.pet, "buffperrow") - CreateConfig(this, T["Debuff Position"], C.unitframes.pet, "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Debuff Size"], C.unitframes.pet, "debuffsize") - CreateConfig(this, T["Debuff Limit"], C.unitframes.pet, "debufflimit") - CreateConfig(this, T["Debuffs Per Row"], C.unitframes.pet, "debuffperrow") - CreateConfig(this, T["Invert Health Bar"], C.unitframes.pet, "invert_healthbar", "checkbox") - CreateConfig(this, T["Enable Vertical Health Bar"], C.unitframes.pet, "verticalbar", "checkbox") - CreateConfig(this, T["Enable Buff Indicators"], C.unitframes.pet, "buff_indicator", "checkbox") - CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.pet, "debuff_indicator", "checkbox") - CreateConfig(this, T["Enable Clickcast"], C.unitframes.pet, "clickcast", "checkbox") - CreateConfig(this, T["Enable Range Fading"], C.unitframes.pet, "faderange", "checkbox") - CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.pet, "showtooltip", "checkbox") - CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.pet, "healthcolor", "checkbox") - CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.pet, "powercolor", "checkbox") - CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.pet, "levelcolor", "checkbox") - CreateConfig(this, T["Enable Class Color in Text"], C.unitframes.pet, "classcolor", "checkbox") - CreateConfig(this, T["Health Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.pet, "txthpleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.pet, "txthpcenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.pet, "txthpright", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Power Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.pet, "txtpowerleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.pet, "txtpowercenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.pet, "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts) - this.setup = true - end - end) - - -- >> Focus - pfUI.gui.tabs.uf.tabs.focus = pfUI.gui.tabs.uf.tabs:CreateTabChild(T["Focus"], true) - pfUI.gui.tabs.uf.tabs.focus:SetScript("OnShow", function() - if not this.setup then - CreateConfig(this, T["Display Focus Frame"], C.unitframes.focus, "visible", "checkbox") - CreateConfig(this, T["Portrait Position"], C.unitframes.focus, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) - CreateConfig(this, T["Status Bar Texture"], C.unitframes.focus, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) - CreateConfig(this, T["Health Bar Width"], C.unitframes.focus, "width") - CreateConfig(this, T["Health Bar Height"], C.unitframes.focus, "height") - CreateConfig(this, T["Power Bar Height"], C.unitframes.focus, "pheight") - CreateConfig(this, T["Power Bar Width"], C.unitframes.focus, "pwidth") - CreateConfig(this, T["Power Bar Anchor"], C.unitframes.focus, "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position) - CreateConfig(this, T["Spacing"], C.unitframes.focus, "pspace") - CreateConfig(this, T["Buff Position"], C.unitframes.focus, "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Buff Size"], C.unitframes.focus, "buffsize") - CreateConfig(this, T["Buff Limit"], C.unitframes.focus, "bufflimit") - CreateConfig(this, T["Buffs Per Row"], C.unitframes.focus, "buffperrow") - CreateConfig(this, T["Debuff Position"], C.unitframes.focus, "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Debuff Size"], C.unitframes.focus, "debuffsize") - CreateConfig(this, T["Debuff Limit"], C.unitframes.focus, "debufflimit") - CreateConfig(this, T["Debuffs Per Row"], C.unitframes.focus, "debuffperrow") - CreateConfig(this, T["Invert Health Bar"], C.unitframes.focus, "invert_healthbar", "checkbox") - CreateConfig(this, T["Enable Vertical Health Bar"], C.unitframes.focus, "verticalbar", "checkbox") - CreateConfig(this, T["Enable Buff Indicators"], C.unitframes.focus, "buff_indicator", "checkbox") - CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.focus, "debuff_indicator", "checkbox") - CreateConfig(this, T["Enable Clickcast"], C.unitframes.focus, "clickcast", "checkbox") - CreateConfig(this, T["Enable Range Fading"], C.unitframes.focus, "faderange", "checkbox") - CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.focus, "showtooltip", "checkbox") - CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.focus, "healthcolor", "checkbox") - CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.focus, "powercolor", "checkbox") - CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.focus, "levelcolor", "checkbox") - CreateConfig(this, T["Enable Class Color in Text"], C.unitframes.focus, "classcolor", "checkbox") - CreateConfig(this, T["Health Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.focus, "txthpleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.focus, "txthpcenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.focus, "txthpright", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Power Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.focus, "txtpowerleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.focus, "txtpowercenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.focus, "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts) - this.setup = true - end - end) + -- CreateConfig(nil, this, T["Enable Target Switch Animation"], C.unitframes.target, "animation", "checkbox") -- [[ GroupFrames ]] pfUI.gui.tabs.gf = pfUI.gui.tabs:CreateTabChild(T["Group Frames"], nil, nil, nil, true) @@ -960,200 +755,111 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.gf.tabs.general = pfUI.gui.tabs.gf.tabs:CreateTabChild(T["General"], true) pfUI.gui.tabs.gf.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Show Self in Group Frames"], C.unitframes, "selfingroup", "checkbox") - CreateConfig(this, T["Hide Group Frames While In Raid"], C.unitframes.group, "hide_in_raid", "checkbox") - CreateConfig(this, T["Use Raid Frames To Display Group Members"], C.unitframes, "raidforgroup", "checkbox") - CreateConfig(this, T["Show Hots as Buff Indicators"], C.unitframes, "show_hots", "checkbox") - CreateConfig(this, T["Show Hots of all Classes"], C.unitframes, "all_hots", "checkbox") - CreateConfig(this, T["Show Procs as Buff Indicators"], C.unitframes, "show_procs", "checkbox") - CreateConfig(this, T["Show Procs of all Classes"], C.unitframes, "all_procs", "checkbox") - CreateConfig(this, T["Buff Indicator Size"], C.unitframes, "indicator_size") - CreateConfig(this, T["Only Show Indicators for Dispellable Debuffs"], C.unitframes, "debuffs_class", "checkbox") - CreateConfig(this, T["Clickcast Spells"], nil, nil, "header") - CreateConfig(this, T["Click Action"], C.unitframes, "clickcast", nil, nil, nil, nil, "STRING") - CreateConfig(this, T["Shift-Click Action"], C.unitframes, "clickcast_shift", nil, nil, nil, nil, "STRING") - CreateConfig(this, T["Alt-Click Action"], C.unitframes, "clickcast_alt", nil, nil, nil, nil, "STRING") - CreateConfig(this, T["Ctrl-Click Action"], C.unitframes, "clickcast_ctrl", nil, nil, nil, nil, "STRING") + CreateConfig(update["group"], this, T["Show Self in Group Frames"], C.unitframes, "selfingroup", "checkbox") + CreateConfig(nil, this, T["Hide Group Frames While In Raid"], C.unitframes.group, "hide_in_raid", "checkbox") + CreateConfig(nil, this, T["Use Raid Frames To Display Group Members"], C.unitframes, "raidforgroup", "checkbox") + CreateConfig(nil, this, T["Show Hots as Buff Indicators"], C.unitframes, "show_hots", "checkbox") + CreateConfig(nil, this, T["Show Hots of all Classes"], C.unitframes, "all_hots", "checkbox") + CreateConfig(nil, this, T["Show Procs as Buff Indicators"], C.unitframes, "show_procs", "checkbox") + CreateConfig(nil, this, T["Show Procs of all Classes"], C.unitframes, "all_procs", "checkbox") + CreateConfig(nil, this, T["Buff Indicator Size"], C.unitframes, "indicator_size") + CreateConfig(nil, this, T["Only Show Indicators for Dispellable Debuffs"], C.unitframes, "debuffs_class", "checkbox") + CreateConfig(nil, this, T["Clickcast Spells"], nil, nil, "header") + CreateConfig(nil, this, T["Click Action"], C.unitframes, "clickcast", nil, nil, nil, nil, "STRING") + CreateConfig(nil, this, T["Shift-Click Action"], C.unitframes, "clickcast_shift", nil, nil, nil, nil, "STRING") + CreateConfig(nil, this, T["Alt-Click Action"], C.unitframes, "clickcast_alt", nil, nil, nil, nil, "STRING") + CreateConfig(nil, this, T["Ctrl-Click Action"], C.unitframes, "clickcast_ctrl", nil, nil, nil, nil, "STRING") this.setup = true end end) - -- >> Raid - pfUI.gui.tabs.gf.tabs.raid = pfUI.gui.tabs.gf.tabs:CreateTabChild(T["Raid"], true) - pfUI.gui.tabs.gf.tabs.raid:SetScript("OnShow", function() - if not this.setup then - CreateConfig(this, T["Display Raid Frames"], C.unitframes.raid, "visible", "checkbox") - CreateConfig(this, T["Portrait Position"], C.unitframes.raid, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) - CreateConfig(this, T["Status Bar Texture"], C.unitframes.raid, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) - CreateConfig(this, T["Health Bar Width"], C.unitframes.raid, "width") - CreateConfig(this, T["Health Bar Height"], C.unitframes.raid, "height") - CreateConfig(this, T["Power Bar Height"], C.unitframes.raid, "pheight") - CreateConfig(this, T["Power Bar Width"], C.unitframes.raid, "pwidth") - CreateConfig(this, T["Power Bar Anchor"], C.unitframes.raid, "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position) - CreateConfig(this, T["Spacing"], C.unitframes.raid, "pspace") - CreateConfig(this, T["Buff Position"], C.unitframes.raid, "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Buff Size"], C.unitframes.raid, "buffsize") - CreateConfig(this, T["Buff Limit"], C.unitframes.raid, "bufflimit") - CreateConfig(this, T["Buffs Per Row"], C.unitframes.raid, "buffperrow") - CreateConfig(this, T["Debuff Position"], C.unitframes.raid, "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Debuff Size"], C.unitframes.raid, "debuffsize") - CreateConfig(this, T["Debuff Limit"], C.unitframes.raid, "debufflimit") - CreateConfig(this, T["Debuffs Per Row"], C.unitframes.raid, "debuffperrow") - CreateConfig(this, T["Invert Health Bar"], C.unitframes.raid, "invert_healthbar", "checkbox") - CreateConfig(this, T["Enable Vertical Health Bar"], C.unitframes.raid, "verticalbar", "checkbox") - CreateConfig(this, T["Enable Buff Indicators"], C.unitframes.raid, "buff_indicator", "checkbox") - CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.raid, "debuff_indicator", "checkbox") - CreateConfig(this, T["Enable Clickcast"], C.unitframes.raid, "clickcast", "checkbox") - CreateConfig(this, T["Enable Range Fading"], C.unitframes.raid, "faderange", "checkbox") - CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.raid, "showtooltip", "checkbox") - CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.raid, "healthcolor", "checkbox") - CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.raid, "powercolor", "checkbox") - CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.raid, "levelcolor", "checkbox") - CreateConfig(this, T["Enable Class Color in Text"], C.unitframes.raid, "classcolor", "checkbox") - CreateConfig(this, T["Health Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.raid, "txthpleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.raid, "txthpcenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.raid, "txthpright", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Power Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.raid, "txtpowerleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.raid, "txtpowercenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.raid, "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts) - this.setup = true - end - end) + -- [[ Unit/Groupframes ]] + -- Populate Shared UF/GF Settings + local unitframeSettings = { + ["uf"] = { + -- config, text + [1] = { "player", T["Player"] }, + [2] = { "target", T["Target"] }, + [3] = { "ttarget", T["Target-Target"]}, + [4] = { "pet", T["Pet"] }, + [5] = { "focus", T["Focus"] }, + }, - -- >> Group - pfUI.gui.tabs.gf.tabs.group = pfUI.gui.tabs.gf.tabs:CreateTabChild(T["Group"], true) - pfUI.gui.tabs.gf.tabs.group:SetScript("OnShow", function() - if not this.setup then - CreateConfig(this, T["Display Group Frames"], C.unitframes.group, "visible", "checkbox") - CreateConfig(this, T["Portrait Position"], C.unitframes.group, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) - CreateConfig(this, T["Status Bar Texture"], C.unitframes.group, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) - CreateConfig(this, T["Health Bar Width"], C.unitframes.group, "width") - CreateConfig(this, T["Health Bar Height"], C.unitframes.group, "height") - CreateConfig(this, T["Power Bar Height"], C.unitframes.group, "pheight") - CreateConfig(this, T["Power Bar Width"], C.unitframes.group, "pwidth") - CreateConfig(this, T["Power Bar Anchor"], C.unitframes.group, "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position) - CreateConfig(this, T["Spacing"], C.unitframes.group, "pspace") - CreateConfig(this, T["Buff Position"], C.unitframes.group, "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Buff Size"], C.unitframes.group, "buffsize") - CreateConfig(this, T["Buff Limit"], C.unitframes.group, "bufflimit") - CreateConfig(this, T["Buffs Per Row"], C.unitframes.group, "buffperrow") - CreateConfig(this, T["Debuff Position"], C.unitframes.group, "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Debuff Size"], C.unitframes.group, "debuffsize") - CreateConfig(this, T["Debuff Limit"], C.unitframes.group, "debufflimit") - CreateConfig(this, T["Debuffs Per Row"], C.unitframes.group, "debuffperrow") - CreateConfig(this, T["Invert Health Bar"], C.unitframes.group, "invert_healthbar", "checkbox") - CreateConfig(this, T["Enable Vertical Health Bar"], C.unitframes.group, "verticalbar", "checkbox") - CreateConfig(this, T["Enable Buff Indicators"], C.unitframes.group, "buff_indicator", "checkbox") - CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.group, "debuff_indicator", "checkbox") - CreateConfig(this, T["Enable Clickcast"], C.unitframes.group, "clickcast", "checkbox") - CreateConfig(this, T["Enable Range Fading"], C.unitframes.group, "faderange", "checkbox") - CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.group, "showtooltip", "checkbox") - CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.group, "healthcolor", "checkbox") - CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.group, "powercolor", "checkbox") - CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.group, "levelcolor", "checkbox") - CreateConfig(this, T["Enable Class Color in Text"], C.unitframes.group, "classcolor", "checkbox") - CreateConfig(this, T["Health Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.group, "txthpleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.group, "txthpcenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.group, "txthpright", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Power Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.group, "txtpowerleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.group, "txtpowercenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.group, "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts) - this.setup = true - end - end) + ["gf"] = { + -- config, text + [1] = { "raid", T["Raid"] }, + [2] = { "group", T["Group"] }, + [3] = { "grouptarget", T["Group-Target"]}, + [4] = { "grouppet", T["Group-Pet"] }, + [5] = { "focus", T["Focus"] }, + } + } - -- >> Group-Target - pfUI.gui.tabs.gf.tabs.grouptarget = pfUI.gui.tabs.gf.tabs:CreateTabChild(T["Group-Target"], true) - pfUI.gui.tabs.gf.tabs.grouptarget:SetScript("OnShow", function() - if not this.setup then - CreateConfig(this, T["Display Group Target Frames"], C.unitframes.grouptarget, "visible", "checkbox") - CreateConfig(this, T["Portrait Position"], C.unitframes.grouptarget, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) - CreateConfig(this, T["Status Bar Texture"], C.unitframes.grouptarget, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) - CreateConfig(this, T["Health Bar Width"], C.unitframes.grouptarget, "width") - CreateConfig(this, T["Health Bar Height"], C.unitframes.grouptarget, "height") - CreateConfig(this, T["Power Bar Height"], C.unitframes.grouptarget, "pheight") - CreateConfig(this, T["Power Bar Width"], C.unitframes.grouptarget, "pwidth") - CreateConfig(this, T["Power Bar Anchor"], C.unitframes.grouptarget, "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position) - CreateConfig(this, T["Spacing"], C.unitframes.grouptarget, "pspace") - CreateConfig(this, T["Buff Position"], C.unitframes.grouptarget, "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Buff Size"], C.unitframes.grouptarget, "buffsize") - CreateConfig(this, T["Buff Limit"], C.unitframes.grouptarget, "bufflimit") - CreateConfig(this, T["Buffs Per Row"], C.unitframes.grouptarget, "buffperrow") - CreateConfig(this, T["Debuff Position"], C.unitframes.grouptarget, "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Debuff Size"], C.unitframes.grouptarget, "debuffsize") - CreateConfig(this, T["Debuff Limit"], C.unitframes.grouptarget, "debufflimit") - CreateConfig(this, T["Debuffs Per Row"], C.unitframes.grouptarget, "debuffperrow") - CreateConfig(this, T["Invert Health Bar"], C.unitframes.grouptarget, "invert_healthbar", "checkbox") - CreateConfig(this, T["Enable Vertical Health Bar"], C.unitframes.grouptarget, "verticalbar", "checkbox") - CreateConfig(this, T["Enable Buff Indicators"], C.unitframes.grouptarget, "buff_indicator", "checkbox") - CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.grouptarget, "debuff_indicator", "checkbox") - CreateConfig(this, T["Enable Clickcast"], C.unitframes.grouptarget, "clickcast", "checkbox") - CreateConfig(this, T["Enable Range Fading"], C.unitframes.grouptarget, "faderange", "checkbox") - CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.grouptarget, "showtooltip", "checkbox") - CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.grouptarget, "healthcolor", "checkbox") - CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.grouptarget, "powercolor", "checkbox") - CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.grouptarget, "levelcolor", "checkbox") - CreateConfig(this, T["Enable Class Color in Text"], C.unitframes.grouptarget, "classcolor", "checkbox") - CreateConfig(this, T["Health Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.grouptarget, "txthpleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.grouptarget, "txthpcenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.grouptarget, "txthpright", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Power Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.grouptarget, "txtpowerleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.grouptarget, "txtpowercenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.grouptarget, "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts) - this.setup = true - end - end) + -- >> Generic UnitFrame Settings + for label in pairs(unitframeSettings) do + for id, data in pairs(unitframeSettings[label]) do + local c = data[1] + local t = data[2] - -- >> Group-Pet - pfUI.gui.tabs.gf.tabs.grouppet = pfUI.gui.tabs.gf.tabs:CreateTabChild(T["Group-Pet"], true) - pfUI.gui.tabs.gf.tabs.grouppet:SetScript("OnShow", function() - if not this.setup then - CreateConfig(this, T["Display Group Pet Frames"], C.unitframes.grouppet, "visible", "checkbox") - CreateConfig(this, T["Portrait Position"], C.unitframes.grouppet, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) - CreateConfig(this, T["Status Bar Texture"], C.unitframes.grouppet, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) - CreateConfig(this, T["Health Bar Width"], C.unitframes.grouppet, "width") - CreateConfig(this, T["Health Bar Height"], C.unitframes.grouppet, "height") - CreateConfig(this, T["Power Bar Height"], C.unitframes.grouppet, "pheight") - CreateConfig(this, T["Power Bar Width"], C.unitframes.grouppet, "pwidth") - CreateConfig(this, T["Power Bar Anchor"], C.unitframes.grouppet, "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position) - CreateConfig(this, T["Spacing"], C.unitframes.grouppet, "pspace") - CreateConfig(this, T["Buff Position"], C.unitframes.grouppet, "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Buff Size"], C.unitframes.grouppet, "buffsize") - CreateConfig(this, T["Buff Limit"], C.unitframes.grouppet, "bufflimit") - CreateConfig(this, T["Buffs Per Row"], C.unitframes.grouppet, "buffperrow") - CreateConfig(this, T["Debuff Position"], C.unitframes.grouppet, "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) - CreateConfig(this, T["Debuff Size"], C.unitframes.grouppet, "debuffsize") - CreateConfig(this, T["Debuff Limit"], C.unitframes.grouppet, "debufflimit") - CreateConfig(this, T["Debuffs Per Row"], C.unitframes.grouppet, "debuffperrow") - CreateConfig(this, T["Invert Health Bar"], C.unitframes.grouppet, "invert_healthbar", "checkbox") - CreateConfig(this, T["Enable Vertical Health Bar"], C.unitframes.grouppet, "verticalbar", "checkbox") - CreateConfig(this, T["Enable Buff Indicators"], C.unitframes.grouppet, "buff_indicator", "checkbox") - CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.grouppet, "debuff_indicator", "checkbox") - CreateConfig(this, T["Enable Clickcast"], C.unitframes.grouppet, "clickcast", "checkbox") - CreateConfig(this, T["Enable Range Fading"], C.unitframes.grouppet, "faderange", "checkbox") - CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.grouppet, "showtooltip", "checkbox") - CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.grouppet, "healthcolor", "checkbox") - CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.grouppet, "powercolor", "checkbox") - CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.grouppet, "levelcolor", "checkbox") - CreateConfig(this, T["Enable Class Color in Text"], C.unitframes.grouppet, "classcolor", "checkbox") - CreateConfig(this, T["Health Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.grouppet, "txthpleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.grouppet, "txthpcenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.grouppet, "txthpright", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Power Bar Texts"], nil, nil, "header") - CreateConfig(this, T["Left Text"], C.unitframes.grouppet, "txtpowerleft", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Center Text"], C.unitframes.grouppet, "txtpowercenter", "dropdown", pfUI.gui.dropdowns.uf_texts) - CreateConfig(this, T["Right Text"], C.unitframes.grouppet, "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts) - this.setup = true - end - end) + pfUI.gui.tabs[label].tabs[c] = pfUI.gui.tabs[label].tabs:CreateTabChild(t, true) + pfUI.gui.tabs[label].tabs[c]:SetScript("OnShow", function() + if not this.setup then + -- link update tables + update.ttarget = update["targettarget"] + update.grouptarget = update["group"] + update.grouppet = update["group"] + -- build config entries + CreateConfig(update[c], this, T["Display Frame"] .. ": " .. t, C.unitframes[c], "visible", "checkbox") + CreateConfig(update[c], this, T["Enable Mouseover Tooltip"], C.unitframes[c], "showtooltip", "checkbox") + CreateConfig(update[c], this, T["Enable Clickcast"], C.unitframes[c], "clickcast", "checkbox") + CreateConfig(update[c], this, T["Enable Range Fading"], C.unitframes[c], "faderange", "checkbox") + CreateConfig(update[c], this, T["Portrait Position"], C.unitframes[c], "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) + CreateConfig(update[c], this, T["Status Bar Texture"], C.unitframes[c], "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) + CreateConfig(update[c], this, T["UnitFrame Spacing"], C.unitframes[c], "pspace") + + CreateConfig(update[c], this, T["Healthbar"], nil, nil, "header") + CreateConfig(update[c], this, T["Health Bar Width"], C.unitframes[c], "width") + CreateConfig(update[c], this, T["Health Bar Height"], C.unitframes[c], "height") + CreateConfig(update[c], this, T["Left Text"], C.unitframes[c], "txthpleft", "dropdown", pfUI.gui.dropdowns.uf_texts) + CreateConfig(update[c], this, T["Center Text"], C.unitframes[c], "txthpcenter", "dropdown", pfUI.gui.dropdowns.uf_texts) + CreateConfig(update[c], this, T["Right Text"], C.unitframes[c], "txthpright", "dropdown", pfUI.gui.dropdowns.uf_texts) + CreateConfig(update[c], this, T["Invert Health Bar"], C.unitframes[c], "invert_healthbar", "checkbox") + CreateConfig(update[c], this, T["Enable Vertical Health Bar"], C.unitframes[c], "verticalbar", "checkbox") + + CreateConfig(update[c], this, T["Powerbar"], nil, nil, "header") + CreateConfig(update[c], this, T["Power Bar Height"], C.unitframes[c], "pheight") + CreateConfig(update[c], this, T["Power Bar Width"], C.unitframes[c], "pwidth") + CreateConfig(update[c], this, T["Left Text"], C.unitframes[c], "txtpowerleft", "dropdown", pfUI.gui.dropdowns.uf_texts) + CreateConfig(update[c], this, T["Center Text"], C.unitframes[c], "txtpowercenter", "dropdown", pfUI.gui.dropdowns.uf_texts) + CreateConfig(update[c], this, T["Right Text"], C.unitframes[c], "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts) + CreateConfig(update[c], this, T["Power Bar Anchor"], C.unitframes[c], "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position) + + CreateConfig(update[c], this, T["Buffs"], nil, nil, "header") + CreateConfig(update[c], this, T["Buff Position"], C.unitframes[c], "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) + CreateConfig(update[c], this, T["Buff Size"], C.unitframes[c], "buffsize") + CreateConfig(update[c], this, T["Buff Limit"], C.unitframes[c], "bufflimit") + CreateConfig(update[c], this, T["Buffs Per Row"], C.unitframes[c], "buffperrow") + CreateConfig(update[c], this, T["Enable Buff Indicators"], C.unitframes[c], "buff_indicator", "checkbox") + + CreateConfig(update[c], this, T["Debuffs"], nil, nil, "header") + CreateConfig(update[c], this, T["Debuff Position"], C.unitframes[c], "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) + CreateConfig(update[c], this, T["Debuff Size"], C.unitframes[c], "debuffsize") + CreateConfig(update[c], this, T["Debuff Limit"], C.unitframes[c], "debufflimit") + CreateConfig(update[c], this, T["Debuffs Per Row"], C.unitframes[c], "debuffperrow") + CreateConfig(update[c], this, T["Enable Debuff Indicators"], C.unitframes[c], "debuff_indicator", "checkbox") + + CreateConfig(update[c], this, T["Text Colors"], nil, nil, "header") + CreateConfig(update[c], this, T["Enable Health Color"], C.unitframes[c], "healthcolor", "checkbox") + CreateConfig(update[c], this, T["Enable Power Color"], C.unitframes[c], "powercolor", "checkbox") + CreateConfig(update[c], this, T["Enable Level Color"], C.unitframes[c], "levelcolor", "checkbox") + CreateConfig(update[c], this, T["Enable Class Color"], C.unitframes[c], "classcolor", "checkbox") + + this.setup = true + end + end) + end + end -- [[ Combat ]] pfUI.gui.tabs.combat = pfUI.gui.tabs:CreateTabChild(T["Combat"], nil, nil, nil, true) @@ -1163,9 +869,9 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.combat.tabs.general = pfUI.gui.tabs.combat.tabs:CreateTabChild(T["Combat"], true) pfUI.gui.tabs.combat.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Enable Combat Glow Effects On Screen Edges"], C.appearance.infight, "screen", "checkbox") - CreateConfig(this, T["Enable Combat Glow Effects On Unit Frames"], C.appearance.infight, "common", "checkbox") - CreateConfig(this, T["Enable Combat Glow Effects On Group Frames"], C.appearance.infight, "group", "checkbox") + CreateConfig(nil, this, T["Enable Combat Glow Effects On Screen Edges"], C.appearance.infight, "screen", "checkbox") + CreateConfig(nil, this, T["Enable Combat Glow Effects On Unit Frames"], C.appearance.infight, "common", "checkbox") + CreateConfig(nil, this, T["Enable Combat Glow Effects On Group Frames"], C.appearance.infight, "group", "checkbox") this.setup = true end end) @@ -1179,10 +885,10 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.bags.tabs.general = pfUI.gui.tabs.bags.tabs:CreateTabChild(T["Bags & Bank"], true) pfUI.gui.tabs.bags.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Disable Item Quality Color For \"Common\" Items"], C.appearance.bags, "borderlimit", "checkbox") - CreateConfig(this, T["Enable Item Quality Color For Equipment Only"], C.appearance.bags, "borderonlygear", "checkbox") - CreateConfig(this, T["Auto Sell Grey Items"], C.global, "autosell", "checkbox") - CreateConfig(this, T["Auto Repair Items"], C.global, "autorepair", "checkbox") + CreateConfig(nil, this, T["Disable Item Quality Color For \"Common\" Items"], C.appearance.bags, "borderlimit", "checkbox") + CreateConfig(nil, this, T["Enable Item Quality Color For Equipment Only"], C.appearance.bags, "borderonlygear", "checkbox") + CreateConfig(nil, this, T["Auto Sell Grey Items"], C.global, "autosell", "checkbox") + CreateConfig(nil, this, T["Auto Repair Items"], C.global, "autorepair", "checkbox") this.setup = true end end) @@ -1196,10 +902,10 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.loot.tabs.general = pfUI.gui.tabs.loot.tabs:CreateTabChild(T["Loot"], true) pfUI.gui.tabs.loot.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Enable Auto-Resize Loot Frame"], C.loot, "autoresize", "checkbox") - CreateConfig(this, T["Disable Loot Confirmation Dialog (Without Group)"], C.loot, "autopickup", "checkbox") - CreateConfig(this, T["Enable Loot Window On MouseCursor"], C.loot, "mousecursor", "checkbox") - CreateConfig(this, T["Enable Advanced Master Loot Menu"], C.loot, "advancedloot", "checkbox") + CreateConfig(nil, this, T["Enable Auto-Resize Loot Frame"], C.loot, "autoresize", "checkbox") + CreateConfig(nil, this, T["Disable Loot Confirmation Dialog (Without Group)"], C.loot, "autopickup", "checkbox") + CreateConfig(nil, this, T["Enable Loot Window On MouseCursor"], C.loot, "mousecursor", "checkbox") + CreateConfig(nil, this, T["Enable Advanced Master Loot Menu"], C.loot, "advancedloot", "checkbox") this.setup = true end end) @@ -1213,13 +919,13 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.minimap.tabs.general = pfUI.gui.tabs.minimap.tabs:CreateTabChild(T["Minimap"], true) pfUI.gui.tabs.minimap.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Enable Zone Text On Minimap Mouseover"], C.appearance.minimap, "mouseoverzone", "checkbox") - CreateConfig(this, T["Coordinates Location"], C.appearance.minimap, "coordsloc", "dropdown", pfUI.gui.dropdowns.minimap_cords_position) - CreateConfig(this, T["Disable Minimap Buffs"], C.global, "hidebuff", "checkbox") - CreateConfig(this, T["Disable Minimap Weapon Buffs"], C.global, "hidewbuff", "checkbox") - CreateConfig(this, T["Show PvP Icon"], C.unitframes.player, "showPVPMinimap", "checkbox") - CreateConfig(this, T["Show Inactive Tracking"], C.appearance.minimap, "tracking_pulse", "checkbox") - CreateConfig(this, T["Tracking Icon Size"], C.appearance.minimap, "tracking_size") + CreateConfig(nil, this, T["Enable Zone Text On Minimap Mouseover"], C.appearance.minimap, "mouseoverzone", "checkbox") + CreateConfig(nil, this, T["Coordinates Location"], C.appearance.minimap, "coordsloc", "dropdown", pfUI.gui.dropdowns.minimap_cords_position) + CreateConfig(nil, this, T["Disable Minimap Buffs"], C.global, "hidebuff", "checkbox") + CreateConfig(nil, this, T["Disable Minimap Weapon Buffs"], C.global, "hidewbuff", "checkbox") + CreateConfig(nil, this, T["Show PvP Icon"], C.unitframes.player, "showPVPMinimap", "checkbox") + CreateConfig(nil, this, T["Show Inactive Tracking"], C.appearance.minimap, "tracking_pulse", "checkbox") + CreateConfig(nil, this, T["Tracking Icon Size"], C.appearance.minimap, "tracking_size") this.setup = true end end) @@ -1233,15 +939,15 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.actionbar.tabs.general = pfUI.gui.tabs.actionbar.tabs:CreateTabChild(T["General"], true) pfUI.gui.tabs.actionbar.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Icon Size"], C.bars, "icon_size") - CreateConfig(this, T["Enable Action Bar Backgrounds"], C.bars, "background", "checkbox") - CreateConfig(this, T["Enable Range Display On Hotkeys"], C.bars, "glowrange", "checkbox") - CreateConfig(this, T["Range Display Color"], C.bars, "rangecolor", "color") - CreateConfig(this, T["Show Macro Text"], C.bars, "showmacro", "checkbox") - CreateConfig(this, T["Show Hotkey Text"], C.bars, "showkeybind", "checkbox") - CreateConfig(this, T["Show Equipped Items"], C.bars, "showequipped", "checkbox") - CreateConfig(this, T["Enable Range Based Auto Paging (Hunter)"], C.bars, "hunterbar", "checkbox") - CreateConfig(this, T["Enable Action On Key Down"], C.bars, "keydown", "checkbox") + CreateConfig(nil, this, T["Icon Size"], C.bars, "icon_size") + CreateConfig(nil, this, T["Enable Action Bar Backgrounds"], C.bars, "background", "checkbox") + CreateConfig(nil, this, T["Enable Range Display On Hotkeys"], C.bars, "glowrange", "checkbox") + CreateConfig(nil, this, T["Range Display Color"], C.bars, "rangecolor", "color") + CreateConfig(nil, this, T["Show Macro Text"], C.bars, "showmacro", "checkbox") + CreateConfig(nil, this, T["Show Hotkey Text"], C.bars, "showkeybind", "checkbox") + CreateConfig(nil, this, T["Show Equipped Items"], C.bars, "showequipped", "checkbox") + CreateConfig(nil, this, T["Enable Range Based Auto Paging (Hunter)"], C.bars, "hunterbar", "checkbox") + CreateConfig(nil, this, T["Enable Action On Key Down"], C.bars, "keydown", "checkbox") this.setup = true end end) @@ -1250,14 +956,14 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.actionbar.tabs.autohide = pfUI.gui.tabs.actionbar.tabs:CreateTabChild(T["Autohide"], true) pfUI.gui.tabs.actionbar.tabs.autohide:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Seconds Until Action Bars Autohide"], C.bars, "hide_time") - CreateConfig(this, T["Enable Autohide For BarActionMain"], C.bars, "hide_actionmain", "checkbox") - CreateConfig(this, T["Enable Autohide For BarBottomLeft"], C.bars, "hide_bottomleft", "checkbox") - CreateConfig(this, T["Enable Autohide For BarBottomRight"], C.bars, "hide_bottomright", "checkbox") - CreateConfig(this, T["Enable Autohide For BarRight"], C.bars, "hide_right", "checkbox") - CreateConfig(this, T["Enable Autohide For BarTwoRight"], C.bars, "hide_tworight", "checkbox") - CreateConfig(this, T["Enable Autohide For BarShapeShift"], C.bars, "hide_shapeshift", "checkbox") - CreateConfig(this, T["Enable Autohide For BarPet"], C.bars, "hide_pet", "checkbox") + CreateConfig(nil, this, T["Seconds Until Action Bars Autohide"], C.bars, "hide_time") + CreateConfig(nil, this, T["Enable Autohide For BarActionMain"], C.bars, "hide_actionmain", "checkbox") + CreateConfig(nil, this, T["Enable Autohide For BarBottomLeft"], C.bars, "hide_bottomleft", "checkbox") + CreateConfig(nil, this, T["Enable Autohide For BarBottomRight"], C.bars, "hide_bottomright", "checkbox") + CreateConfig(nil, this, T["Enable Autohide For BarRight"], C.bars, "hide_right", "checkbox") + CreateConfig(nil, this, T["Enable Autohide For BarTwoRight"], C.bars, "hide_tworight", "checkbox") + CreateConfig(nil, this, T["Enable Autohide For BarShapeShift"], C.bars, "hide_shapeshift", "checkbox") + CreateConfig(nil, this, T["Enable Autohide For BarPet"], C.bars, "hide_pet", "checkbox") this.setup = true end end) @@ -1266,13 +972,13 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.actionbar.tabs.layout = pfUI.gui.tabs.actionbar.tabs:CreateTabChild(T["Layout"], true) pfUI.gui.tabs.actionbar.tabs.layout:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Main Actionbar (ActionMain)"], C.bars.actionmain, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons) - CreateConfig(this, T["Second Actionbar (BottomLeft)"], C.bars.bottomleft, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons) - CreateConfig(this, T["Left Actionbar (BottomRight)"], C.bars.bottomright, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons) - CreateConfig(this, T["Right Actionbar (Right)"], C.bars.right, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons) - CreateConfig(this, T["Vertical Actionbar (TwoRight)"], C.bars.tworight, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons) - CreateConfig(this, T["Shapeshift Bar (BarShapeShift)"], C.bars.shapeshift, "formfactor", "dropdown", pfUI.gui.dropdowns.num_shapeshift_slots) - CreateConfig(this, T["Pet Bar (BarPet)"], C.bars.pet, "formfactor", "dropdown", pfUI.gui.dropdowns.num_pet_action_slots) + CreateConfig(nil, this, T["Main Actionbar (ActionMain)"], C.bars.actionmain, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons) + CreateConfig(nil, this, T["Second Actionbar (BottomLeft)"], C.bars.bottomleft, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons) + CreateConfig(nil, this, T["Left Actionbar (BottomRight)"], C.bars.bottomright, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons) + CreateConfig(nil, this, T["Right Actionbar (Right)"], C.bars.right, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons) + CreateConfig(nil, this, T["Vertical Actionbar (TwoRight)"], C.bars.tworight, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons) + CreateConfig(nil, this, T["Shapeshift Bar (BarShapeShift)"], C.bars.shapeshift, "formfactor", "dropdown", pfUI.gui.dropdowns.num_shapeshift_slots) + CreateConfig(nil, this, T["Pet Bar (BarPet)"], C.bars.pet, "formfactor", "dropdown", pfUI.gui.dropdowns.num_pet_action_slots) this.setup = true end end) @@ -1286,18 +992,18 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.panel.tabs.general = pfUI.gui.tabs.panel.tabs:CreateTabChild(T["Panel"], true) pfUI.gui.tabs.panel.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Use Unit Fonts"], C.panel, "use_unitfonts", "checkbox") - CreateConfig(this, T["Left Panel: Left"], C.panel.left, "left", "dropdown", pfUI.gui.dropdowns.panel_values) - CreateConfig(this, T["Left Panel: Center"], C.panel.left, "center", "dropdown", pfUI.gui.dropdowns.panel_values) - CreateConfig(this, T["Left Panel: Right"], C.panel.left, "right", "dropdown", pfUI.gui.dropdowns.panel_values) - CreateConfig(this, T["Right Panel: Left"], C.panel.right, "left", "dropdown", pfUI.gui.dropdowns.panel_values) - CreateConfig(this, T["Right Panel: Center"], C.panel.right, "center", "dropdown", pfUI.gui.dropdowns.panel_values) - CreateConfig(this, T["Right Panel: Right"], C.panel.right, "right", "dropdown", pfUI.gui.dropdowns.panel_values) - CreateConfig(this, T["Other Panel: Minimap"], C.panel.other, "minimap", "dropdown", pfUI.gui.dropdowns.panel_values) - CreateConfig(this, T["Always Show Experience And Reputation Bar"], C.panel.xp, "showalways", "checkbox") - CreateConfig(this, T["Only Count Bagspace On Regular Bags"], C.panel.bag, "ignorespecial", "checkbox") - CreateConfig(this, T["Enable Micro Bar"], C.panel.micro, "enable", "checkbox") - CreateConfig(this, T["Enable 24h Clock"], C.global, "twentyfour", "checkbox") + CreateConfig(nil, this, T["Use Unit Fonts"], C.panel, "use_unitfonts", "checkbox") + CreateConfig(nil, this, T["Left Panel: Left"], C.panel.left, "left", "dropdown", pfUI.gui.dropdowns.panel_values) + CreateConfig(nil, this, T["Left Panel: Center"], C.panel.left, "center", "dropdown", pfUI.gui.dropdowns.panel_values) + CreateConfig(nil, this, T["Left Panel: Right"], C.panel.left, "right", "dropdown", pfUI.gui.dropdowns.panel_values) + CreateConfig(nil, this, T["Right Panel: Left"], C.panel.right, "left", "dropdown", pfUI.gui.dropdowns.panel_values) + CreateConfig(nil, this, T["Right Panel: Center"], C.panel.right, "center", "dropdown", pfUI.gui.dropdowns.panel_values) + CreateConfig(nil, this, T["Right Panel: Right"], C.panel.right, "right", "dropdown", pfUI.gui.dropdowns.panel_values) + CreateConfig(nil, this, T["Other Panel: Minimap"], C.panel.other, "minimap", "dropdown", pfUI.gui.dropdowns.panel_values) + CreateConfig(nil, this, T["Always Show Experience And Reputation Bar"], C.panel.xp, "showalways", "checkbox") + CreateConfig(nil, this, T["Only Count Bagspace On Regular Bags"], C.panel.bag, "ignorespecial", "checkbox") + CreateConfig(nil, this, T["Enable Micro Bar"], C.panel.micro, "enable", "checkbox") + CreateConfig(nil, this, T["Enable 24h Clock"], C.global, "twentyfour", "checkbox") this.setup = true end end) @@ -1306,10 +1012,10 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.panel.tabs.autohide = pfUI.gui.tabs.panel.tabs:CreateTabChild(T["Autohide"], true) pfUI.gui.tabs.panel.tabs.autohide:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Enable Autohide For Left Chat Panel"], C.panel, "hide_leftchat", "checkbox") - CreateConfig(this, T["Enable Autohide For Right Chat Panel"], C.panel, "hide_rightchat", "checkbox") - CreateConfig(this, T["Enable Autohide For Minimap Panel"], C.panel, "hide_minimap", "checkbox") - CreateConfig(this, T["Enable Autohide For Microbar Panel"], C.panel, "hide_microbar", "checkbox") + CreateConfig(nil, this, T["Enable Autohide For Left Chat Panel"], C.panel, "hide_leftchat", "checkbox") + CreateConfig(nil, this, T["Enable Autohide For Right Chat Panel"], C.panel, "hide_rightchat", "checkbox") + CreateConfig(nil, this, T["Enable Autohide For Minimap Panel"], C.panel, "hide_minimap", "checkbox") + CreateConfig(nil, this, T["Enable Autohide For Microbar Panel"], C.panel, "hide_microbar", "checkbox") this.setup = true end end) @@ -1323,13 +1029,13 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.tooltip.tabs.general = pfUI.gui.tabs.tooltip.tabs:CreateTabChild(T["Tooltip"], true) pfUI.gui.tabs.tooltip.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Tooltip Position"], C.tooltip, "position", "dropdown", pfUI.gui.dropdowns.tooltip_position) - CreateConfig(this, T["Cursor Tooltip Align"], C.tooltip, "cursoralign", "dropdown", pfUI.gui.dropdowns.tooltip_align) - CreateConfig(this, T["Cursor Tooltip Offset"], C.tooltip, "cursoroffset") - CreateConfig(this, T["Enable Extended Guild Information"], C.tooltip, "extguild", "checkbox") - CreateConfig(this, T["Custom Transparency"], C.tooltip, "alpha") - CreateConfig(this, T["Always Show Item Comparison"], C.tooltip.compare, "showalways", "checkbox") - CreateConfig(this, T["Always Show Extended Vendor Values"], C.tooltip.vendor, "showalways", "checkbox") + CreateConfig(nil, this, T["Tooltip Position"], C.tooltip, "position", "dropdown", pfUI.gui.dropdowns.tooltip_position) + CreateConfig(nil, this, T["Cursor Tooltip Align"], C.tooltip, "cursoralign", "dropdown", pfUI.gui.dropdowns.tooltip_align) + CreateConfig(nil, this, T["Cursor Tooltip Offset"], C.tooltip, "cursoroffset") + CreateConfig(nil, this, T["Enable Extended Guild Information"], C.tooltip, "extguild", "checkbox") + CreateConfig(nil, this, T["Custom Transparency"], C.tooltip, "alpha") + CreateConfig(nil, this, T["Always Show Item Comparison"], C.tooltip.compare, "showalways", "checkbox") + CreateConfig(nil, this, T["Always Show Extended Vendor Values"], C.tooltip.vendor, "showalways", "checkbox") this.setup = true end end) @@ -1343,12 +1049,12 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.castbar.tabs.general = pfUI.gui.tabs.castbar.tabs:CreateTabChild(T["Castbar"], true) pfUI.gui.tabs.castbar.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Use Unit Fonts"], C.castbar, "use_unitfonts", "checkbox") - CreateConfig(this, T["Casting Color"], C.appearance.castbar, "castbarcolor", "color") - CreateConfig(this, T["Channeling Color"], C.appearance.castbar, "channelcolor", "color") - CreateConfig(this, T["Disable Blizzard Castbar"], C.castbar.player, "hide_blizz", "checkbox") - CreateConfig(this, T["Disable pfUI Player Castbar"], C.castbar.player, "hide_pfui", "checkbox") - CreateConfig(this, T["Disable pfUI Target Castbar"], C.castbar.target, "hide_pfui", "checkbox") + CreateConfig(nil, this, T["Use Unit Fonts"], C.castbar, "use_unitfonts", "checkbox") + CreateConfig(nil, this, T["Casting Color"], C.appearance.castbar, "castbarcolor", "color") + CreateConfig(nil, this, T["Channeling Color"], C.appearance.castbar, "channelcolor", "color") + CreateConfig(nil, this, T["Disable Blizzard Castbar"], C.castbar.player, "hide_blizz", "checkbox") + CreateConfig(nil, this, T["Disable pfUI Player Castbar"], C.castbar.player, "hide_pfui", "checkbox") + CreateConfig(nil, this, T["Disable pfUI Target Castbar"], C.castbar.target, "hide_pfui", "checkbox") this.setup = true end end) @@ -1362,38 +1068,38 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.chat.tabs.general = pfUI.gui.tabs.chat.tabs:CreateTabChild(T["General"], true) pfUI.gui.tabs.chat.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Enable \"Loot & Spam\" Chat Window"], C.chat.right, "enable", "checkbox") - CreateConfig(this, T["Inputbox Width"], C.chat.text, "input_width") - CreateConfig(this, T["Inputbox Height"], C.chat.text, "input_height") - CreateConfig(this, T["Enable Text Shadow"], C.chat.text, "outline", "checkbox") - CreateConfig(this, T["Enable Timestamps"], C.chat.text, "time", "checkbox") - CreateConfig(this, T["Timestamp Format"], C.chat.text, "timeformat", nil, nil, nil, nil, "STRING") - CreateConfig(this, T["Timestamp Brackets"], C.chat.text, "timebracket", nil, nil, nil, nil, "STRING") - CreateConfig(this, T["Timestamp Color"], C.chat.text, "timecolor", "color") - CreateConfig(this, T["Hide Channel Names"], C.chat.text, "channelnumonly", "checkbox") - CreateConfig(this, T["Enable URL Detection"], C.chat.text, "detecturl", "checkbox") - CreateConfig(this, T["Enable Class Colors"], C.chat.text, "classcolor", "checkbox") - CreateConfig(this, T["Left Chat Width"], C.chat.left, "width") - CreateConfig(this, T["Left Chat Height"], C.chat.left, "height") - CreateConfig(this, T["Right Chat Width"], C.chat.right, "width") - CreateConfig(this, T["Right Chat Height"], C.chat.right, "height") - CreateConfig(this, T["Enable Right Chat Window"], C.chat.right, "alwaysshow", "checkbox") - CreateConfig(this, T["Hide Combat Log"], C.chat.global, "combathide", "checkbox") - CreateConfig(this, T["Enable Chat Dock Background"], C.chat.global, "tabdock", "checkbox") - CreateConfig(this, T["Only Show Chat Dock On Mouseover"], C.chat.global, "tabmouse", "checkbox") - CreateConfig(this, T["Enable Chat Tab Flashing"], C.chat.global, "chatflash", "checkbox") - CreateConfig(this, T["Enable Custom Colors"], C.chat.global, "custombg", "checkbox") - CreateConfig(this, T["Chat Background Color"], C.chat.global, "background", "color") - CreateConfig(this, T["Chat Border Color"], C.chat.global, "border", "color") - CreateConfig(this, T["Enable Custom Incoming Whispers Layout"], C.chat.global, "whispermod", "checkbox") - CreateConfig(this, T["Incoming Whispers Color"], C.chat.global, "whisper", "color") - CreateConfig(this, T["Enable Sticky Chat"], C.chat.global, "sticky", "checkbox") - CreateConfig(this, T["Enable Chat Fade"], C.chat.global, "fadeout", "checkbox") - CreateConfig(this, T["Seconds Before Chat Fade"], C.chat.global, "fadetime") - CreateConfig(this, T["Mousewheel Scroll Speed"], C.chat.global, "scrollspeed") - CreateConfig(this, T["Enable Chat Bubbles"], C.chat.bubbles, "chat", "checkbox") - CreateConfig(this, T["Enable Party Chat Bubbles"], C.chat.bubbles, "party", "checkbox") - CreateConfig(this, T["Chat Bubble Transparency"], C.chat.bubbles, "alpha") + CreateConfig(nil, this, T["Enable \"Loot & Spam\" Chat Window"], C.chat.right, "enable", "checkbox") + CreateConfig(nil, this, T["Inputbox Width"], C.chat.text, "input_width") + CreateConfig(nil, this, T["Inputbox Height"], C.chat.text, "input_height") + CreateConfig(nil, this, T["Enable Text Shadow"], C.chat.text, "outline", "checkbox") + CreateConfig(nil, this, T["Enable Timestamps"], C.chat.text, "time", "checkbox") + CreateConfig(nil, this, T["Timestamp Format"], C.chat.text, "timeformat", nil, nil, nil, nil, "STRING") + CreateConfig(nil, this, T["Timestamp Brackets"], C.chat.text, "timebracket", nil, nil, nil, nil, "STRING") + CreateConfig(nil, this, T["Timestamp Color"], C.chat.text, "timecolor", "color") + CreateConfig(nil, this, T["Hide Channel Names"], C.chat.text, "channelnumonly", "checkbox") + CreateConfig(nil, this, T["Enable URL Detection"], C.chat.text, "detecturl", "checkbox") + CreateConfig(nil, this, T["Enable Class Colors"], C.chat.text, "classcolor", "checkbox") + CreateConfig(nil, this, T["Left Chat Width"], C.chat.left, "width") + CreateConfig(nil, this, T["Left Chat Height"], C.chat.left, "height") + CreateConfig(nil, this, T["Right Chat Width"], C.chat.right, "width") + CreateConfig(nil, this, T["Right Chat Height"], C.chat.right, "height") + CreateConfig(nil, this, T["Enable Right Chat Window"], C.chat.right, "alwaysshow", "checkbox") + CreateConfig(nil, this, T["Hide Combat Log"], C.chat.global, "combathide", "checkbox") + CreateConfig(nil, this, T["Enable Chat Dock Background"], C.chat.global, "tabdock", "checkbox") + CreateConfig(nil, this, T["Only Show Chat Dock On Mouseover"], C.chat.global, "tabmouse", "checkbox") + CreateConfig(nil, this, T["Enable Chat Tab Flashing"], C.chat.global, "chatflash", "checkbox") + CreateConfig(nil, this, T["Enable Custom Colors"], C.chat.global, "custombg", "checkbox") + CreateConfig(nil, this, T["Chat Background Color"], C.chat.global, "background", "color") + CreateConfig(nil, this, T["Chat Border Color"], C.chat.global, "border", "color") + CreateConfig(nil, this, T["Enable Custom Incoming Whispers Layout"], C.chat.global, "whispermod", "checkbox") + CreateConfig(nil, this, T["Incoming Whispers Color"], C.chat.global, "whisper", "color") + CreateConfig(nil, this, T["Enable Sticky Chat"], C.chat.global, "sticky", "checkbox") + CreateConfig(nil, this, T["Enable Chat Fade"], C.chat.global, "fadeout", "checkbox") + CreateConfig(nil, this, T["Seconds Before Chat Fade"], C.chat.global, "fadetime") + CreateConfig(nil, this, T["Mousewheel Scroll Speed"], C.chat.global, "scrollspeed") + CreateConfig(nil, this, T["Enable Chat Bubbles"], C.chat.bubbles, "chat", "checkbox") + CreateConfig(nil, this, T["Enable Party Chat Bubbles"], C.chat.bubbles, "party", "checkbox") + CreateConfig(nil, this, T["Chat Bubble Transparency"], C.chat.bubbles, "alpha") this.setup = true end end) @@ -1407,26 +1113,26 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.nameplates.tabs.general = pfUI.gui.tabs.nameplates.tabs:CreateTabChild(T["Nameplates"], true) pfUI.gui.tabs.nameplates.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Use Unit Fonts"], C.nameplates, "use_unitfonts", "checkbox") - CreateConfig(this, T["Enable Castbars"], C.nameplates, "showcastbar", "checkbox") - CreateConfig(this, T["Enable Spellname"], C.nameplates, "spellname", "checkbox") - CreateConfig(this, T["Enable Debuffs"], C.nameplates, "showdebuffs", "checkbox") - CreateConfig(this, T["Enable Clickthrough"], C.nameplates, "clickthrough", "checkbox") - CreateConfig(this, T["Enable Overlap"], C.nameplates, "overlap", "checkbox") - CreateConfig(this, T["Enable Mouselook With Right Click"], C.nameplates, "rightclick", "checkbox") - CreateConfig(this, T["Right Click Auto Attack Threshold"], C.nameplates, "clickthreshold") - CreateConfig(this, T["Enable Class Colors On Enemies"], C.nameplates, "enemyclassc", "checkbox") - CreateConfig(this, T["Enable Class Colors On Friends"], C.nameplates, "friendclassc", "checkbox") - CreateConfig(this, T["Raid Icon Size"], C.nameplates, "raidiconsize") - CreateConfig(this, T["Show Players Only"], C.nameplates, "players", "checkbox") - CreateConfig(this, T["Hide Critters"], C.nameplates, "critters", "checkbox") - CreateConfig(this, T["Hide Totems"], C.nameplates, "totems", "checkbox") - CreateConfig(this, T["Show Health Points"], C.nameplates, "showhp", "checkbox") - CreateConfig(this, T["Vertical Position"], C.nameplates, "vpos") - CreateConfig(this, T["Nameplate Width"], C.nameplates, "width") - CreateConfig(this, T["Healthbar Height"], C.nameplates, "heighthealth") - CreateConfig(this, T["Castbar Height"], C.nameplates, "heightcast") - CreateConfig(this, T["Enable Combo Point Display"], C.nameplates, "cpdisplay", "checkbox") + CreateConfig(nil, this, T["Use Unit Fonts"], C.nameplates, "use_unitfonts", "checkbox") + CreateConfig(nil, this, T["Enable Castbars"], C.nameplates, "showcastbar", "checkbox") + CreateConfig(nil, this, T["Enable Spellname"], C.nameplates, "spellname", "checkbox") + CreateConfig(nil, this, T["Enable Debuffs"], C.nameplates, "showdebuffs", "checkbox") + CreateConfig(nil, this, T["Enable Clickthrough"], C.nameplates, "clickthrough", "checkbox") + CreateConfig(nil, this, T["Enable Overlap"], C.nameplates, "overlap", "checkbox") + CreateConfig(nil, this, T["Enable Mouselook With Right Click"], C.nameplates, "rightclick", "checkbox") + CreateConfig(nil, this, T["Right Click Auto Attack Threshold"], C.nameplates, "clickthreshold") + CreateConfig(nil, this, T["Enable Class Colors On Enemies"], C.nameplates, "enemyclassc", "checkbox") + CreateConfig(nil, this, T["Enable Class Colors On Friends"], C.nameplates, "friendclassc", "checkbox") + CreateConfig(nil, this, T["Raid Icon Size"], C.nameplates, "raidiconsize") + CreateConfig(nil, this, T["Show Players Only"], C.nameplates, "players", "checkbox") + CreateConfig(nil, this, T["Hide Critters"], C.nameplates, "critters", "checkbox") + CreateConfig(nil, this, T["Hide Totems"], C.nameplates, "totems", "checkbox") + CreateConfig(nil, this, T["Show Health Points"], C.nameplates, "showhp", "checkbox") + CreateConfig(nil, this, T["Vertical Position"], C.nameplates, "vpos") + CreateConfig(nil, this, T["Nameplate Width"], C.nameplates, "width") + CreateConfig(nil, this, T["Healthbar Height"], C.nameplates, "heighthealth") + CreateConfig(nil, this, T["Castbar Height"], C.nameplates, "heightcast") + CreateConfig(nil, this, T["Enable Combo Point Display"], C.nameplates, "cpdisplay", "checkbox") this.setup = true end end) @@ -1440,18 +1146,18 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.thirdparty.tabs.general = pfUI.gui.tabs.thirdparty.tabs:CreateTabChild(T["Thirdparty"], true) pfUI.gui.tabs.thirdparty.tabs.general:SetScript("OnShow", function() if not this.setup then - CreateConfig(this, T["Use Chat Colors for Meters"], C.thirdparty, "chatbg", "checkbox") - CreateConfig(this, T["DPSMate (Skin)"], C.thirdparty.dpsmate, "skin", "checkbox") - CreateConfig(this, T["DPSMate (Dock)"], C.thirdparty.dpsmate, "dock", "checkbox") - CreateConfig(this, T["SWStats (Skin)"], C.thirdparty.swstats, "skin", "checkbox") - CreateConfig(this, T["SWStats (Dock)"], C.thirdparty.swstats, "dock", "checkbox") - CreateConfig(this, T["KLH Threat Meter (Skin)"], C.thirdparty.ktm, "skin", "checkbox") - CreateConfig(this, T["KLH Threat Meter (Dock)"], C.thirdparty.ktm, "dock", "checkbox") - CreateConfig(this, T["WIM"], C.thirdparty.wim, "enable", "checkbox") - CreateConfig(this, T["HealComm"], C.thirdparty.healcomm, "enable", "checkbox") - CreateConfig(this, T["SortBags"], C.thirdparty.sortbags, "enable", "checkbox") - CreateConfig(this, T["FlightMap"], C.thirdparty.flightmap, "enable", "checkbox") - CreateConfig(this, T["AtlasLoot"], C.thirdparty.atlasloot, "enable", "checkbox") + CreateConfig(nil, this, T["Use Chat Colors for Meters"], C.thirdparty, "chatbg", "checkbox") + CreateConfig(nil, this, T["DPSMate (Skin)"], C.thirdparty.dpsmate, "skin", "checkbox") + CreateConfig(nil, this, T["DPSMate (Dock)"], C.thirdparty.dpsmate, "dock", "checkbox") + CreateConfig(nil, this, T["SWStats (Skin)"], C.thirdparty.swstats, "skin", "checkbox") + CreateConfig(nil, this, T["SWStats (Dock)"], C.thirdparty.swstats, "dock", "checkbox") + CreateConfig(nil, this, T["KLH Threat Meter (Skin)"], C.thirdparty.ktm, "skin", "checkbox") + CreateConfig(nil, this, T["KLH Threat Meter (Dock)"], C.thirdparty.ktm, "dock", "checkbox") + CreateConfig(nil, this, T["WIM"], C.thirdparty.wim, "enable", "checkbox") + CreateConfig(nil, this, T["HealComm"], C.thirdparty.healcomm, "enable", "checkbox") + CreateConfig(nil, this, T["SortBags"], C.thirdparty.sortbags, "enable", "checkbox") + CreateConfig(nil, this, T["FlightMap"], C.thirdparty.flightmap, "enable", "checkbox") + CreateConfig(nil, this, T["AtlasLoot"], C.thirdparty.atlasloot, "enable", "checkbox") this.setup = true end end) @@ -1469,7 +1175,7 @@ pfUI:RegisterModule("gui", function () if m ~= "gui" then -- create disabled entry if not existing and display pfUI:UpdateConfig("disabled", nil, m, "0") - CreateConfig(this, T["Disable Module"] .. " " .. m, C.disabled, m, "checkbox") + CreateConfig(nil, this, T["Disable Module"] .. " " .. m, C.disabled, m, "checkbox") end end this.setup = true @@ -1483,7 +1189,7 @@ pfUI:RegisterModule("gui", function () for i,m in pairs(pfUI.skins) do -- create disabled entry if not existing and display pfUI:UpdateConfig("disabled", nil, "skin_" .. m, "0") - CreateConfig(this, T["Disable Skin"] .. " " .. m, C.disabled, "skin_" .. m, "checkbox") + CreateConfig(nil, this, T["Disable Skin"] .. " " .. m, C.disabled, "skin_" .. m, "checkbox") end this.setup = true end