-
Notifications
You must be signed in to change notification settings - Fork 44
Dropdown Sections #59
Description
Dropdown Sections
Implementation:
Section Types: Extend the existing section creation mechanism to support a “Type” property.
"Regular" creates a standard, non-collapsible section.
"Dropdown" creates a collapsible section that initially hides its contents.
Collapsibility Control: Implement a mechanism to allow users to expand or collapse Dropdown sections.
UI Element Creation: UI elements will be created using the existing functions to ensure consistency.
Visibility Management: Dropdown sections manage the visibility of their child elements with a table called Elements.
Label Flexibility The section's Title text parameter and the Elements objects parameters will hold the value of the "Title" and "Text" field.
Example Implementations:
-- Regular Section Example
local RegularSection = Tabs.Main:Section("Regular Settings")
Title = "Regular Settings" -- Label of the Section
Type = "Regular"
local ShowPlayerNames = RegularSection:Toggle("PlayerNames", {
Text = "Show Player Names", -- Label of the toggle
Default = true,
Callback = function(Value)
print("Hello")
end
})
-- Dropdown Section Example
local AdvancedSettingsSection = Tabs.Main:Section("AdvancedSettings")
Title = "Advanced Settings" -- Label of the Section
Type = "Dropdown"
Collapsed = true -- Start Collapsed by Default.
------- Create a button to allow visibility of Sections, ------
local AntiAliasToggle = AdvancedSettingsSection:Toggle("AntiAlias", {
Text = "Enable Anti-Aliasing", -- Label of the toggle
Default = true,
Callback = function(Value)
-- Logic to enable Anti-Aliasing
end
})
If u need a Example
DM me on Discord
Discord: havoc06946