from retail

This commit is contained in:
NoM0Re
2025-01-08 16:32:09 +01:00
parent 988145737d
commit e5938f813d
7 changed files with 173 additions and 15 deletions
+7 -1
View File
@@ -885,15 +885,18 @@ local getHelper = {
local function CreateGetAll(subOption)
return function(data, info, ...)
local isToggle = nil
local isColor = nil
local allChildren = CopyTable(getHelper)
local enabledChildren = CopyTable(getHelper)
for child in OptionsPrivate.Private.TraverseLeafs(data) do
if isToggle == nil then
if isToggle == nil or isColor == nil then
local childOptions = getChildOption(OptionsPrivate.EnsureOptions(child, subOption), info)
isToggle = childOptions and childOptions.type == "toggle"
isColor = childOptions and childOptions.type == "color"
end
local childOptions = OptionsPrivate.EnsureOptions(child, subOption)
local childOption = childOptions;
local childOptionTable = {[0] = childOption};
@@ -915,6 +918,9 @@ local function CreateGetAll(subOption)
end
if not allChildren:GetSame() and not enabledChildren:GetSame() then
if isColor then
return 0, 0, 0, 1
end
return nil;
end
break;