Skip to content

Commit

Permalink
Round of Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Nov 28, 2022
1 parent 06faed2 commit 8f6cfe4
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 41 deletions.
4 changes: 0 additions & 4 deletions Libs/DF/LibDFramework-1.0.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@
## Title: Lib: LibDFramework-1.0
## Notes: Base Framework for many Addons

#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@

load.xml
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
local addonName, Details222 = ...
local version, build, date, tocversion = GetBuildInfo()

_detalhes.build_counter = 10301
_detalhes.alpha_build_counter = 10301 --if this is higher than the regular counter, use it instead
_detalhes.build_counter = 10302
_detalhes.alpha_build_counter = 10302 --if this is higher than the regular counter, use it instead
_detalhes.dont_open_news = true
_detalhes.game_version = version
_detalhes.userversion = version .. " " .. _detalhes.build_counter
Expand Down
10 changes: 5 additions & 5 deletions core/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1606,21 +1606,21 @@
GameCooltip:SetOption("SparkTexture", [[Interface\Buttons\WHITE8X8]])
GameCooltip:SetOption("SparkWidth", 1)
GameCooltip:SetOption("SparkHeight", 20)
GameCooltip:SetOption("SparkColor", "gray")
GameCooltip:SetOption("SparkColor", Details.tooltip.divisor_color)
GameCooltip:SetOption("SparkAlpha", 0.15)
GameCooltip:SetOption("SparkPositionXOffset", 5)
--GameCooltip:SetOption("SparkAlpha", 0.3)
--GameCooltip:SetOption("SparkPositionXOffset", -2)


value = value or 100

