Framework Update

This commit is contained in:
Tercio Jose
2024-07-30 16:06:39 -03:00
committed by andrew6180
parent 4c65968927
commit 534a39ced5
3 changed files with 55 additions and 11 deletions
+18 -1
View File
@@ -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
@@ -170,6 +175,14 @@ local createOptionHighlightFrame = function(frame, label, widgetWidth)
local backgroundTexture = highlightFrame:CreateTexture(nil, "artwork")
backgroundTexture:SetTexture(1, 1, 1)
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 +1068,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 +1338,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)
+36 -10
View File
@@ -1,6 +1,6 @@
local dversion = 553
local dversion = 555
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary(major, minor)
@@ -2618,8 +2618,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
@@ -2633,9 +2635,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",
@@ -2758,14 +2761,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"] = {
+1
View File
@@ -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