Framework update, preparing to release

This commit is contained in:
Tercio Jose
2024-04-23 21:25:34 -03:00
parent 3d226dbf60
commit 58644cda46
17 changed files with 358 additions and 56 deletions
+12 -1
View File
@@ -103,6 +103,14 @@ local onWidgetSetInUse = function(widget, widgetTable)
widget.childrenids = widgetTable.childrenids
end
widget.children_follow_enabled = widgetTable.children_follow_enabled
if (widgetTable.disabled) then
widget:Disable()
else
if (not widget:IsEnabled()) then
widget:Enable()
end
end
end
local setWidgetId = function(parent, widgetTable, widgetObject)
@@ -367,15 +375,18 @@ local setRangeProperties = function(parent, widget, widgetTable, currentXOffset,
widget.bAttachButtonsToLeft = bAttachSliderButtonsToLeft
local currentValue = widgetTable.get()
if (bIsDecimals) then
widget.slider:SetValueStep(0.01)
else
widget.slider:SetValueStep(widgetTable.step or 1)
currentValue = math.floor(currentValue)
end
widget.useDecimals = bIsDecimals
widget.slider:SetMinMaxValues(widgetTable.min, widgetTable.max)
widget.slider:SetValue(widgetTable.get() or 0)
widget.slider:SetValue(currentValue or 0)
widget.ivalue = widget.slider:GetValue()
if (widgetWidth) then