Mindshifter.ActionMap Class Reference

ActionMap provides support for mapping input handling functions to specific inputs. More...

List of all members.

Public Member Functions

 ActionMap ()
DiscreteInputEventHandler Bind (XI.Keys key, DiscreteInputEventType type, DiscreteInputEventHandler handler)
 Binds the specified discrete input event handler to be called when the specified key generates the specified input event type.
DiscreteInputEventHandler Unbind (XI.Keys key, DiscreteInputEventType type)
 Unbinds the input event handler from the specified key and event type combination.
DiscreteInputEventHandler Bind (MouseButtons button, DiscreteInputEventType type, DiscreteInputEventHandler handler)
 Binds the specified discrete input event handler to be called when the specified mouse button generates the specified input event type.
DiscreteInputEventHandler Unbind (MouseButtons button, DiscreteInputEventType type)
 Unbinds the input event handler from the specified mouse button and event type combination.
void ProcessInput (XI.KeyboardState keyboardCurrent, XI.KeyboardState keyboardPrev, XI.MouseState mouseCurrent, XI.MouseState mousePrev, GameTime time)
 Processes the current and previous input states to determine which input events have occurred, and triggers the corresponding input event handlers.

Public Attributes

event MouseMoveEventHandler MouseMoved
 Event called when the mouse position changes.
event MouseScrollEventHandler MouseScrolled
 Event called when the mouse scroll wheel value changes.

Private Attributes

Dictionary< DiscreteInputEventType,
KeyMap
mKeyEvents
Dictionary< DiscreteInputEventType,
ButtonMap
mMouseButtonEvents

Classes

class  ButtonMap
class  KeyMap


Detailed Description

ActionMap provides support for mapping input handling functions to specific inputs.


Constructor & Destructor Documentation

Mindshifter.ActionMap.ActionMap (  ) 


Member Function Documentation

DiscreteInputEventHandler Mindshifter.ActionMap.Bind ( XI.Keys  key,
DiscreteInputEventType  type,
DiscreteInputEventHandler  handler 
)

Binds the specified discrete input event handler to be called when the specified key generates the specified input event type.

Parameters:
key The key that will trigger the input handler
type The input event type that will trigger the input handler
handler The input handler to call when the specified input event occurrs
Returns:
The input event handler previously bound to the specified input event, or null if no handler was bound

DiscreteInputEventHandler Mindshifter.ActionMap.Unbind ( XI.Keys  key,
DiscreteInputEventType  type 
)

Unbinds the input event handler from the specified key and event type combination.

Parameters:
key The key from which to unbind the current input event handler
type The input event type for the specified key
Returns:
The event handler previously bound to the specified input event, or null if no event handler was bound

DiscreteInputEventHandler Mindshifter.ActionMap.Bind ( MouseButtons  button,
DiscreteInputEventType  type,
DiscreteInputEventHandler  handler 
)

Binds the specified discrete input event handler to be called when the specified mouse button generates the specified input event type.

Parameters:
button The mouse button that will trigger the input handler
type The input event type that will trigger the input handler
handler The input handler to call when the specified input event occurrs
Returns:
The input event handler previously bound to the specified input event, or null if no handler was bound

DiscreteInputEventHandler Mindshifter.ActionMap.Unbind ( MouseButtons  button,
DiscreteInputEventType  type 
)

Unbinds the input event handler from the specified mouse button and event type combination.

Parameters:
button The mouse button from which to unbind the current input event handler
type The input event type for the specified mouse button
Returns:
The event handler previously bound to the specified input event, or null if no event handler was bound

void Mindshifter.ActionMap.ProcessInput ( XI.KeyboardState  keyboardCurrent,
XI.KeyboardState  keyboardPrev,
XI.MouseState  mouseCurrent,
XI.MouseState  mousePrev,
GameTime  time 
)

Processes the current and previous input states to determine which input events have occurred, and triggers the corresponding input event handlers.

Parameters:
keyboardCurrent The current keyboard state
keyboardPrev The previous keyboard state
mouseCurrent The current mouse state
mousePrev The previous mouse state
time The current game time


Member Data Documentation

Dictionary<DiscreteInputEventType, KeyMap> Mindshifter.ActionMap.mKeyEvents [private]

Dictionary<DiscreteInputEventType, ButtonMap> Mindshifter.ActionMap.mMouseButtonEvents [private]

event MouseMoveEventHandler Mindshifter.ActionMap.MouseMoved

Event called when the mouse position changes.

event MouseScrollEventHandler Mindshifter.ActionMap.MouseScrolled

Event called when the mouse scroll wheel value changes.


The documentation for this class was generated from the following file:
Generated on Thu Apr 10 01:31:14 2008 for InputManager by  doxygen 1.5.1-p1