Class UiInput¶
Namespace: Apogee.UI
Assembly: Apogee.UI.dll
Feeds the UI from SDL: the pointer, buttons, wheel, keys and typed text of one window, as
public sealed class UiInput : IDisposable
Inheritance¶
Implements¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
UiInput(UiSystem, uint)¶
public UiInput(UiSystem ui, uint windowId)
Parameters¶
ui UiSystem
windowId uint
The window whose events count; 0 takes them from any window (headless use, tests).
Properties¶
KeyboardEnabled¶
Asked when a key or typed text arrives: false ignores it (the editor's viewport does not have the keyboard). Null always takes it.
public Func<bool>? KeyboardEnabled { get; set; }
Property Value¶
PointerEnabled¶
False leaves the pointer to the host (an editor that shows the game in a panel feeds the pointer itself, in the panel's coordinates): mouse events are ignored.
public bool PointerEnabled { get; set; }
Property Value¶
Methods¶
Dispose()¶
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Update(Window?, bool)¶
Once a frame, after the events were pumped: sizes the pointer to the window's pixels, starts and stops SDL's text input as a text field takes the focus, and, with
applyCursor, sets the OS cursor to the one the UI wants while the pointer is over it.
public void Update(Window? window, bool applyCursor = true)
Parameters¶
window Window?
applyCursor bool