AROYN UI LIBRARY / CORE CONCEPTS
State management
Read current values, update silently and preserve ownership.
Handles are the source of UI state#
local enabled = section:CreateToggle({Name = "Enabled", Default = false})
enabled:SetValue(true)
print(enabled:GetValue())
enabled:SetDisabled(true)
assert(enabled:IsDisabled())
enabled:SetValue(false) -- programmatic setters remain availableCopy semantics#
GetOptions and multi GetValue return independent arrays. Modifying a returned array does not mutate the control. Pass a new value to SetValue to apply an update. Multi selections are filtered, deduplicated and ordered by Options.
local selected = multi:GetValue()
table.insert(selected, "Pets")
multi:SetValue(selected, true)Persistent and transient state#
| State | Persisted by configuration? |
|---|---|
| Registered value with Flag | Yes, unless Persist=false or Sensitive=true. |
| Keybind key and mode | Yes; active/pressed state is excluded. |
| Popup open state, focus, drag | No. |
| Notification or dialog request | No. |
| Window position and page selection | Not part of the configuration schema. |
Destruction and replacement#
Navigation preserves controls; destruction ends their lifetime. A replacement flagged control can reuse the key after the previous owner is destroyed. A rerun with the same standalone Id replaces the old UI, not your application’s external connections.