Improved the API documentation of sf::Event (added the mapping between event types and members)
This commit is contained in:
parent
945c848b37
commit
ac9bda51ca
@ -147,24 +147,24 @@ public :
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
enum EventType
|
enum EventType
|
||||||
{
|
{
|
||||||
Closed, ///< The window requested to be closed
|
Closed, ///< The window requested to be closed (no data)
|
||||||
Resized, ///< The window was resized
|
Resized, ///< The window was resized (data in event.size)
|
||||||
LostFocus, ///< The window lost the focus
|
LostFocus, ///< The window lost the focus (no data)
|
||||||
GainedFocus, ///< The window gained the focus
|
GainedFocus, ///< The window gained the focus (no data)
|
||||||
TextEntered, ///< A character was entered
|
TextEntered, ///< A character was entered (data in event.text)
|
||||||
KeyPressed, ///< A key was pressed
|
KeyPressed, ///< A key was pressed (data in event.key)
|
||||||
KeyReleased, ///< A key was released
|
KeyReleased, ///< A key was released (data in event.key)
|
||||||
MouseWheelMoved, ///< The mouse wheel was scrolled
|
MouseWheelMoved, ///< The mouse wheel was scrolled (data in event.mouseWheel)
|
||||||
MouseButtonPressed, ///< A mouse button was pressed
|
MouseButtonPressed, ///< A mouse button was pressed (data in event.mouseButton)
|
||||||
MouseButtonReleased, ///< A mouse button was released
|
MouseButtonReleased, ///< A mouse button was released (data in event.mouseButton)
|
||||||
MouseMoved, ///< The mouse cursor moved
|
MouseMoved, ///< The mouse cursor moved (data in event.mouseMove)
|
||||||
MouseEntered, ///< The mouse cursor entered the area of the window
|
MouseEntered, ///< The mouse cursor entered the area of the window (no data)
|
||||||
MouseLeft, ///< The mouse cursor left the area of the window
|
MouseLeft, ///< The mouse cursor left the area of the window (no data)
|
||||||
JoystickButtonPressed, ///< A joystick button was pressed
|
JoystickButtonPressed, ///< A joystick button was pressed (data in event.joystickButton)
|
||||||
JoystickButtonReleased, ///< A joystick button was released
|
JoystickButtonReleased, ///< A joystick button was released (data in event.joystickButton)
|
||||||
JoystickMoved, ///< The joystick moved along an axis
|
JoystickMoved, ///< The joystick moved along an axis (data in event.joystickMove)
|
||||||
JoystickConnected, ///< A joystick was connected
|
JoystickConnected, ///< A joystick was connected (data in event.joystickConnect)
|
||||||
JoystickDisconnected, ///< A joystick was disconnected
|
JoystickDisconnected, ///< A joystick was disconnected (data in event.joystickConnect)
|
||||||
|
|
||||||
Count ///< Keep last -- the total number of event types
|
Count ///< Keep last -- the total number of event types
|
||||||
};
|
};
|
||||||
@ -176,15 +176,15 @@ public :
|
|||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
SizeEvent size; ///< Size event parameters
|
SizeEvent size; ///< Size event parameters (Event::Resized)
|
||||||
KeyEvent key; ///< Key event parameters
|
KeyEvent key; ///< Key event parameters (Event::KeyPressed, Event::KeyReleased)
|
||||||
TextEvent text; ///< Text event parameters
|
TextEvent text; ///< Text event parameters (Event::TextEntered)
|
||||||
MouseMoveEvent mouseMove; ///< Mouse move event parameters
|
MouseMoveEvent mouseMove; ///< Mouse move event parameters (Event::MouseMoved)
|
||||||
MouseButtonEvent mouseButton; ///< Mouse button event parameters
|
MouseButtonEvent mouseButton; ///< Mouse button event parameters (Event::MouseButtonPressed, Event::MouseButtonReleased)
|
||||||
MouseWheelEvent mouseWheel; ///< Mouse wheel event parameters
|
MouseWheelEvent mouseWheel; ///< Mouse wheel event parameters (Event::MouseWheelMoved)
|
||||||
JoystickMoveEvent joystickMove; ///< Joystick move event parameters
|
JoystickMoveEvent joystickMove; ///< Joystick move event parameters (Event::JoystickMoved)
|
||||||
JoystickButtonEvent joystickButton; ///< Joystick button event parameters
|
JoystickButtonEvent joystickButton; ///< Joystick button event parameters (Event::JoystickButtonPressed, Event::JoystickButtonReleased)
|
||||||
JoystickConnectEvent joystickConnect; ///< Joystick (dis)connect event parameters
|
JoystickConnectEvent joystickConnect; ///< Joystick (dis)connect event parameters (Event::JoystickConnected, Event::JoystickDisconnected)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user