diff --git a/api/config.lua b/api/config.lua index 012fcbfe..0e676b15 100644 --- a/api/config.lua +++ b/api/config.lua @@ -219,7 +219,8 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", nil, "druidmanaheight", "2") pfUI:UpdateConfig("unitframes", nil, "druidmanatext", "0") pfUI:UpdateConfig("unitframes", nil, "rangechecki", "4") - pfUI:UpdateConfig("unitframes", nil, "combosize", "6") + pfUI:UpdateConfig("unitframes", nil, "combowidth", "6") + pfUI:UpdateConfig("unitframes", nil, "comboheight", "6") pfUI:UpdateConfig("unitframes", nil, "abbrevnum", "1") pfUI:UpdateConfig("unitframes", nil, "abbrevname", "1") @@ -1248,5 +1249,15 @@ function pfUI:MigrateConfig() end end + -- migrate combopoint size to separate settings + if checkversion(5, 4, 18) then + if pfUI_config.unitframes.combosize then + pfUI_config.unitframes.combowidth = pfUI_config.unitframes.combosize + pfUI_config.unitframes.comboheight = pfUI_config.unitframes.combosize + pfUI_config.unitframes.combosize = nil + end + end + + pfUI_config.version = pfUI.version.string end diff --git a/modules/combopoints.lua b/modules/combopoints.lua index 1878ddbf..f874974e 100644 --- a/modules/combopoints.lua +++ b/modules/combopoints.lua @@ -6,20 +6,21 @@ pfUI:RegisterModule("combopoints", "vanilla:tbc", function () ComboFrame:UnregisterAllEvents() local _, class = UnitClass("player") - local combo_size = C["unitframes"]["combosize"] + local combo_width = C["unitframes"]["combowidth"] + local combo_height = C["unitframes"]["comboheight"] pfUI.combopoints = {} for point = 1, 5 do pfUI.combopoints[point] = CreateFrame("Frame", "pfCombo" .. point, UIParent) pfUI.combopoints[point]:SetFrameStrata("HIGH") - pfUI.combopoints[point]:SetWidth(combo_size) - pfUI.combopoints[point]:SetHeight(combo_size) + pfUI.combopoints[point]:SetWidth(combo_width) + pfUI.combopoints[point]:SetHeight(combo_height) pfUI.combopoints[point]:Hide() if pfUI.uf.target then - pfUI.combopoints[point]:SetPoint("TOPLEFT", pfUI.uf.target, "TOPRIGHT", border*3, -(point - 1) * (combo_size + border*3)) + pfUI.combopoints[point]:SetPoint("TOPLEFT", pfUI.uf.target, "TOPRIGHT", border*3, -(point - 1) * (combo_height + border*3)) else - pfUI.combopoints[point]:SetPoint("CENTER", UIParent, "CENTER", (point - 3) * (combo_size + border*3), 10 ) + pfUI.combopoints[point]:SetPoint("CENTER", UIParent, "CENTER", (point - 3) * (combo_width + border*3), 10 ) end pfUI.combopoints[point].tex = pfUI.combopoints[point]:CreateTexture("OVERLAY") diff --git a/modules/gui.lua b/modules/gui.lua index b1391ed4..70fbda58 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1606,7 +1606,8 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, T["Always Use 2D Portraits"], C.unitframes, "always2dportrait", "checkbox") CreateConfig(nil, T["Enable 2D Portraits As Fallback"], C.unitframes, "portraittexture", "checkbox") CreateConfig(nil, T["Unit Frame Layout"], C.unitframes, "layout", "dropdown", pfUI.gui.dropdowns.uf_layout) - CreateConfig(nil, T["Combopoint Size"], C.unitframes, "combosize") + CreateConfig(nil, T["Combopoint Width"], C.unitframes, "combowidth") + CreateConfig(nil, T["Combopoint Height"], C.unitframes, "comboheight") CreateConfig(nil, T["Show Resting"], C.unitframes.player, "showRest", "checkbox") CreateConfig(nil, T["Enable Energy Ticks"], C.unitframes.player, "energy", "checkbox") CreateConfig(nil, T["Enable Mana Ticks"], C.unitframes.player, "manatick", "checkbox")