Added option for arena colors
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -465,11 +465,6 @@ function Details:StartMeUp() --I'll never stop!
|
||||
--coach feature startup
|
||||
Details.Coach.StartUp()
|
||||
|
||||
--make the green color in arena be purple
|
||||
Details.class_colors.ARENA_GREEN[1] = 175/255 --r
|
||||
Details.class_colors.ARENA_GREEN[2] = 98/255 --g
|
||||
Details.class_colors.ARENA_GREEN[3] = 255/255 --b
|
||||
|
||||
--force the group edit be always enabled when Details! starts
|
||||
_detalhes.options_group_edit = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user