AROYN UI LIBRARY / CORE CONCEPTS

State management

Read current values, update silently and preserve ownership.

Handles are the source of UI state#

LUAU
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 available

Copy 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.

LUAU
local selected = multi:GetValue()
table.insert(selected, "Pets")
multi:SetValue(selected, true)

Persistent and transient state#

StatePersisted by configuration?
Registered value with FlagYes, unless Persist=false or Sensitive=true.
Keybind key and modeYes; active/pressed state is excluded.
Popup open state, focus, dragNo.
Notification or dialog requestNo.
Window position and page selectionNot 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.

Configuration managerNamed persistence and deferred flags.Cleanup & destructionApplication subscriptions remain your responsibility.