Class TextInput
- Namespace
- RichHudFramework.UI
- Assembly
- RichHudClient.dll
Provides a simple mechanism for handling text input, integrating with the game's input system to process characters and backspace events.
public class TextInput
- Inheritance
-
TextInput
Constructors
TextInput(Action<char>, Action, Func<char, bool>)
Initializes a new instance of the TextInput class.
public TextInput(Action<char> AppendAction, Action BackspaceAction, Func<char, bool> IsCharAllowedFunc = null)
Parameters
AppendActionAction<char>The action to be executed for each allowed character typed by the user.
BackspaceActionActionThe action to be executed when the backspace key is pressed.
IsCharAllowedFuncFunc<char, bool>An optional function used to validate characters before appending. Pass null if all characters are permitted.
Methods
HandleInput()
Processes the current frame's input and invokes the registered actions for backspace and character appending. This method should be called once per game frame.
public void HandleInput()