C# Класс Sharplike.Core.Input.InputSystem

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
InputSystem ( ) : System

Описание методов

ClearBindings() публичный Метод

Clears all current control bindings.
public ClearBindings ( ) : void
Результат void

EndCommand() публичный Метод

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
Результат void

GetMousePosition() публичный Метод

Retrieves the current screen-space mouse position.
public GetMousePosition ( ) : Point
Результат Point

HasWindowEvent() публичный Метод

Tests if the input system has a command for a particular event.
public HasWindowEvent ( String eventname ) : bool
eventname String The event to test.
Результат bool

LoadConfiguration() публичный Метод

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
Результат void

LoadConfiguration() публичный Метод

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()
Результат void

SaveConfiguration() публичный Метод

Saves the current control bindings to an arbitrary stream.
public SaveConfiguration ( Stream file ) : void
file Stream The writable stream to save to.
Результат void

SaveConfiguration() публичный Метод

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()
Результат void

StartCommand() публичный Метод

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.
Результат void

TriggerCommand() публичный Метод

Performs a one-shot trigger of a given command.
public TriggerCommand ( CommandData command ) : void
command CommandData The command to trigger.
Результат void

WindowCommand() публичный Метод

Triggers a window event.
public WindowCommand ( String eventname ) : void
eventname String The name of the window event to trigger.
Результат void