diff --git a/Voile/Source/UI/UIInputContext.cs b/Voile/Source/UI/UIInputContext.cs index b166c65..1c90375 100644 --- a/Voile/Source/UI/UIInputContext.cs +++ b/Voile/Source/UI/UIInputContext.cs @@ -3,19 +3,48 @@ using Voile.Input; namespace Voile.UI; +/// +/// Input information for UI elements. +/// public class UIInputContext { + /// + /// Current action handled by this . + /// public IInputAction Action { get; } + /// + /// Current mouse position. + /// public Vector2 MousePosition { get; } + /// + /// Determines if a mouse button was pressed. + /// public bool MousePressed { get; set; } + /// + /// Determines if a mouse button was released. + /// public bool MouseReleased { get; set; } + /// + /// Determines if a mouse button is currently held. + /// public bool MouseDown { get; set; } - + /// + /// Name of the current . + /// public string ActionName { get; } - + /// + /// Keycode of a currently pressed character. + /// public int CharPressed { get; } + + /// + /// Determines if this registered any character input from keyboard. + /// public bool HasCharInput => CharPressed != 0; + /// + /// Determines if this context's input was already handled and no longer needs to be processed. + /// public bool Handled => _handled; ///