CrabUI
Loading...
Searching...
No Matches
CrabUI.CUIInput Class Reference

Containing a snapshot of current mouse and keyboard state. More...

Public Member Functions

void Scan (double totalTime)
 

Public Attributes

MouseState Mouse
 
bool MouseDown
 
bool DoubleClick
 
bool MouseUp
 
bool MouseHeld
 
float Scroll
 
bool Scrolled
 
Vector2 MousePosition
 
Vector2 MousePositionDif
 
bool MouseMoved
 
bool SomethingHappened
 
bool ClickConsumed
 
KeyboardState Keyboard
 
Keys[] HeldKeys = new Keys[0]
 
Keys[] PressedKeys = new Keys[0]
 
Keys[] UnpressedKeys = new Keys[0]
 
bool SomeKeyHeld
 
bool SomeKeyPressed
 
bool SomeKeyUnpressed
 
TextInputEventArgs[] WindowTextInputEvents
 
TextInputEventArgs[] WindowKeyDownEvents
 
bool SomeWindowEvents
 

Static Public Attributes

static double DoubleClickInterval = 0.2
 
static float ScrollSpeed = 0.6f
 

Properties

bool MouseInputHandled [get, set]
 

Detailed Description

Containing a snapshot of current mouse and keyboard state.

Definition at line 16 of file CUIInput.cs.

Constructor & Destructor Documentation

◆ CUIInput()

CrabUI.CUIInput.CUIInput ( )

Definition at line 130 of file CUIInput.cs.

131 {
132 CUI.OnWindowKeyDown += (e) => WindowKeyDownQueue.Enqueue(e);
133 CUI.OnWindowTextInput += (e) => WindowTextInputQueue.Enqueue(e);
134 }

Member Function Documentation

◆ Scan()

void CrabUI.CUIInput.Scan ( double totalTime)

Definition at line 63 of file CUIInput.cs.

64 {
65 MouseInputHandled = false;
66 ScanMouse(totalTime);
67 ScanKeyboard(totalTime);
68 }

Member Data Documentation

◆ ClickConsumed

bool CrabUI.CUIInput.ClickConsumed

Definition at line 37 of file CUIInput.cs.

◆ DoubleClick

bool CrabUI.CUIInput.DoubleClick

Definition at line 25 of file CUIInput.cs.

◆ DoubleClickInterval

double CrabUI.CUIInput.DoubleClickInterval = 0.2
static

Definition at line 18 of file CUIInput.cs.

◆ HeldKeys

Keys [] CrabUI.CUIInput.HeldKeys = new Keys[0]

Definition at line 40 of file CUIInput.cs.

◆ Keyboard

KeyboardState CrabUI.CUIInput.Keyboard

Definition at line 39 of file CUIInput.cs.

◆ Mouse

MouseState CrabUI.CUIInput.Mouse

Definition at line 23 of file CUIInput.cs.

◆ MouseDown

bool CrabUI.CUIInput.MouseDown

Definition at line 24 of file CUIInput.cs.

◆ MouseHeld

bool CrabUI.CUIInput.MouseHeld

Definition at line 27 of file CUIInput.cs.

◆ MouseMoved

bool CrabUI.CUIInput.MouseMoved

Definition at line 32 of file CUIInput.cs.

◆ MousePosition

Vector2 CrabUI.CUIInput.MousePosition

Definition at line 30 of file CUIInput.cs.

◆ MousePositionDif

Vector2 CrabUI.CUIInput.MousePositionDif

Definition at line 31 of file CUIInput.cs.

◆ MouseUp

bool CrabUI.CUIInput.MouseUp

Definition at line 26 of file CUIInput.cs.

◆ PressedKeys

Keys [] CrabUI.CUIInput.PressedKeys = new Keys[0]

Definition at line 41 of file CUIInput.cs.

◆ Scroll

float CrabUI.CUIInput.Scroll

Definition at line 28 of file CUIInput.cs.

◆ Scrolled

bool CrabUI.CUIInput.Scrolled

Definition at line 29 of file CUIInput.cs.

◆ ScrollSpeed

float CrabUI.CUIInput.ScrollSpeed = 0.6f
static

Definition at line 19 of file CUIInput.cs.

◆ SomeKeyHeld

bool CrabUI.CUIInput.SomeKeyHeld

Definition at line 43 of file CUIInput.cs.

◆ SomeKeyPressed

bool CrabUI.CUIInput.SomeKeyPressed

Definition at line 44 of file CUIInput.cs.

◆ SomeKeyUnpressed

bool CrabUI.CUIInput.SomeKeyUnpressed

Definition at line 45 of file CUIInput.cs.

◆ SomethingHappened

bool CrabUI.CUIInput.SomethingHappened

Definition at line 34 of file CUIInput.cs.

◆ SomeWindowEvents

bool CrabUI.CUIInput.SomeWindowEvents

Definition at line 48 of file CUIInput.cs.

◆ UnpressedKeys

Keys [] CrabUI.CUIInput.UnpressedKeys = new Keys[0]

Definition at line 42 of file CUIInput.cs.

◆ WindowKeyDownEvents

TextInputEventArgs [] CrabUI.CUIInput.WindowKeyDownEvents

Definition at line 47 of file CUIInput.cs.

◆ WindowTextInputEvents

TextInputEventArgs [] CrabUI.CUIInput.WindowTextInputEvents

Definition at line 46 of file CUIInput.cs.

Property Documentation

◆ MouseInputHandled

bool CrabUI.CUIInput.MouseInputHandled
getset

Definition at line 61 of file CUIInput.cs.

61{ get; set; }

The documentation for this class was generated from the following file: