Class RatatuiTerminalApp
- Namespace
- RatatuiUnity
Base class for terminal apps that can be opened and closed from any scene. Provides shared toggle-key handling, touch toggle, and open/close lifecycle.
[DefaultExecutionOrder(-100)]
public abstract class RatatuiTerminalApp : RatatuiRenderer
- Inheritance
-
ObjectMonoBehaviourRatatuiTerminalApp
- Inherited Members
Properties
FreshOpenFrames
Skip mouse input until BuildFrame populates area_map after opening.
protected int FreshOpenFrames { get; }
Property Value
IsOpen
True when the app window is visible and receiving render/input.
public bool IsOpen { get; }
Property Value
ToggleKey
Keyboard key that toggles this app. KeyCode.None disables keyboard toggle.
protected virtual KeyCode ToggleKey { get; }
Property Value
- KeyCode
TouchToggleFingerCount
Simultaneous touch count that toggles this app on full release.
protected virtual int TouchToggleFingerCount { get; }
Property Value
Methods
OnClosed()
Called when the app closes. Override for app-specific cleanup.
protected virtual void OnClosed()
OnGUI()
protected override void OnGUI()
OnOpened()
Called when the app opens. Override for app-specific setup.
protected virtual void OnOpened()
SetOpen(bool)
Open or close the app window.
public void SetOpen(bool open)
Parameters
openbool
ShouldIgnoreMouseThisFrame()
Skip mouse events for one frame after opening when area_map is stale.
protected bool ShouldIgnoreMouseThisFrame()
Returns
ShouldSuppressToggleKeyEvent(TerminalKeyEvent)
Drop toggle-key events so the held toggle key does not leak into the app. Call from OnTerminalKeyDown before handling other keys.
protected bool ShouldSuppressToggleKeyEvent(TerminalKeyEvent e)
Parameters
Returns
Toggle()
Toggle the app window open/closed.
public void Toggle()
Update()
protected override void Update()
Events
OnOpenChanged
Fires after open state changes. Argument is the new open state.
public event Action<bool> OnOpenChanged