diff --git a/gui/extra.lua b/gui/extra.lua index 307d39bac..afb2020c1 100644 --- a/gui/extra.lua +++ b/gui/extra.lua @@ -919,10 +919,6 @@ function GUI:SetupNameplateMajorSpells(parent) end end -local function UpdateIndicators() - NAMEPLATE:UpdateIndicators() -end - local function UpdateNameplateCVars() NAMEPLATE:UpdateNameplateCVars() end @@ -1401,7 +1397,7 @@ function GUI:SetupArenaFrameSize(parent) end function GUI:SetupClassPowerSize(parent) - local guiName = 'FreeUIGUIClassPowerSize' + local guiName = 'FreeUIGUIClassPower' TogglePanel(guiName) if extraGUIs[guiName] then return @@ -1410,12 +1406,26 @@ function GUI:SetupClassPowerSize(parent) local panel = CreateExtraGUI(parent, guiName) local scroll = GUI:CreateScroll(panel, 220, 540) local db = C.CharacterSettings.Unitframe + local mKey = 'Unitframe' - local datas = {key = 'ClassPowerHeight', value = db.ClassPowerHeight, text = L['Height'], min = 1, max = 20, step = 1} + local datas = { + slider = {[1] = {key = 'ClassPowerHeight', value = db.ClassPowerHeight, text = L['Height'], min = 1, max = 20, step = 1}}, + checkbox = {[1] = {value = 'RunesTimer', text = L['Runes Timer'], tip = L['Display timer for DK Runes.']}}, + } local offset = -10 - CreateGroupTitle(scroll, L['ClassPower'], offset) - CreateSlider(scroll, 'Unitframe', datas.key, datas.text, datas.min, datas.max, datas.step, datas.value, 20, offset - 50) + for _, v in ipairs(datas.slider) do + CreateGroupTitle(scroll, L['Class Power'], offset) + CreateSlider(scroll, mKey, v.key, v.text, v.min, v.max, v.step, v.value, 20, offset - 50) + end + + scroll.groupTitle = nil + + for _, v in ipairs(datas.checkbox) do + CreateGroupTitle(scroll, L['Runes'], offset - 100) + CreateCheckbox(scroll, offset - 130, mKey, v.value, v.text, nil, v.tip) + offset = offset - 35 + end end function GUI:SetupUnitFrameFader(parent) diff --git a/gui/options.lua b/gui/options.lua index 8d1057f1a..ab64c952f 100644 --- a/gui/options.lua +++ b/gui/options.lua @@ -574,15 +574,13 @@ GUI.OptionsList = { {1, 'Unitframe', 'Portrait', L['Portrait'], nil, nil, UpdateGroupElements, L['Show dynamic portrait on unit frame.']}, {1, 'Unitframe', 'GCDIndicator', L['GCD Indicator'], true, nil, UpdateGCDTicker, L['Show global cooldown ticker above the player frame.']}, {1, 'Unitframe', 'AbbrName', L['Abbreviate Name'], nil, nil, UpdateUnitTags}, + {1, 'Unitframe', 'ClassPower', L['Class Power'], true, SetupClassPowerSize, nil, L['Show special resources of the class, such as Combo Points, Holy Power, Chi, Runes, etc.']}, {}, {1, 'Unitframe', 'OnlyShowPlayer', L['Player Debuffs Only'], nil, nil, nil, L['Display debuffs cast by player only.']}, {1, 'Unitframe', 'DesaturateIcon', L['Desaturate Debuffs'], true, nil, nil, L['Desaturate debuffs cast by others.']}, {1, 'Unitframe', 'DebuffTypeColor', L['Debuffs Type Color'], nil, nil, nil, L['Color debuffs border by type.|nMagic is blue, Curse is purple, Poison is green, Disease is yellow, and others are red.']}, {1, 'Unitframe', 'StealableBuffs', L['Purgeable Buffs'], true, nil, nil, L['Display purgeable buffs.']}, {}, - {1, 'Unitframe', 'ClassPower', L['Class Power'], nil, SetupClassPowerSize, nil, L['Show special resources of the class, such as Combo Points, Holy Power, Chi, Runes, etc.']}, - {1, 'Unitframe', 'RunesTimer', L['Runes Timer'], true, nil, nil, L['Show timer for DK Runes.']}, - {}, {1, 'Unitframe', 'Castbar', L['Enable Castbar'], nil, SetupCastbarColor, nil, L['Uncheck this if you want to use other castbar addon.']}, {1, 'Unitframe', 'SeparateCastbar', L['Separate Castbar'], true, SetupCastbarSize, nil, L['If disabled, the castbar will be overlapped on the healthbar.|nNote that the spell name and time are only available with separate castbar.']}, {},