Box

Box scopes that wrap Sirenix's SirenixEditorGUI.BeginBox/EndBox and BeginBoxHeader/EndBoxHeader into IDisposable using blocks. The Box scope creates a styled container, and BoxHeader adds a header region inside it.

Architecture

spinner

Scopes

Scope
Factory Method
Description

DrawGUI.Box(...)

Sirenix-styled container with optional label and centering

DrawGUI.BoxHeader()

Header region inside a box — use for custom header content

Usage

using static Paragon.Editor.DrawGUI;

// Simple box
using (Box())
{
    Label("Content");
}

// Labeled box
using (Box("Settings"))
{
    Label("Content with a title");
}

// Box with custom header
using (Box())
{
    using (BoxHeader())
    {
        Label("Custom Header", Style.LabelBold);
        FlexibleSpace();
        if (Button("Reset")) { /* ... */ }
    }
    Label("Body content");
}

See Also

Last updated