mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 21:20:00 +00:00
Add spell name & timer text alignment options for unit frame castbars
Adds per-unit (player/target/focus) dropdowns to align the castbar spell name (left text) and cast timer (right text) Left/Center/Right. Both share a castbaralign dropdown; defaults preserve current behavior (name LEFT, timer RIGHT). Applied at castbar creation, so takes effect on /reload like the other castbar options.
This commit is contained in:
@@ -717,6 +717,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("castbar", "player", "mergetradeskill", "1")
|
||||
pfUI:UpdateConfig("castbar", "player", "txtrightoffx", "0")
|
||||
pfUI:UpdateConfig("castbar", "player", "txtrightoffy", "0")
|
||||
pfUI:UpdateConfig("castbar", "player", "namealign", "LEFT")
|
||||
pfUI:UpdateConfig("castbar", "player", "timealign", "RIGHT")
|
||||
pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0")
|
||||
pfUI:UpdateConfig("castbar", "target", "width", "-1")
|
||||
pfUI:UpdateConfig("castbar", "target", "height", "-1")
|
||||
@@ -729,6 +731,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("castbar", "target", "showrank", "0")
|
||||
pfUI:UpdateConfig("castbar", "target", "txtrightoffx", "0")
|
||||
pfUI:UpdateConfig("castbar", "target", "txtrightoffy", "0")
|
||||
pfUI:UpdateConfig("castbar", "target", "namealign", "LEFT")
|
||||
pfUI:UpdateConfig("castbar", "target", "timealign", "RIGHT")
|
||||
pfUI:UpdateConfig("castbar", "focus", "hide_pfui", "0")
|
||||
pfUI:UpdateConfig("castbar", "focus", "width", "-1")
|
||||
pfUI:UpdateConfig("castbar", "focus", "height", "-1")
|
||||
@@ -741,6 +745,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("castbar", "focus", "showrank", "0")
|
||||
pfUI:UpdateConfig("castbar", "focus", "txtrightoffx", "0")
|
||||
pfUI:UpdateConfig("castbar", "focus", "txtrightoffy", "0")
|
||||
pfUI:UpdateConfig("castbar", "focus", "namealign", "LEFT")
|
||||
pfUI:UpdateConfig("castbar", "focus", "timealign", "RIGHT")
|
||||
pfUI:UpdateConfig("castbar", nil, "use_unitfonts", "0")
|
||||
|
||||
pfUI:UpdateConfig("tooltip", nil, "position", "chat")
|
||||
|
||||
Vendored
+2
@@ -750,6 +750,7 @@ pfUI_translation["enUS"] = {
|
||||
["Show Totems Indicators"] = nil,
|
||||
["Shrink & Return"] = nil,
|
||||
["Size"] = nil,
|
||||
["Spell Name Alignment"] = nil,
|
||||
["Skin"] = nil,
|
||||
["Skins"] = nil,
|
||||
["Slow"] = nil,
|
||||
@@ -798,6 +799,7 @@ pfUI_translation["enUS"] = {
|
||||
["Threshold To Trust Health Estimation"] = nil,
|
||||
["Time"] = nil,
|
||||
["Timer"] = nil,
|
||||
["Timer Alignment"] = nil,
|
||||
["Time Remaining"] = nil,
|
||||
["Timer In Minutes"] = nil,
|
||||
["Timestamp Brackets"] = nil,
|
||||
|
||||
+2
-2
@@ -193,7 +193,7 @@ pfUI:RegisterModule("castbar", function ()
|
||||
cb.bar.left:SetFontObject(GameFontWhite)
|
||||
cb.bar.left:SetTextColor(1,1,1,1)
|
||||
cb.bar.left:SetFont(font, font_size, "OUTLINE")
|
||||
cb.bar.left:SetJustifyH("left")
|
||||
cb.bar.left:SetJustifyH(C.castbar[unitstr].namealign or "LEFT")
|
||||
|
||||
-- text right
|
||||
cb.bar.right = cb.bar:CreateFontString("Status", "DIALOG", "GameFontNormal")
|
||||
@@ -204,7 +204,7 @@ pfUI:RegisterModule("castbar", function ()
|
||||
cb.bar.right:SetFontObject(GameFontWhite)
|
||||
cb.bar.right:SetTextColor(1,1,1,1)
|
||||
cb.bar.right:SetFont(font, font_size, "OUTLINE")
|
||||
cb.bar.right:SetJustifyH("right")
|
||||
cb.bar.right:SetJustifyH(C.castbar[unitstr].timealign or "RIGHT")
|
||||
|
||||
cb.bar.lag = cb.bar:CreateTexture(nil, "OVERLAY")
|
||||
cb.bar.lag:SetPoint("TOPRIGHT", cb.bar, "TOPRIGHT", 0, 0)
|
||||
|
||||
@@ -912,6 +912,11 @@ pfUI:RegisterModule("gui", function ()
|
||||
"1:" .. T["1 Decimal (2.1)"],
|
||||
"2:" .. T["2 Decimals (2.14)"],
|
||||
},
|
||||
["castbaralign"] = {
|
||||
"LEFT:" .. T["Left"],
|
||||
"CENTER:" .. T["Center"],
|
||||
"RIGHT:" .. T["Right"],
|
||||
},
|
||||
["orientation"] = {
|
||||
"HORIZONTAL:" .. T["Horizontal"],
|
||||
"VERTICAL:" .. T["Vertical"],
|
||||
@@ -2788,7 +2793,9 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(nil, T["Castbar Height"], C.castbar.player, "height")
|
||||
CreateConfig(nil, T["Show Spell Icon"], C.castbar.player, "showicon", "checkbox")
|
||||
CreateConfig(nil, T["Show Spell Name"], C.castbar.player, "showname", "checkbox")
|
||||
CreateConfig(nil, T["Spell Name Alignment"], C.castbar.player, "namealign", "dropdown", pfUI.gui.dropdowns.castbaralign)
|
||||
CreateConfig(nil, T["Show Timer"], C.castbar.player, "showtimer", "checkbox")
|
||||
CreateConfig(nil, T["Timer Alignment"], C.castbar.player, "timealign", "dropdown", pfUI.gui.dropdowns.castbaralign)
|
||||
CreateConfig(nil, T["Left Text X Offset"], C.castbar.player, "txtleftoffx")
|
||||
CreateConfig(nil, T["Left Text Y Offset"], C.castbar.player, "txtleftoffy")
|
||||
CreateConfig(nil, T["Show Lag"], C.castbar.player, "showlag", "checkbox")
|
||||
@@ -2803,7 +2810,9 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(nil, T["Castbar Height"], C.castbar.target, "height")
|
||||
CreateConfig(nil, T["Show Spell Icon"], C.castbar.target, "showicon", "checkbox")
|
||||
CreateConfig(nil, T["Show Spell Name"], C.castbar.target, "showname", "checkbox")
|
||||
CreateConfig(nil, T["Spell Name Alignment"], C.castbar.target, "namealign", "dropdown", pfUI.gui.dropdowns.castbaralign)
|
||||
CreateConfig(nil, T["Show Timer"], C.castbar.target, "showtimer", "checkbox")
|
||||
CreateConfig(nil, T["Timer Alignment"], C.castbar.target, "timealign", "dropdown", pfUI.gui.dropdowns.castbaralign)
|
||||
CreateConfig(nil, T["Left Text X Offset"], C.castbar.target, "txtleftoffx")
|
||||
CreateConfig(nil, T["Left Text Y Offset"], C.castbar.target, "txtleftoffy")
|
||||
CreateConfig(nil, T["Show Lag"], C.castbar.target, "showlag", "checkbox")
|
||||
@@ -2817,7 +2826,9 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(nil, T["Castbar Height"], C.castbar.focus, "height")
|
||||
CreateConfig(nil, T["Show Spell Icon"], C.castbar.focus, "showicon", "checkbox")
|
||||
CreateConfig(nil, T["Show Spell Name"], C.castbar.focus, "showname", "checkbox")
|
||||
CreateConfig(nil, T["Spell Name Alignment"], C.castbar.focus, "namealign", "dropdown", pfUI.gui.dropdowns.castbaralign)
|
||||
CreateConfig(nil, T["Show Timer"], C.castbar.focus, "showtimer", "checkbox")
|
||||
CreateConfig(nil, T["Timer Alignment"], C.castbar.focus, "timealign", "dropdown", pfUI.gui.dropdowns.castbaralign)
|
||||
CreateConfig(nil, T["Left Text X Offset"], C.castbar.focus, "txtleftoffx")
|
||||
CreateConfig(nil, T["Left Text Y Offset"], C.castbar.focus, "txtleftoffy")
|
||||
CreateConfig(nil, T["Show Lag"], C.castbar.focus, "showlag", "checkbox")
|
||||
|
||||
Reference in New Issue
Block a user