Add docs to UIInputContext.
This commit is contained in:
@@ -3,19 +3,48 @@ using Voile.Input;
|
||||
|
||||
namespace Voile.UI;
|
||||
|
||||
/// <summary>
|
||||
/// Input information for UI elements.
|
||||
/// </summary>
|
||||
public class UIInputContext
|
||||
{
|
||||
/// <summary>
|
||||
/// Current action handled by this <see cref="UIElement"/>.
|
||||
/// </summary>
|
||||
public IInputAction Action { get; }
|
||||
/// <summary>
|
||||
/// Current mouse position.
|
||||
/// </summary>
|
||||
public Vector2 MousePosition { get; }
|
||||
/// <summary>
|
||||
/// Determines if a mouse button was pressed.
|
||||
/// </summary>
|
||||
public bool MousePressed { get; set; }
|
||||
/// <summary>
|
||||
/// Determines if a mouse button was released.
|
||||
/// </summary>
|
||||
public bool MouseReleased { get; set; }
|
||||
/// <summary>
|
||||
/// Determines if a mouse button is currently held.
|
||||
/// </summary>
|
||||
public bool MouseDown { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the current <see cref="IInputAction"/>.
|
||||
/// </summary>
|
||||
public string ActionName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Keycode of a currently pressed character.
|
||||
/// </summary>
|
||||
public int CharPressed { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Determines if this <see cref="UIInputContext"/> registered any character input from keyboard.
|
||||
/// </summary>
|
||||
public bool HasCharInput => CharPressed != 0;
|
||||
|
||||
/// <summary>
|
||||
/// Determines if this context's input was already handled and no longer needs to be processed.
|
||||
/// </summary>
|
||||
public bool Handled => _handled;
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user