Class MonoGameTextInputService
Collects committed text through the active MonoGame window text-input event stream.
public sealed class MonoGameTextInputService : ITextInputService, IDisposable
- Inheritance
-
MonoGameTextInputService
- Implements
- Inherited Members
Constructors
MonoGameTextInputService(GameWindow)
Creates a text input service bound to a MonoGame game window.
public MonoGameTextInputService(GameWindow window)
Parameters
windowGameWindowThe game window that will publish committed text input events.
Properties
CurrentText
Gets the current committed text buffer for the active request.
public string CurrentText { get; }
Property Value
IsRequestActive
Gets a value indicating whether a text input request is currently active.
public bool IsRequestActive { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
RequestTextAsync(TextInputRequest, CancellationToken)
Begins collecting text input and completes when the request is confirmed or canceled.
public Task<string> RequestTextAsync(TextInputRequest request, CancellationToken cancellationToken = default)
Parameters
requestTextInputRequestThe parameters that describe the desired input session.
cancellationTokenCancellationTokenA cancellation token that aborts the request when triggered.