Skip to content

Commit

Permalink
Merge pull request #729 from robertthepie/Modoptions-Mutliple-Inline-…
Browse files Browse the repository at this point in the history
…Booleans

Modoptions panel: subheaders
  • Loading branch information
Damgam authored Jul 15, 2024
2 parents 8c60dbc + 831946a commit 8e3a12c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions LuaMenu/widgets/gui_modoptions_panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,31 @@ local function ProcessStringOption(data, index)
}
end

local function ProcessSubHeaderFakeOption(data, index)
local label = Label:New {
x = 280,
y = 0,
width = 1200,
height = 30,
valign = "center",
align = "left",
caption = data.name,
objectOverrideFont = WG.Chobby.Configuration:GetFont(2),
tooltip = data.desc,
}
return Control:New {
x = 0,
y = index*32,
width = 1600,
height = 32,
padding = {0, 0, 0, 0},
tooltip = data.desc,
children = {
label
}
}
end

local function PopulateTab(options)
-- list = combobox
-- bool = tickbox
Expand All @@ -339,6 +364,8 @@ local function PopulateTab(options)
contentsPanel:AddChild(ProcessNumberOption(data, #contentsPanel.children))
elseif data.type == "string" then
contentsPanel:AddChild(ProcessStringOption(data, #contentsPanel.children))
elseif data.type == "subheader" then
contentsPanel:AddChild(ProcessSubHeaderFakeOption(data, #contentsPanel.children))
end
end
return {contentsPanel}
Expand Down

0 comments on commit 8e3a12c

Please sign in to comment.