Added option for arena colors

This commit is contained in:
Tercio Jose
2021-05-19 20:23:16 -03:00
parent eba3036d02
commit 4882b39a2c
3 changed files with 37 additions and 6 deletions
+3
View File
@@ -389,6 +389,9 @@ function Details:CreateCurrentDpsFrame(parent, name)
labelYellowTeam_DPS:SetPoint ("right", barFrame.splitBar.widget, "right", -4, 0)
function f.SwapArenaTeamColors()
green_team_color = Details.class_colors.ARENA_GREEN
yellow_team_color = Details.class_colors.ARENA_YELLOW
if (f.PlayerTeam == 0) then
labelPlayerTeam:SetTextColor (unpack (yellow_team_color))
labelYellowTeam:SetTextColor (unpack (green_team_color))
+34 -1
View File
@@ -1327,6 +1327,39 @@ do
desc = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"],
},
{type = "blank"},
{type = "label", get = function() return "Arena Team Color" end, text_template = subSectionTitleTextTemplate},
{--team 1 color
type = "color",
get = function()
local r, g, b = unpack(Details.class_colors.ARENA_GREEN)
return {r, g, b, 1}
end,
set = function (self, r, g, b, a)
Details.class_colors.ARENA_GREEN[1] = r
Details.class_colors.ARENA_GREEN[2] = g
Details.class_colors.ARENA_GREEN[3] = b
afterUpdate()
end,
name = Loc ["STRING_COLOR"],
desc = "Arena team color",
},
{--team 2 color
type = "color",
get = function()
local r, g, b = unpack(Details.class_colors.ARENA_YELLOW)
return {r, g, b, 1}
end,
set = function (self, r, g, b, a)
Details.class_colors.ARENA_YELLOW[1] = r
Details.class_colors.ARENA_YELLOW[2] = g
Details.class_colors.ARENA_YELLOW[3] = b
afterUpdate()
end,
name = Loc ["STRING_COLOR"],
desc = "Arena team color",
},
{type = "breakline"},
{type = "label", get = function() return Loc ["STRING_OPTIONS_TEXT_ROWICONS_ANCHOR"] end, text_template = subSectionTitleTextTemplate},
@@ -1530,7 +1563,7 @@ do
},
}
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+20, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)