Table of Contents

Class RichHudTerminal

Namespace
RichHudFramework.UI.Client
Assembly
RichHudClient.dll

The central windowed settings menu shared by all mods using the framework.

public sealed class RichHudTerminal : RichHudClient.ApiModule
Inheritance
ModBase.ModuleBase
RichHudComponentBase
RichHudTerminal

Examples

The following example demonstrates how to define a menu structure using collection initializers. It adds a single ControlPage containing a ControlCategory and two controls (a slider and a checkbox) to the mod's root.

float extSliderValue = 0.314159f;
bool extCheckboxValue = false;

// Make the root visible and interactable
RichHudTerminal.Root.Enabled = true;

// Access the mod root and add a new page
RichHudTerminal.Root.Add(new ControlPage
{
    Name = "Settings",
    CategoryContainer =
    {
        new ControlCategory
        {
            HeaderText = "Mod Features",
            TileContainer =
            {
                new ControlTile
                {
                    new TerminalSlider
                    {
                        Name = "Limit",
                        Min = 0f,
                        Max = 10f,
                        ToolTip = "This tooltip appears when mousing over the slider.",
                        // Initial value. The getter ensures the GUI stays synchronized 
                        // if the external variable changes elsewhere.
                        CustomValueGetter = () => extSliderValue,
                        ControlChangedHandler = (obj, args) =>
                        {
                            var slider = (TerminalSlider)obj;
                            extSliderValue = slider.Value;
                            // Slider value text is not automatic
                            slider.ValueText = $"{extSliderValue:G4} MyUnits";
                        }
                    },
                    new TerminalCheckbox
                    {
                        Name = "Feature Toggle",
                        CustomValueGetter = () => extCheckboxValue,
                        ControlChangedHandler = (obj, args) =>
                        {
                            var checkbox = (TerminalCheckbox)obj;
                            extCheckboxValue = checkbox.Value;
                        }
                    }
                }
            }
        }
    }
});

Remarks

This serves as the main entry point for adding settings, keybind customization, and information pages to the shared settings menu.

To add content, access the mod-specific root container via the Root property.

UI Hierarchy

The structure of the terminal UI is dictated by the structure of the container heirarchy, starting with pages attached to Root. Controls are organized using the following container types:

  • TerminalPageCategory: (Optional) Groups related pages into a collapsible folder in the sidebar.
  • ControlPage: Represents an individual settings page that appears as an entry in the sidebar.
  • ControlCategory: A horizontally scrolling row within a ControlPage.
  • ControlTile: A vertical column within a ControlCategory.
  • TerminalControlBase: The individual interactive UI elements (buttons, sliders, checkboxes, etc.) placed inside ControlTile containers.

Specialized Pages

In addition to standard controls, the framework provides specific page types for other needs:

  • RebindPage: A dedicated interface for managing custom keybindings via registered IBindGroups.
  • TextPage: Displays a full page of read-only rich text, suitable for help manuals or changelogs.

Example Heirarchy

RichHudTerminal.Root
├── ControlPage
│   ├── ControlCategory
│   │   ├── ControlTile
│   │   │   ├── TerminalSlider
│   │   │   └── TerminalCheckbox
│   │   └── ControlTile
│   │       ├── TerminalDropdown
│   │       ├── TerminalTextField
│   │       └── ...
│   └── ...
├── TerminalPageCategory
│   ├── TextPage
│   └── TextPage
├── RebindPage
└── ...

Properties

Open

Indicates whether the terminal window is currently visible.

public static bool Open { get; }

Property Value

bool

Root

The root container for this specific client/mod. Add your pages and categories here.

public static IModControlRoot Root { get; }

Property Value

IModControlRoot

Methods

CloseMenu()

Closes the terminal window.

public static void CloseMenu()

OpenMenu()

Opens the terminal window.

public static void OpenMenu()

OpenToPage(TerminalPageBase)

Opens the terminal window (if closed) and navigates directly to the specified page.

public static void OpenToPage(TerminalPageBase newPage)

Parameters

newPage TerminalPageBase

SetPage(TerminalPageBase)

Sets the active page in the terminal without forcing the window to open.

public static void SetPage(TerminalPageBase newPage)

Parameters

newPage TerminalPageBase

ToggleMenu()

Toggles the visibility of the terminal window.

public static void ToggleMenu()