From 8f6cfe4d69065c33ff0610d7777faddfe1ffc4b7 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 28 Nov 2022 13:00:11 -0300 Subject: [PATCH] Round of Fixes --- Libs/DF/LibDFramework-1.0.toc | 4 -- boot.lua | 4 +- core/control.lua | 10 ++-- frames/window_classcolor.lua | 6 +- frames/window_options2_sections.lua | 89 +++++++++++++++++++++-------- functions/profiles.lua | 10 ++-- 6 files changed, 82 insertions(+), 41 deletions(-) diff --git a/Libs/DF/LibDFramework-1.0.toc b/Libs/DF/LibDFramework-1.0.toc index fdbe2af24..3981a1a97 100644 --- a/Libs/DF/LibDFramework-1.0.toc +++ b/Libs/DF/LibDFramework-1.0.toc @@ -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 diff --git a/boot.lua b/boot.lua index 60c3d6604..1c61fb1dc 100644 --- a/boot.lua +++ b/boot.lua @@ -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 diff --git a/core/control.lua b/core/control.lua index 85a168bb0..46e7e11d2 100644 --- a/core/control.lua +++ b/core/control.lua @@ -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 diff --git a/frames/window_classcolor.lua b/frames/window_classcolor.lua index 6de7f12bc..7db1fa41c 100644 --- a/frames/window_classcolor.lua +++ b/frames/window_classcolor.lua @@ -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) @@ -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 diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index 744d9ca40..2e2661a00 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -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) @@ -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 @@ -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() @@ -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, diff --git a/functions/profiles.lua b/functions/profiles.lua index aadfbbeb4..a1f1d6c5d 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -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, }, }, @@ -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,