mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-09 07:00:00 +00:00
combopoints: custom width and height
based on: https://github.com/shagu/pfUI/pull/1493
This commit is contained in:
@@ -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")
|
||||
|
||||
+2
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user