diff --git a/Libs/DF/buildmenu.lua b/Libs/DF/buildmenu.lua index 7b7351baa..fc3928dcb 100644 --- a/Libs/DF/buildmenu.lua +++ b/Libs/DF/buildmenu.lua @@ -141,11 +141,16 @@ local onLeaveHighlight = function(self) end end +--control the highlight color, if true, use color one, if false, use color two +--color one: .2, .2, .2, 0.5 +--color two: .3, .3, .3, 0.5 +local bHighlightColorOne = true + ---create a button and a texture to highlight the button when the mouse is over it ---the button has the dimentions of the label and the widget ---@param frame frame ---@param label fontstring ----@param widgetWidth nunmber +---@param widgetWidth number ---@return unknown local createOptionHighlightFrame = function(frame, label, widgetWidth) frame = frame.widget or frame @@ -163,13 +168,22 @@ local createOptionHighlightFrame = function(frame, label, widgetWidth) local highlightTexture = highlightFrame:CreateTexture(nil, "overlay") highlightTexture:SetColorTexture(1, 1, 1, 0.1) + PixelUtil.SetPoint(highlightTexture, "topleft", highlightFrame, "topleft", 0, 0) PixelUtil.SetPoint(highlightTexture, "bottomright", highlightFrame, "bottomright", 0, 0) highlightTexture:Hide() local backgroundTexture = highlightFrame:CreateTexture(nil, "artwork") - backgroundTexture:SetColorTexture(1, 1, 1) + backgroundTexture:SetColorTexture(1, 1, 1, 0.5) backgroundTexture:SetVertexColor(.25, .25, .25, 0.5) + + if (bHighlightColorOne) then + backgroundTexture:SetVertexColor(.2, .2, .2, 0.5) + else + backgroundTexture:SetVertexColor(.25, .25, .25, 0.5) + end + bHighlightColorOne = not bHighlightColorOne + PixelUtil.SetPoint(backgroundTexture, "topleft", highlightFrame, "topleft", 0, 0) PixelUtil.SetPoint(backgroundTexture, "bottomright", highlightFrame, "bottomright", 0, 0) @@ -1055,6 +1069,8 @@ function detailsFramework:BuildMenuVolatile(parent, menuOptions, xOffset, yOffse end detailsFramework:ClearOptionsPanel(parent) + bHighlightColorOne = true + local amountLineWidgetAdded = 0 local biggestColumnHeight = 0 --used to resize the scrollbox child when a scrollbox is passed local latestInlineWidget @@ -1323,6 +1339,8 @@ function detailsFramework:BuildMenu(parent, menuOptions, xOffset, yOffset, heigh local maxColumnWidth = 0 --biggest width of widget + text size on the current column loop pass local maxWidgetWidth = 0 --biggest widget width on the current column loop pass + bHighlightColorOne = true + --parse settings and the options table parseOptionsTypes(menuOptions) diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 361a7720b..d41464aa6 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 554 +local dversion = 555 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary(major, minor) @@ -2914,8 +2914,10 @@ end --DF.font_templates ["ORANGE_FONT_TEMPLATE"] = {color = "orange", size = 11, font = "Accidental Presidency"} --DF.font_templates ["OPTIONS_FONT_TEMPLATE"] = {color = "yellow", size = 12, font = "Accidental Presidency"} -DF.font_templates["ORANGE_FONT_TEMPLATE"] = {color = "orange", size = 10, font = DF:GetBestFontForLanguage()} -DF.font_templates["OPTIONS_FONT_TEMPLATE"] = {color = "yellow", size = 9.6, font = DF:GetBestFontForLanguage()} +--DF.font_templates["ORANGE_FONT_TEMPLATE"] = {color = "orange", size = 10, font = DF:GetBestFontForLanguage()} +DF.font_templates["ORANGE_FONT_TEMPLATE"] = {color = {1, 0.8235, 0, 1}, size = 12, font = DF:GetBestFontForLanguage()} +--DF.font_templates["OPTIONS_FONT_TEMPLATE"] = {color = "yellow", size = 9.6, font = DF:GetBestFontForLanguage()} +DF.font_templates["OPTIONS_FONT_TEMPLATE"] = {color = {1, 1, 1, 0.9}, size = 9.6, font = DF:GetBestFontForLanguage()} DF.font_templates["SMALL_SILVER"] = {color = "silver", size = 9, font = DF:GetBestFontForLanguage()} --dropdowns @@ -2929,9 +2931,10 @@ DF.dropdown_templates["OPTIONS_DROPDOWN_TEMPLATE"] = { tile = true }, - backdropcolor = {0.1, 0.1, 0.1, .7}, + --backdropcolor = {0.1, 0.1, 0.1, .7}, + backdropcolor = {0.2, 0.2, 0.2, .7}, onentercolor = {0.3, 0.3, 0.3, .7}, - backdropbordercolor = {0, 0, 0, .7}, + backdropbordercolor = {0, 0, 0, .4}, onenterbordercolor = {0.3, 0.3, 0.3, 0.8}, dropicon = "Interface\\BUTTONS\\arrow-Down-Down", @@ -3054,14 +3057,37 @@ DF.button_templates["STANDARD_GRAY"] = { DF.slider_templates = DF.slider_templates or {} DF.slider_templates["OPTIONS_SLIDER_TEMPLATE"] = { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, - backdropcolor = {1, 1, 1, .5}, - backdropbordercolor = {0, 0, 0, 1}, - onentercolor = {1, 1, 1, .5}, - onenterbordercolor = {1, 1, 1, 1}, + + --original color wow10: + --backdropcolor = {1, 1, 1, .5}, + --backdropbordercolor = {0, 0, 0, 1}, + --onentercolor = {1, 1, 1, .5}, + --onenterbordercolor = {1, 1, 1, 1}, + + backdropcolor = {0.2, 0.2, 0.2, .7}, + onentercolor = {0.3, 0.3, 0.3, .7}, + backdropbordercolor = {0, 0, 0, .4}, --0.7 original alpha wow10 + onenterbordercolor = {0.3, 0.3, 0.3, 0.8}, + thumbtexture = [[Interface\Tooltips\UI-Tooltip-Background]], thumbwidth = 16, thumbheight = 14, - thumbcolor = {0, 0, 0, 0.5}, + --thumbcolor = {0, 0, 0, 0.5}, + thumbcolor = {.8, .8, .8, 0.5}, +} + +DF.slider_templates["OPTIONS_SLIDERDARK_TEMPLATE"] = { + backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, + + backdropcolor = {0.05, 0.05, 0.05, .7}, + onentercolor = {0.3, 0.3, 0.3, .7}, + backdropbordercolor = {0, 0, 0, 1}, + onenterbordercolor = {0, 0, 0, 1}, + + thumbtexture = [[Interface\Tooltips\UI-Tooltip-Background]], + thumbwidth = 24, + thumbheight = 14, + thumbcolor = {.8, .8, .8, 0.5}, } DF.slider_templates["MODERN_SLIDER_TEMPLATE"] = { diff --git a/Libs/DF/slider.lua b/Libs/DF/slider.lua index 3f991a903..0e21d3530 100644 --- a/Libs/DF/slider.lua +++ b/Libs/DF/slider.lua @@ -1170,6 +1170,7 @@ end --DF:Mixin(DFSliderMetaFunctions, DF.TooltipHandlerMixin) ---@class df_slider : slider, df_scripthookmixin, df_widgets +---@field tooltip string? ---@field widget slider ---@field slider slider ---@field type string