Class RatatuiTerminalApps
- Namespace
- RatatuiUnity
Static bootstrap and registry for terminal apps. Each app registers itself via
Register<T>(string, string, int) in a [RuntimeInitializeOnLoadMethod(AfterAssembliesLoaded)]
static method, then this manager instantiates them all at BeforeSceneLoad.
public static class RatatuiTerminalApps
- Inheritance
-
RatatuiTerminalApps
- Inherited Members
Properties
Apps
All registered terminal apps, sorted by Order after bootstrap.
public static IReadOnlyList<TerminalAppHandle> Apps { get; }
Property Value
IsBooted
True when bootstrap has completed.
public static bool IsBooted { get; }
Property Value
Methods
Close(string)
Close the app with the given id.
public static void Close(string id)
Parameters
idstring
Close<T>()
Close the first app whose instance is of type T.
public static void Close<T>() where T : RatatuiTerminalApp
Type Parameters
T
Get(string)
Get the live app instance by id, or null if not found.
public static RatatuiTerminalApp Get(string id)
Parameters
idstring
Returns
Get<T>()
Get the live app instance by type, or null if not found.
public static T Get<T>() where T : RatatuiTerminalApp
Returns
- T
Type Parameters
T
IsOpen(string)
Return whether the app with the given id is open.
public static bool IsOpen(string id)
Parameters
idstring
Returns
Open(string)
Open the app with the given id. If already open, brings it to RatatuiFocusManager focus (keyboard input + window z-order).
public static void Open(string id)
Parameters
idstring
Open<T>()
Open the first app whose instance is of type T.
If already open, brings it to focus.
public static void Open<T>() where T : RatatuiTerminalApp
Type Parameters
T
Register<T>(string, string, int)
Register a terminal app. Call this from a
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)]
static method inside the app class so it is registered before bootstrap runs.
public static void Register<T>(string id, string displayName = null, int order = 0) where T : RatatuiTerminalApp
Parameters
Type Parameters
T
Toggle(string)
Toggle the app with the given id.
public static void Toggle(string id)
Parameters
idstring
Toggle<T>()
Toggle the first app whose instance is of type T.
public static void Toggle<T>() where T : RatatuiTerminalApp
Type Parameters
T