C# Class Sharplike.Core.Input.InputSystem

Afficher le fichier Open project: eropple/sharplike Class Usage Examples

Méthodes publiques

Méthode Description
ClearBindings ( ) : void

Clears all current control bindings.

EndCommand ( CommandData command ) : void

Ends a command that was previously started. This will stop the command from being repeat-triggered.

GetMousePosition ( ) : Point

Retrieves the current screen-space mouse position.

HasWindowEvent ( String eventname ) : bool

Tests if the input system has a command for a particular event.

LoadConfiguration ( Stream file ) : void

Load control bindings from an arbitrary stream. If there are already bindings, the new ones will be added. New bindings overwrite old bindings.

LoadConfiguration ( String filename ) : void

Loads control bindings from a specified path.

SaveConfiguration ( Stream file ) : void

Saves the current control bindings to an arbitrary stream.

SaveConfiguration ( String filename ) : void

Saves the current control bindings to a path on the filesystem.

StartCommand ( CommandData command ) : void

Starts a game command. This command will be duplicated as a trigger, and will be re-triggered as a key-repeat until it is ended by a call to EndCommand().

TriggerCommand ( CommandData command ) : void

Performs a one-shot trigger of a given command.

WindowCommand ( String eventname ) : void

Triggers a window event.

Private Methods

Méthode Description
InputSystem ( ) : System

Method Details

ClearBindings() public méthode

Clears all current control bindings.
public ClearBindings ( ) : void
Résultat void

EndCommand() public méthode

Ends a command that was previously started. This will stop the command from being repeat-triggered.
public EndCommand ( CommandData command ) : void
command CommandData The name of the command to stop
Résultat void

GetMousePosition() public méthode

Retrieves the current screen-space mouse position.
public GetMousePosition ( ) : Point
Résultat Point

HasWindowEvent() public méthode

Tests if the input system has a command for a particular event.
public HasWindowEvent ( String eventname ) : bool
eventname String The event to test.
Résultat bool

LoadConfiguration() public méthode

Load control bindings from an arbitrary stream. If there are already bindings, the new ones will be added. New bindings overwrite old bindings.
public LoadConfiguration ( Stream file ) : void
file Stream The source of the INI data
Résultat void

LoadConfiguration() public méthode

Loads control bindings from a specified path.
public LoadConfiguration ( String filename ) : void
filename String The path to load from. Note: This does NOT automatically use Game.PathTo()
Résultat void

SaveConfiguration() public méthode

Saves the current control bindings to an arbitrary stream.
public SaveConfiguration ( Stream file ) : void
file Stream The writable stream to save to.
Résultat void

SaveConfiguration() public méthode

Saves the current control bindings to a path on the filesystem.
public SaveConfiguration ( String filename ) : void
filename String The location of the file to write to. NOTE: This does NOT automatically use Game.PathTo()
Résultat void

StartCommand() public méthode

Starts a game command. This command will be duplicated as a trigger, and will be re-triggered as a key-repeat until it is ended by a call to EndCommand().
public StartCommand ( CommandData command ) : void
command CommandData The command to start.
Résultat void

TriggerCommand() public méthode

Performs a one-shot trigger of a given command.
public TriggerCommand ( CommandData command ) : void
command CommandData The command to trigger.
Résultat void

WindowCommand() public méthode

Triggers a window event.
public WindowCommand ( String eventname ) : void
eventname String The name of the window event to trigger.
Résultat void