AROYN UI LIBRARY / CORE CONCEPTS

Windows

Create a standalone window or attach the library to a host you own.

CreateWindow#

LUAU
local window = Aroyn:CreateWindow({Parent = parent, Id = "preferences", Title = "AROYN"})
OptionTypeDefaultBehavior
ParentInstanceRequiredCaller-selected GUI parent.
Idstring"AroynUI"Nonempty. ScreenGui name becomes AroynUI_<Id>.
Titlestring"AROYN"Nonempty header title.
SizeUDim2fromOffset(680, 440)Native dimensions; minimum width 440px.
Logostring?nilReady image URI; also used by the floating launcher.
Configtable?nilConfiguration 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.

LUAU
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,
})
OptionTypeDefaultBehavior
RootGuiObjectRequiredExternal window root; stays owned by the caller.
ContentGuiObjectRequiredContainer for library pages.
NavigationScrollingFrame?nilOptional rail receiving navigation buttons.
OnSelectPagefunction(string)?nilSelection callback; not called for the automatic first page.
PagePositionUDim2fromOffset(12, 12)Page origin inside Content.
PageSizeUDim2new(1, -24, 1, -24)Page bounds; reserve your own footer space.
PageHeaderbooleantrueShow the page name inside the page.
Configtable?nilSame configuration options as CreateWindow.

Window methods#

MethodReturnsPurpose
CreatePage(options)PageCreates a uniquely named page.
SelectPage(name, notify?)PageSelects it; false suppresses the AttachWindow selection callback.
SetMinimized(boolean)selfStandalone only. The host owns minimize for AttachWindow.
Notify(options)ToastShows or queues a notification.
Dialog(options)DialogShows or queues a modal.
Destroy()nilIdempotent 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.