sfInput Class Reference

#include <Input.hpp>

Inheritance diagram for sfInput:

sfWindowListener sfNonCopyable List of all members.

Public Member Functions

 sfInput ()
bool IsKeyDown (sfKey::Code Key) const
bool IsButtonDown (sfButton::Code Button) const
unsigned int GetMouseX () const
unsigned int GetMouseY () const

Detailed Description

sfInput handles real-time input from keyboard and mouse. Use it instead of events to handle continuous moves and more game-friendly inputs

Definition at line 42 of file Input.hpp.


Constructor & Destructor Documentation

sfInput::sfInput (  ) 

Default constructor

Definition at line 34 of file Input.cpp.

References sfButton::Count, and sfKey::Count.


Member Function Documentation

bool sfInput::IsKeyDown ( sfKey::Code  Key  )  const

Get the state of a key

Parameters:
Key : Key to check
Returns:
True if key is down, false if key is up

Definition at line 49 of file Input.cpp.

bool sfInput::IsButtonDown ( sfButton::Code  Button  )  const

Get the state of a mouse button

Parameters:
Button : Button to check
Returns:
True if button is down, false if button is up

Definition at line 58 of file Input.cpp.

unsigned int sfInput::GetMouseX (  )  const

Get the mouse left position

Returns:
Current mouse left position, relative to owner window

Definition at line 67 of file Input.cpp.

unsigned int sfInput::GetMouseY (  )  const

Get the mouse top position

Returns:
Current mouse top position, relative to owner window

Definition at line 76 of file Input.cpp.


The documentation for this class was generated from the following files:
Generated for SFML by  doxygen 1.5.2