AROYN UI LIBRARY / CORE CONCEPTS
Windows
Create a standalone window or attach the library to a host you own.
CreateWindow#
local window = Aroyn:CreateWindow({Parent = parent, Id = "preferences", Title = "AROYN"})| Option | Type | Default | Behavior |
|---|---|---|---|
| Parent | Instance | Required | Caller-selected GUI parent. |
| Id | string | "AroynUI" | Nonempty. ScreenGui name becomes AroynUI_<Id>. |
| Title | string | "AROYN" | Nonempty header title. |
| Size | UDim2 | fromOffset(680, 440) | Native dimensions; minimum width 440px. |
| Logo | string? | nil | Ready image URI; also used by the floating launcher. |
| Config | table? | nil | Configuration options; initializes before controls. |
Attach to an existing window#
AttachWindow creates library pages inside supplied Root and Content objects. It does not create a title bar, footer or minimize controller. The host reserves space and owns its outer layout.
local window = Aroyn:AttachWindow({
Root = existingWindow, Content = existingBody,
Navigation = existingRail, -- optional ScrollingFrame
PageHeader = false,
PagePosition = UDim2.fromOffset(12, 12),
PageSize = UDim2.new(1, -24, 1, -24),
OnSelectPage = function(name) print("Selected:", name) end,
})| Option | Type | Default | Behavior |
|---|---|---|---|
| Root | GuiObject | Required | External window root; stays owned by the caller. |
| Content | GuiObject | Required | Container for library pages. |
| Navigation | ScrollingFrame? | nil | Optional rail receiving navigation buttons. |
| OnSelectPage | function(string)? | nil | Selection callback; not called for the automatic first page. |
| PagePosition | UDim2 | fromOffset(12, 12) | Page origin inside Content. |
| PageSize | UDim2 | new(1, -24, 1, -24) | Page bounds; reserve your own footer space. |
| PageHeader | boolean | true | Show the page name inside the page. |
| Config | table? | nil | Same configuration options as CreateWindow. |
Window methods#
| Method | Returns | Purpose |
|---|---|---|
| CreatePage(options) | Page | Creates a uniquely named page. |
| SelectPage(name, notify?) | Page | Selects it; false suppresses the AttachWindow selection callback. |
| SetMinimized(boolean) | self | Standalone only. The host owns minimize for AttachWindow. |
| Notify(options) | Toast | Shows or queues a notification. |
| Dialog(options) | Dialog | Shows or queues a modal. |
| Destroy() | nil | Idempotent cleanup. Config methods are listed separately. |
Ownership and replacement#
A new CreateWindow with the same Id under the same Parent replaces only a marked AroynUI-owned GUI. An unrelated object with the same name causes an error instead of being deleted. Reattaching to the same Root replaces the previous adapter and preserves the external Root/Content.