LogoObsidian

Window

The Window object is your base UI container. It hosts tabs, groupboxes and mostly everything else driven by the library.


Window

Obsidian

The Window object is your base UI container. It hosts tabs, groupboxes and mostly everything else driven by the library. The next step to using the library is to create a tab inside the window.

Usage

Create a window with Library:CreateWindow() and override any defaults you need:

local Window = Library:CreateWindow({
    Title = "mspaint",
    Footer = "version: example",
    Icon = 95816097006870,
    NotifySide = "Right",
})

Prop

Type

ChangeTitle

Changes the title of the window.

Window:ChangeTitle("New Title")
Arg IdxArgument DescriptionTypeDefault
1The new title of the windowstringnil

SetFooter

Changes the footer of the window.

Window:SetFooter("New Footer")
Arg IdxArgument DescriptionTypeDefault
1The new footer of the windowstringnil

SetBackgroundImage

Changes the background image of the window. (Only works if BackgroundImage was set in the constructor)

Window:SetBackgroundImage("rbxasset://textures/ui/GuiImagePlaceholder.png")
Arg IdxArgument DescriptionTypeDefault
1The new background image of the windowstring/IDnil

SetCornerRadius

Changes the corner radius for elements.

Window:SetCornerRadius(10)
Arg IdxArgument DescriptionTypeDefault
1The new corner radiusnumbernil

Toggle

Toggles the visibility of the window.

Window:Toggle()

Obsidian can expose a draggable handle that lets players resize the sidebar at runtime. Enable it and tweak the behaviour directly from your window configuration:

local Window = Library:CreateWindow({
    Title = "mspaint",
    EnableSidebarResize = true,
 
    -- Optional Sidebar Settings
    MinSidebarWidth = 200, -- stop shrinking when the sidebar hits 200px
    SidebarCompactWidth = 56,
})

All window instances expose helpers for responding to layout changes or driving your own resizing logic.

GetSidebarWidth

Returns the current sidebar width in pixels.

local CurrentWidth = Window:GetSidebarWidth()

IsSidebarCompacted

Checks if the sidebar is currently in compact (icon-only) mode.

if Window:IsSidebarCompacted() then
    print("Sidebar is collapsed")
end

SetSidebarWidth

Programmatically resize the sidebar. Values outside the configured bounds are clamped automatically.

Window:SetSidebarWidth(240)
Arg IdxArgument DescriptionTypeDefault
1Desired sidebar width in pixelsnumberWidth

SetCompact

Toggle compact mode explicitly. Pass true to force compact, or false to restore the last expanded width.

Window:SetCompact(true)
Arg IdxArgument DescriptionTypeDefault
1Whether the sidebar should stay compactedboolean

ApplyLayout

Re-apply all sidebar measurements.

Window:ApplyLayout()

On this page