Input Escape Manager

InputEscapeManager is a static class that manages escape actions in a stack-like manner. It allows pushing, popping, and executing registered escape actions. This system ensures that only the most recent escape action is executed when triggered.

Info: UIViewActionEscape uses InputEscapeManager. While Luna UI uses this to exit from UIViews, it can also be used for other purposes beyond UI.

Public Methods

Push

You can push an action onto the escape stack, optionally providing a unique key and an insertion index.

csharp
// Method signature: public static void Push(Action action, Guid? key = null, int insert = -1) // Simple usage: InputEscapeManager.Push(() => Debug.Log("Escape action triggered")); // With a specific key: Guid actionKey = Guid.NewGuid(); InputEscapeManager.Push(() => Debug.Log("Keyed escape action"), actionKey); // Inserting at a specific position: InputEscapeManager.Push(() => Debug.Log("Inserted action"), null, 0);

Popping an Escape Action

Pops and executes the most recent escape action.

csharp
// Simple usage: InputEscapeManager.Pop(); // Popping a specific action by key, ignoring order: InputEscapeManager.Pop(actionKey); // Popping without execution: InputEscapeManager.PopWithoutExecute(actionKey);

Blocking Escape Execution

Temporarily block escape actions from executing

csharp
//To temporarily block escape actions from executing: InputEscapeManager.SetBlocked(true); //To allow execution again: InputEscapeManager.SetBlocked(false);

Events

InputEscapeEvent

Triggered when an escape action occurs. By default, it calls Pop() to execute the last action. Can be triggered manually to execute the last action.

Settings

Theme

Light

Contrast

Material

Dark

Dim

Material Dark

System

Sidebar(Light & Contrast only)

Light
Dark

Font Family

DM Sans

Wix

Inclusive Sans

AR One Sans

Direction

LTR
RTL