From 828ec4973fb211a2ae4bbdc6ca94c2979510b35e Mon Sep 17 00:00:00 2001 From: dnesov Date: Fri, 4 Jul 2025 19:13:52 +0200 Subject: [PATCH] Add docs to UIInputContext. --- Voile/Source/UI/UIInputContext.cs | 33 +++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) 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; ///