iInputBinder Struct Reference
SCF interface for csInputBinder, used to bind input events (keypress, button press, mouse move, etc. More...
#include <iutil/binder.h>
Inheritance diagram for iInputBinder:

Public Member Functions | |
virtual int | Axis (unsigned cmd)=0 |
Returns the position of the given axis command. | |
virtual void | BindAxis (csInputDefinition const &def, unsigned int cmd, int sensitivity=1)=0 |
Bind an axis motion event to an axis command. | |
virtual void | BindButton (csInputDefinition const &def, unsigned int cmd, bool toggle=false)=0 |
Bind a button event to a button command. | |
virtual bool | Button (unsigned cmd)=0 |
Returns the status of the given button command. | |
virtual void | LoadConfig (iConfigFile *, const char *subsection=0)=0 |
Load bindings from a configuration file. | |
virtual iEventHandler * | QueryHandler ()=0 |
Get a pointer to the embedded iEventHander. | |
virtual void | SaveConfig (iConfigFile *, const char *subsection=0)=0 |
Save bindings to a configuration file. | |
virtual void | UnbindAll ()=0 |
Remove all bindings. | |
virtual bool | UnbindAxis (unsigned cmd)=0 |
Remove a binding. | |
virtual bool | UnbindButton (unsigned cmd)=0 |
Remove a binding. |
Detailed Description
SCF interface for csInputBinder, used to bind input events (keypress, button press, mouse move, etc.) to commands which are represented by an unsigned integer. It is up to the application to specify the meaning of a command value.
Example:
enum MyCommand = { Walk, Shoot, Jump, LookX, LookY }; ... csRef<iInputBinder> binder = ...; binder->BindButton (csInputDefinition ("ctrl"), Shoot); binder->BindAxis (csInputDefinition ("mousex"), LookX); ... if (binder->Button (Shoot)) ... else { DoSomething (binder->Axis (LookX), binder->Axis (LookY)); }
Definition at line 53 of file binder.h.
Member Function Documentation
|
Returns the position of the given axis command.
Implemented in csInputBinder. |
|
Bind an axis motion event to an axis command.
Implemented in csInputBinder. |
|
Bind a button event to a button command.
Implemented in csInputBinder. |
|
Returns the status of the given button command.
Implemented in csInputBinder. |
|
Load bindings from a configuration file.
Implemented in csInputBinder. |
|
Get a pointer to the embedded iEventHander.
Implemented in csInputBinder. |
|
Save bindings to a configuration file.
Implemented in csInputBinder. |
|
Remove all bindings.
Implemented in csInputBinder. |
|
Remove a binding.
Implemented in csInputBinder. |
|
Remove a binding.
Implemented in csInputBinder. |
The documentation for this struct was generated from the following file:
- iutil/binder.h
Generated for Crystal Space by doxygen 1.4.4