You are viewing a potentially older version of this package. View all versions.
AALUND13-UIManager-1.0.0 icon

UIManager

UI Manager is a Unity-based library for the game ROUNDS that simplifies the creation, customization, and runtime management of UI panels.

Date uploaded 6 hours ago
Version 1.0.0
Download link AALUND13-UIManager-1.0.0.zip
Downloads 70
Dependency string AALUND13-UIManager-1.0.0

This mod requires the following mods to function

willis81808-UnboundLib-3.2.14 icon
willis81808-UnboundLib

This is a helpful utility for ROUNDS modders aimed at simplifying common tasks.

Preferred version: 3.2.14

README

UI Manager [1.0.0]

UI Manager is a Unity-based library for the game ROUNDS that simplifies the creation, customization, and runtime management of UI panels.

It provides a flexible system for building draggable, resizable, and configurable UI panels, along with a powerful UI Layout Manager that allows editing using a runtime gizmo.

Core Features

UI Layout Manager (Main Feature)

The UI Layout Manager enables runtime manipulation of UI panels:

  • Drag panels freely across the screen
  • Resize panels dynamically
  • Edit layouts visually using a runtime gizmo

This allows both developers and players to fully customize UI positioning.

Option Panels

Create dynamic and customizable Option Panels for your UI:

  • Built-in support for sliders, toggles, and color pickers
  • Automatically generated UI via reflection
  • Real-time property updates

Example: Tabholic

The Tabholic mod demonstrates how to use UI Manager in practice. It uses:

  • Layoutable Panel for structured UI organization
  • Option Panels for user customization (text color, spacing, size, etc.)

Example behavior:

private void Awake() {
    UIPanelInfo panel = GetComponentInParent<UIPanelInfo>();

    panel.OnDisplayModeChnaged += (DisplayMode display) => {
        if (display == DisplayMode.Normal) {
            CreatePlayerStats();
        } else if (display == DisplayMode.Layout) {
            CreatePreviewStats();
        }
    };
}

Getting Started

This library currently supports Unity Project-based mods only.
It is not designed for mods developed purely in external IDEs like Visual Studio.

1. Creating a UI Panel

  1. Import UI Manager into your Unity project
  2. Set up dependencies for your mod
  3. Open the example scene: Example UI Panels
  4. Duplicate one of the example panels
  5. Disable unused example panels
  6. Configure your panel:
    • Set a unique PanelID in UIPanelInfo
    • Adjust other settings as needed

2. Registering UI Panels

  1. Create a GameObject with UIPanelRegistrar
  2. Convert your panels into prefabs
  3. Assign prefabs to the UIPanelRegistrar
  4. Convert the registrar into a prefab
  5. Load and register panels at runtime:
UIPanelRegistrar registrar = Assets
    .LoadAsset<GameObject>("Tabholic UI Register")
    .GetComponent<UIPanelRegistrar>();

registrar.Register();

3. Displaying Panels

// Display ALL panels
foreach (var panel in registrar.UIPanelsPrefabs) {
    UIRegistry.Instance
        .GetLayoutPanel(panel.PanelID)
        .Info.DisplayMode = DisplayMode.Normal;
}

// Display a specific panel
registrar
    .GetLayoutPanel("MyPanelId")
    .Info.DisplayMode = DisplayMode.Normal;

Creating an Option Panel (Optional)

Step 1: Define the Panel Class

Create a class inheriting from SimpleContextPanel. This system uses reflection to automatically generate UI fields from properties implementing IPropertyField.

public class MyPanelOptionPanel : SimpleContextPanel {
    public static MyPanelOptionPanel Instance { get; private set; }

    public FloatPropertyField MyFloat = new FloatPropertyField(0f, 1f, 0f);
    public IntPropertyField MyInt = new IntPropertyField(0, 1, 0);
    public BoolPropertyField MyBool = new BoolPropertyField(false);

    private void Awake() {
        Instance = this;
    }
}

Step 2: Register the Option Panel

UIPanelInfo panelInfo = registrar.UIPanelsPrefabs.First();
OptionPanelRegistry.RegisterOptionMenu<MyPanelOptionPanel>(panelInfo);

(Optional) Editor Testing

public class EditorContextPanelRegister : MonoBehaviour {
    public UIPanelInfo PrefabPanelInfo;

    private void Awake() {
        OptionPanelRegistry.RegisterOptionMenu<MyPanelOptionPanel>(PrefabPanelInfo);
    }
}

Step 3: Access Values

MyPanelOptionPanel.Instance.MyFloat.Value;
MyPanelOptionPanel.Instance.MyBool.Value;

Notes

  • UI appearance in Unity Editor will differ from in-game visuals due to ROUNDS post-processing
  • Ensure unique PanelID values to avoid conflicts