SFML - Simple and Fast Multimedia Library
Main Page
Namespaces
Classes
Files
Class List
Class Index
Class Hierarchy
Class Members
sf::Input
sf::Input Class ReferenceInput handles real-time input from keyboard and mouse.
More...
#include <Input.hpp>
Inheritance diagram for sf::Input:
List of all members.
Public Member Functions
Input ()
Default constructor.
bool IsKeyDown (Key::Code KeyCode) const
Get the state of a key.
bool IsMouseButtonDown (Mouse::Button Button) const
Get the state of a mouse button.
bool IsJoystickButtonDown (unsigned int JoyId, unsigned int Button) const
Get the state of a joystick button.
int GetMouseX () const
Get the mouse X position.
int GetMouseY () const
Get the mouse Y position.
float GetJoystickAxis (unsigned int JoyId, Joy::Axis Axis) const
Get a joystick axis position.
Detailed Description
Input 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 44 of file Input.hpp.
Constructor & Destructor Documentation
sf::Input::Input
(
)
Default constructor.
Definition at line 36 of file Input.cpp.
Member Function Documentation
float sf::Input::GetJoystickAxis
(
unsigned int
JoyId,
Joy::Axis
Axis
)
const
Get a joystick axis position.
Parameters:
JoyId : Identifier of the joystick to check (0 or 1)
Axis : Axis to get
Returns:Current axis position, in the range [-100, 100] (except for POV, which is [0, 360])
Definition at line 95 of file Input.cpp.
int sf::Input::GetMouseX
(
)
const
Get the mouse X position.
Get the mouse left position.
Returns:Current mouse left position, relative to owner window
Definition at line 77 of file Input.cpp.
int sf::Input::GetMouseY
(
)
const
Get the mouse Y position.
Get the mouse top position.
Returns:Current mouse top position, relative to owner window
Definition at line 86 of file Input.cpp.
bool sf::Input::IsJoystickButtonDown
(
unsigned int
JoyId,
unsigned int
Button
)
const
Get the state of a joystick button.
Parameters:
JoyId : Identifier of the joystick to check (0 or 1)
Button : Button to check
Returns:True if button is down, false if button is up
Definition at line 65 of file Input.cpp.
bool sf::Input::IsKeyDown
(
Key::Code
KeyCode
)
const
Get the state of a key.
Parameters:
KeyCode : Key to check
Returns:True if key is down, false if key is up
Definition at line 47 of file Input.cpp.
bool sf::Input::IsMouseButtonDown
(
Mouse::Button
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 56 of file Input.cpp.
The documentation for this class was generated from the following files:
Input.hppInput.cpp
:: Copyright © 2007-2008 Laurent Gomila, all rights reserved ::
Documentation generated by doxygen 1.5.2 ::
Wyszukiwarka
Podobne podstrony:
classsf 1 1Input membersclasssf 1olorclasssf 1rawableclassscript connector 1 1net problemclasssf 1 1View membersclasssf 1 1Window membersclasssf 1 1SocketUDP membersclasssf 1 1Vector3 membersclasssf 1 1SoundBuffer membersclasssf 1 1Unicode membersclasssf 1 1Vector3classsf 1 1Listenerclasssf 1 1VideoModeclasssf 1 1SoundBufferRecorder membersclasssf 1 1Matrix3 membersclasssf 1 1Sound membersclasssf 1ventclasssf 1 1Shape memberswięcej podobnych podstron