Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
pluginbase.Objects.Input.IInputBinding Interface Reference

Class that allows you to bind to keys and mouse buttons More...

Inheritance diagram for pluginbase.Objects.Input.IInputBinding:
pluginbase.Objects.Input.IBoundInput

Public Member Functions

void Listen (string bindName, Key defaultKey)
 Listen to a key, with the assigned bind name More...
 
void Listen (string bindName, MouseButton defaultButton)
 Listens to a button, with the given assigned name More...
 
void Bind (string bindName, Action action)
 Do an action when the event attached to the bind occurs More...
 
void Bind (string bindName, InputDirection direction, Action action)
 Bind an action to a given name during a direction More...
 
void Bind (string bindName, Key defaultKey, Action keyBind)
 Bind an action, during the down-direction, of a key More...
 
void Bind (string bindName, Key defaultKey, InputDirection direction, Action keyBind)
 Bind an action to a default key and direction More...
 
void Bind (string bindName, MouseButton defaultButton, Action mouseBind)
 Bind a mouse button to the given action More...
 
void Bind (string bindName, MouseButton defaultButton, InputDirection direction, Action mouseBind)
 Bind mouse button to given action More...
 
void BindMouseWheel (MouseWheelAction callback)
 Bind a callback when the mouse wheel is scrolled More...
 
void BindMouseMove (MouseMoveAction callback)
 Bind an event when an absolute-mouse-move occurs More...
 
bool IsDown (string bindName)
 Gets whether or not the current bind name is in the "Down" position (Key or mouse) More...
 
Vector2d GetMouseDelta (bool reset=true)
 Gets the mouse delta, for, eg, moving FPS rotation More...
 
string GetBoundEventName (string bindName)
 Get the name of the input that is bound to the bindName Eg return "K" for Key.K or "Left" for Mouse left Used for display only More...
 

Properties

string Name [get]
 Gets the name of the input binding More...
 
string Description [get, set]
 Gets or sets the description. More...
 
bool CaptureAll [get, set]
 If true, the binding will block all other bindings that have been enabled before it More...
 
MouseMode MouseMode [get, set]
 Gets or sets the mouse mode. More...
 

Detailed Description

Class that allows you to bind to keys and mouse buttons

Member Function Documentation

void pluginbase.Objects.Input.IInputBinding.Bind ( string  bindName,
Action  action 
)

Do an action when the event attached to the bind occurs

Parameters
bindNameBind name.
actionAction.
void pluginbase.Objects.Input.IInputBinding.Bind ( string  bindName,
InputDirection  direction,
Action  action 
)

Bind an action to a given name during a direction

Parameters
bindNameBind name.
directionDirection.
actionAction.
void pluginbase.Objects.Input.IInputBinding.Bind ( string  bindName,
Key  defaultKey,
Action  keyBind 
)

Bind an action, during the down-direction, of a key

Parameters
bindNameBind name.
defaultKeyDefault key.
keyBindKey bind.
void pluginbase.Objects.Input.IInputBinding.Bind ( string  bindName,
Key  defaultKey,
InputDirection  direction,
Action  keyBind 
)

Bind an action to a default key and direction

Parameters
bindNameBind name.
defaultKeyDefault key.
directionDirection.
keyBindKey bind.
void pluginbase.Objects.Input.IInputBinding.Bind ( string  bindName,
MouseButton  defaultButton,
Action  mouseBind 
)

Bind a mouse button to the given action

Parameters
bindNameBind name.
defaultButtonDefault button.
mouseBindMouse bind.
void pluginbase.Objects.Input.IInputBinding.Bind ( string  bindName,
MouseButton  defaultButton,
InputDirection  direction,
Action  mouseBind 
)

Bind mouse button to given action

Parameters
bindNameBind name.
defaultButtonDefault button.
directionDirection.
mouseBindMouse bind.
void pluginbase.Objects.Input.IInputBinding.BindMouseMove ( MouseMoveAction  callback)

Bind an event when an absolute-mouse-move occurs

Parameters
callbackCallback.
void pluginbase.Objects.Input.IInputBinding.BindMouseWheel ( MouseWheelAction  callback)

Bind a callback when the mouse wheel is scrolled

Parameters
callbackCallback.
string pluginbase.Objects.Input.IInputBinding.GetBoundEventName ( string  bindName)

Get the name of the input that is bound to the bindName Eg return "K" for Key.K or "Left" for Mouse left Used for display only

Returns
The bind input name.
Parameters
bindNameBind name.
Vector2d pluginbase.Objects.Input.IInputBinding.GetMouseDelta ( bool  reset = true)

Gets the mouse delta, for, eg, moving FPS rotation

Returns
The mouse delta.
Parameters
resetIf set to true reset.
bool pluginbase.Objects.Input.IInputBinding.IsDown ( string  bindName)

Gets whether or not the current bind name is in the "Down" position (Key or mouse)

Returns
true if this instance is down the specified bindName; otherwise, false.
Parameters
bindNameBind name.
void pluginbase.Objects.Input.IInputBinding.Listen ( string  bindName,
Key  defaultKey 
)

Listen to a key, with the assigned bind name

Parameters
bindNameBind name.
defaultKeyDefault key.
void pluginbase.Objects.Input.IInputBinding.Listen ( string  bindName,
MouseButton  defaultButton 
)

Listens to a button, with the given assigned name

Parameters
bindNameBind name.
defaultButtonDefault button.

Property Documentation

bool pluginbase.Objects.Input.IInputBinding.CaptureAll
getset

If true, the binding will block all other bindings that have been enabled before it

true if capture all; otherwise, false.

string pluginbase.Objects.Input.IInputBinding.Description
getset

Gets or sets the description.

The description.

MouseMode pluginbase.Objects.Input.IInputBinding.MouseMode
getset

Gets or sets the mouse mode.

The mouse mode.

string pluginbase.Objects.Input.IInputBinding.Name
get

Gets the name of the input binding

The name.


The documentation for this interface was generated from the following file: