AROYN UI LIBRARY / CORE CONCEPTS
Pages
Stable navigation destinations with independent sections and preserved state.
Create a page#
local general = window:CreatePage({Name = "General", Icon = "components"})
local settings = window:CreatePage({Name = "Settings", Icon = "settings"})
window:SelectPage("Settings")
general:Select()| Option | Type | Default | Behavior |
|---|---|---|---|
| Name | string | Required | Nonempty and unique within this window. Also the visible heading. |
| Icon | string | "components" | One of the seven supported atlas keys. |
Methods#
| Method | Returns | Behavior |
|---|---|---|
| CreateSection({Title = ...}) | Section | Adds an owned section. |
| Select() | Page | Selects this page. |
| Destroy() | nil | Removes its sections and listeners. A standalone window selects another remaining page. |
Navigation and state#
Pages are created once. Their values and scroll state survive switching. Inactive pages cannot accept user input. Navigation closes the current Dropdown/ColorPicker and cancels dialogs with page_changed; notifications remain visible across ordinary page changes.
Icon mapping#
| Key | Intended use |
|---|---|
| cart | Purchasing |
| plot | Plant / plot |
| compost | Compost / material |
| market | Storefront / market |
| settings | Preferences in the original UI Lab mapping |
| pets | Pet controls |
| components | Component showcase / general tools |
Use the library’s seven-cell atlas. The Settings key describes the core mapping; the game integration’s later gear/ten-icon hotfix is a separate asset system. There is no free-form asset option on CreatePage.
Create an icon directly#
-- Set Aroyn.IconAtlas to an already registered, compatible image URI first.
local icon = Aroyn:CreateIcon(existingContainer, "cart", 24, Aroyn.Theme.Colors.TextMuted)CreateIcon(parent, key, size?, tint?) returns an ImageLabel. Default size is 24; default tint is Theme.Colors.TextMuted. Unknown keys assert. The returned image is distinct from a component handle.