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)