Class InputContextChangedEvent
Published via the Scylla Event eXchange System (SEX) whenever the top of the input context stack changes, either because a context was pushed or popped, making a different context the active one.
Inherited Members
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public class InputContextChangedEvent : ScyllaEvent
Remarks
This event summarizes the net result of a push or pop operation. Both the previous and current context objects are provided so subscribers can react to the change without needing to query the context manager separately.
When a new context is pushed on top of an existing one, PreviousContext
is the context that was previously on top and CurrentContext is the
newly activated one. When a context is popped, the values are reversed.
Either value can be null if the stack was empty before or after the
operation.
Subscribe via ScyllaEvents.Listen<InputContextChangedEvent>.
For finer-grained tracking of individual push and pop operations, subscribe to
InputContextPushedEvent and InputContextPoppedEvent
respectively.
Constructors
InputContextChangedEvent(string, string, InputContext, InputContext)
Initializes a new InputContextChangedEvent with the context state before and after the change.
Declaration
public InputContextChangedEvent(string previousContextID, string currentContextID, InputContext previousContext, InputContext currentContext)
Parameters
| Type | Name | Description |
|---|---|---|
| string | previousContextID | The ID of the context that was active before the change, or |
| string | currentContextID | The ID of the context that is now active (top of stack), or |
| InputContext | previousContext | The InputContext object that was active before the change,
or |
| InputContext | currentContext | The InputContext object that is now active, or |
Properties
CurrentContext
Gets the InputContext object that is now active, or null
if the context stack is now empty.
Declaration
public InputContext CurrentContext { get; }
Property Value
| Type | Description |
|---|---|
| InputContext |
CurrentContextID
Gets the ID of the context that is now active (top of stack), or null
if the context stack is now empty.
Declaration
public string CurrentContextID { get; }
Property Value
| Type | Description |
|---|---|
| string |
PreviousContext
Gets the InputContext object that was active before the change,
or null if no context was active.
Declaration
public InputContext PreviousContext { get; }
Property Value
| Type | Description |
|---|---|
| InputContext |
PreviousContextID
Gets the ID of the context that was active before the change, or null
if no context was active (empty stack).
Declaration
public string PreviousContextID { get; }
Property Value
| Type | Description |
|---|---|
| string |