Skip to main content

Configuration Integration

The GUI Builder automatically integrates with Aurora's configuration system when you provide a key parameter to UI elements.

Key Required for Persistence

Without a key parameter, element values will not persist between sessions. Always provide a key if you want to save the value.

-- Value will NOT persist (resets on reload)
gui:Checkbox({
text = "Feature",
default = false
})

-- Value WILL persist
gui:Checkbox({
text = "Feature",
key = "feature.enabled", -- Key is required for persistence
default = false
})

Saving and Loading

gui:Checkbox({
text = "Enable Feature",
key = "feature.enabled", -- Config key
default = false -- Default value
})

When a key is provided:

  • The value is automatically loaded from saved configuration
  • Changes are automatically saved
  • The value persists between sessions
  • Profile system integration is automatic

Profile System

The GUI Builder automatically integrates with the profile system:

  • Values update when profiles change
  • Changes are saved to the current profile
  • Default values are used for new profiles

Example with Multiple Settings

gui:Category("Graphics")
:Tab("Quality")
:Checkbox({
text = "Enable Shadows",
key = "graphics.shadows",
default = true
})
:Slider({
text = "View Distance",
key = "graphics.viewDistance",
min = 1,
max = 10,
default = 5
})
:Dropdown({
text = "Texture Quality",
key = "graphics.textures",
options = {
{ text = "Low", value = "low" },
{ text = "High", value = "high" }
},
default = "high"
})