C# Class Fusion.Drivers.Input.InputDevice

Inheritance: System.DisposableBase
Exibir arquivo Open project: demiurghg/FusionEngine Class Usage Examples

Public Properties

Property Type Description
Game Game

Public Methods

Method Description
AddPressedKey ( Keys key ) : void

Adds key to hash list and fires KeyDown event

GetGamepad ( int playerIndex ) : Gamepad

Gets player's gamepad

IsKeyDown ( Keys key, bool ignoreInputMode = true ) : bool

Checks whether key is down

IsKeyUp ( Keys key ) : bool

Checks whether key is down

KeyboardHandle ( object sender, SharpDX.RawInput.KeyboardInputEventArgs e ) : void

Keyboard handler In general: http://molecularmusings.wordpress.com/2011/09/05/properly-handling-keyboard-input/ L/R shift: http://stackoverflow.com/questions/5920301/distinguish-between-left-and-right-shift-keys-using-rawinput

MouseHandler ( object sender, SharpDX.RawInput.MouseInputEventArgs e ) : void

Mouse handler

NotifyTouchDoubleTap ( System.Vector2 tapPosition ) : void
NotifyTouchManipulation ( System.Vector2 center, System.Vector2 delta, float scale ) : void
NotifyTouchSecondaryTap ( System.Vector2 tapPosition ) : void
NotifyTouchTap ( System.Vector2 tapPosition ) : void
RemovePressedKey ( Keys key ) : void

Removes key from hash list and fires KeyUp event

SetCursorImage ( string path ) : void

Loads cursor image from file

SetCursorVisibility ( bool visible ) : void

Sets cursor visibility

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes stuff

Private Methods

Method Description
EndUpdateInput ( ) : void

Should be called after everything is updated

Initialize ( ) : void
InputDevice ( Game game ) : System

Constrcutor

NotifyKeyDown ( Keys key, bool alt, bool shift, bool control ) : void
NotifyKeyPress ( char keyChar ) : void
NotifyKeyUp ( Keys key, bool alt, bool shift, bool control ) : void
RemoveAllPressedKeys ( ) : void

UpdateInput ( ) : void

Frame

Method Details

AddPressedKey() public method

Adds key to hash list and fires KeyDown event
public AddPressedKey ( Keys key ) : void
key Keys
return void

Dispose() protected method

Disposes stuff
protected Dispose ( bool disposing ) : void
disposing bool
return void

GetGamepad() public method

Gets player's gamepad
public GetGamepad ( int playerIndex ) : Gamepad
playerIndex int Player index from 0 to 3 inclusivly
return Gamepad

IsKeyDown() public method

Checks whether key is down
public IsKeyDown ( Keys key, bool ignoreInputMode = true ) : bool
key Keys
ignoreInputMode bool
return bool

IsKeyUp() public method

Checks whether key is down
public IsKeyUp ( Keys key ) : bool
key Keys
return bool

KeyboardHandle() public method

Keyboard handler In general: http://molecularmusings.wordpress.com/2011/09/05/properly-handling-keyboard-input/ L/R shift: http://stackoverflow.com/questions/5920301/distinguish-between-left-and-right-shift-keys-using-rawinput
public KeyboardHandle ( object sender, SharpDX.RawInput.KeyboardInputEventArgs e ) : void
sender object
e SharpDX.RawInput.KeyboardInputEventArgs
return void

MouseHandler() public method

Mouse handler
public MouseHandler ( object sender, SharpDX.RawInput.MouseInputEventArgs e ) : void
sender object
e SharpDX.RawInput.MouseInputEventArgs
return void

NotifyTouchDoubleTap() public method

public NotifyTouchDoubleTap ( System.Vector2 tapPosition ) : void
tapPosition System.Vector2
return void

NotifyTouchManipulation() public method

public NotifyTouchManipulation ( System.Vector2 center, System.Vector2 delta, float scale ) : void
center System.Vector2
delta System.Vector2
scale float
return void

NotifyTouchSecondaryTap() public method

public NotifyTouchSecondaryTap ( System.Vector2 tapPosition ) : void
tapPosition System.Vector2
return void

NotifyTouchTap() public method

public NotifyTouchTap ( System.Vector2 tapPosition ) : void
tapPosition System.Vector2
return void

RemovePressedKey() public method

Removes key from hash list and fires KeyUp event
public RemovePressedKey ( Keys key ) : void
key Keys
return void

SetCursorImage() public method

Loads cursor image from file
public SetCursorImage ( string path ) : void
path string
return void

SetCursorVisibility() public method

Sets cursor visibility
public SetCursorVisibility ( bool visible ) : void
visible bool
return void

Property Details

Game public_oe property

public Game Game
return Game