C# 클래스 Indiefreaks.Xna.Input.KeyboardInputState

파일 보기 프로젝트 열기: Indiefreaks/igf

공개 메소드들

메소드 설명
GetHeldKeys ( Action callback ) : void

Calls the callback for each Keys key where Button.IsDown is true

GetHeldKeys ( List heldKeyList ) : void

Adds a key to the heldKeyList for each Keys key where Button.IsDown is true

The list will be cleared before any keys are added

GetKey ( Keys key ) : Button

Gets the Button state of a key

GetKeyArray ( ) : Keys[]

Allocates an array of all values in the Keys enumerator

GetPressedKeys ( Action callback ) : void

Calls the callback for each Keys key where Button.OnPressed is true

GetPressedKeys ( List pressedList ) : void

Adds a key to the pressedList for each Keys key where Button.OnPressed is true

IsKeyDown ( Keys key ) : bool

Returns true if a key is down

IsKeyUp ( Keys key ) : bool

Returns true if a key is up

TryGetKeyChar ( Keys key, char &keyChar ) : bool

Gets the character for a given Keys key. Eg: Keys.A will output 'a'. Uses the current keyboard modifier key state; Shift will convert to upper case, etc.

Returns false if the key character is unknown

this ( Keys key ) : Button

Button Indexer (Keys)

비공개 메소드들

메소드 설명
GetKeyboardLayout ( uint thread ) : IntPtr
HeldCallback ( Action callback, int group ) : void
HeldList ( List list, int group ) : void
KeyboardInputState ( ) : System
MapVirtualKeyEx ( uint uCode, uint uMapType, IntPtr layout ) : uint
PressCallback ( Action callback, int group ) : void
PressList ( List list, int group ) : void
ToUnicodeEx ( uint wVirtKey, uint wScanCode, byte lpKeyState, char &pwszBuff, int cchBuff, uint wFlags, IntPtr layout ) : int
Update ( long tick, KeyboardState &keyboardState ) : void

메소드 상세

GetHeldKeys() 공개 메소드

Calls the callback for each Keys key where Button.IsDown is true

public GetHeldKeys ( Action callback ) : void
callback Action
리턴 void

GetHeldKeys() 공개 메소드

Adds a key to the heldKeyList for each Keys key where Button.IsDown is true

The list will be cleared before any keys are added

public GetHeldKeys ( List heldKeyList ) : void
heldKeyList List
리턴 void

GetKey() 공개 메소드

Gets the Button state of a key
public GetKey ( Keys key ) : Button
key Keys
리턴 Button

GetKeyArray() 공개 정적인 메소드

Allocates an array of all values in the Keys enumerator
public static GetKeyArray ( ) : Keys[]
리턴 Keys[]

GetPressedKeys() 공개 메소드

Calls the callback for each Keys key where Button.OnPressed is true
public GetPressedKeys ( Action callback ) : void
callback Action
리턴 void

GetPressedKeys() 공개 메소드

Adds a key to the pressedList for each Keys key where Button.OnPressed is true
public GetPressedKeys ( List pressedList ) : void
pressedList List
리턴 void

IsKeyDown() 공개 메소드

Returns true if a key is down
public IsKeyDown ( Keys key ) : bool
key Keys
리턴 bool

IsKeyUp() 공개 메소드

Returns true if a key is up
public IsKeyUp ( Keys key ) : bool
key Keys
리턴 bool

TryGetKeyChar() 공개 메소드

Gets the character for a given Keys key. Eg: Keys.A will output 'a'. Uses the current keyboard modifier key state; Shift will convert to upper case, etc.

Returns false if the key character is unknown

public TryGetKeyChar ( Keys key, char &keyChar ) : bool
key Keys
keyChar char
리턴 bool

this() 공개 메소드

Button Indexer (Keys)
public this ( Keys key ) : Button
key Keys
리턴 Button