if (not side) then
local r, g, b, a = unpack(Details.tooltip.background)
GameCooltip:AddStatusBar (value, 1, r, g, b, a, useSpark, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
local r, g, b, a = unpack(Details.tooltip.bar_color)
local rBG, gBG, bBG, aBG = unpack(Details.tooltip.background)
GameCooltip:AddStatusBar (value, 1, r, g, b, a, useSpark, {value = 100, color = {rBG, gBG, bBG, aBG}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})

else
GameCooltip:AddStatusBar (value, 2, unpack(Details.tooltip.background))
GameCooltip:AddStatusBar (value, 2, unpack(Details.tooltip.bar_color))
end
end

Expand Down
6 changes: 3 additions & 3 deletions frames/window_classcolor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
--config class colors
function Details:OpenClassColorsConfig()
if (not _G.DetailsClassColorManager) then
DF:CreateSimplePanel(UIParent, 300, 425, Loc ["STRING_OPTIONS_CLASSCOLOR_MODIFY"], "DetailsClassColorManager")
DF:CreateSimplePanel(UIParent, 300, 455, Loc ["STRING_OPTIONS_CLASSCOLOR_MODIFY"], "DetailsClassColorManager")
local panel = _G.DetailsClassColorManager

DF:ApplyStandardBackdrop(panel)
Expand Down Expand Up @@ -191,10 +191,10 @@ function Details:OpenClassColorsConfig()
local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")

DetailsFramework:BuildMenu(panel, deathLogOptions, 5, -285, 700, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DetailsFramework:BuildMenu(panel, deathLogOptions, 5, -315, 700, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)

local deathLogColorsLabel = DF:CreateLabel(panel, "Colors on Death Log:", 12, "yellow")
deathLogColorsLabel:SetPoint("topleft", panel, "topleft", 5, -265)
deathLogColorsLabel:SetPoint("topleft", panel, "topleft", 5, -295)
end

for class, button in pairs(_G.DetailsClassColorManager.buttons) do
Expand Down
89 changes: 66 additions & 23 deletions frames/window_options2_sections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,9 @@ do
name = Loc ["STRING_OPTIONS_WC_CREATE"],
desc = Loc ["STRING_OPTIONS_WC_CREATE_DESC"],
},

{type = "blank"},

{--class colors
type = "execute",
func = function(self)
Expand Down Expand Up @@ -4259,6 +4262,32 @@ do
desc = Loc ["STRING_OPTIONS_TOOLTIPS_FONTSHADOW_DESC"],
},

{--text size
type = "range",
get = function() return _detalhes.tooltip.fontsize end,
set = function(self, fixedparam, value)
_detalhes.tooltip.fontsize = value
afterUpdate()
end,
min = 5,
max = 32,
step = 1,
name = Loc ["STRING_OPTIONS_TEXT_SIZE"],
desc = Loc ["STRING_OPTIONS_TEXT_SIZE_DESC"],
},

{--text font
type = "select",
get = function() return _detalhes.tooltip.fontface end,
values = function()
return buildTooltipFontOptions()
end,
name = Loc ["STRING_OPTIONS_TEXT_FONT"],
desc = Loc ["STRING_OPTIONS_TEXT_FONT_DESC"],
},

{type = "blank"},

{type = "label", get = function() return Loc["STRING_OPTIONS_TOOLTIPS_FONTCOLOR"] end},

{--text color left
Expand Down Expand Up @@ -4315,33 +4344,27 @@ do
desc = Loc ["STRING_OPTIONS_TOOLTIPS_ANCHORCOLOR"],
},

{--text size
type = "range",
get = function() return _detalhes.tooltip.fontsize end,
set = function(self, fixedparam, value)
_detalhes.tooltip.fontsize = value
afterUpdate()
end,
min = 5,
max = 32,
step = 1,
name = Loc ["STRING_OPTIONS_TEXT_SIZE"],
desc = Loc ["STRING_OPTIONS_TEXT_SIZE_DESC"],
},
{type = "blank"},
{type = "label", get = function() return Loc ["STRING_OPTIONS_MENU_ATTRIBUTESETTINGS_ANCHOR"] end, text_template = subSectionTitleTextTemplate},

{--text font
type = "select",
get = function() return _detalhes.tooltip.fontface end,
values = function()
return buildTooltipFontOptions()
{--bar color
type = "color",
get = function()
local r, g, b, a = unpack(_detalhes.tooltip.bar_color)
return {r, g, b, a}
end,
name = Loc ["STRING_OPTIONS_TEXT_FONT"],
desc = Loc ["STRING_OPTIONS_TEXT_FONT_DESC"],
set = function(self, r, g, b, a)
local color = _detalhes.tooltip.bar_color
color[1] = r
color[2] = g
color[3] = b
color[4] = a
afterUpdate()
end,
name = "Bar Color",
desc = "Bar Color",
},

{type = "blank"},
{type = "label", get = function() return Loc ["STRING_OPTIONS_MENU_ATTRIBUTESETTINGS_ANCHOR"] end, text_template = subSectionTitleTextTemplate},

{--background color
type = "color",
get = function()
Expand All @@ -4360,6 +4383,26 @@ do
desc = Loc ["STRING_OPTIONS_TOOLTIPS_BACKGROUNDCOLOR"],
},

{--divisor color
type = "color",
get = function()
local r, g, b, a = unpack(_detalhes.tooltip.divisor_color)
return {r, g, b, a}
end,
set = function(self, r, g, b, a)
local color = _detalhes.tooltip.divisor_color
color[1] = r
color[2] = g
color[3] = b
color[4] = a
afterUpdate()
end,
name = "Divisor Color",
desc = "Divisor Color",
},

{type = "blank"},

{--show amount
type = "toggle",
get = function() return _detalhes.tooltip.show_amount end,
Expand Down
10 changes: 6 additions & 4 deletions functions/profiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -853,9 +853,9 @@ local default_profile = {
--0.2000,
--0.4980,
--0.5764,
0.20000001788139,
0.57647061347961,
0.49803924560547,
0.2000,
0.5764,
0.4980,
},
},

Expand Down Expand Up @@ -1103,7 +1103,9 @@ local default_profile = {
fontcolor = {1, 1, 1, 1},
fontcolor_right = {1, 0.7, 0, 1}, --{1, 0.9254, 0.6078, 1}
fontshadow = false,
background = {0.1960, 0.1960, 0.1960, 0.8697},
bar_color = {0.3960, 0.3960, 0.3960, 0.8700},
background = {0.0941, 0.0941, 0.0941, 0.8},
divisor_color = {1, 1, 1, 1},
abbreviation = 2, -- 2 = ToK I Upper 5 = ToK I Lower -- was 8
maximize_method = 1,
show_amount = false,
Expand Down

0 comments on commit 8f6cfe4

Please sign in to comment.