Event

Defines a system event and its parameters.

Event holds all the informations about a system event that just happened.

Events are retrieved using the sWindow.pollEvent and Window.waitEvent functions.

A Event instance contains the type of the event (mouse moved, key pressed, window closed, ...) as well as the details about this particular event. Please note that the event parameters are defined in a union, which means that only the member matching the type of the event will be properly filled; all other members will have undefined values and must not be read if the type of the event doesn't match. For example, if you received a KeyPressed event, then you must read the event.key member, all other members such as event.MouseMove or event.text will have undefined values.

Members

Enums

EventType
enum EventType
Undocumented in source.

Structs

JoystickButtonEvent
struct JoystickButtonEvent

Joystick buttons events parameters (JoystickButtonPressed, JoystickButtonReleased)

JoystickConnectEvent
struct JoystickConnectEvent

Joystick connection events parameters (JoystickConnected, JoystickDisconnected)

JoystickMoveEvent
struct JoystickMoveEvent

Joystick connection events parameters (JoystickConnected, JoystickDisconnected)

KeyEvent
struct KeyEvent

Keyboard event parameters (KeyPressed, KeyReleased)

MouseButtonEvent
struct MouseButtonEvent

Mouse buttons events parameters (MouseButtonPressed, MouseButtonReleased)

MouseMoveEvent
struct MouseMoveEvent

Mouse move event parameters (MouseMoved)

MouseWheelEvent
struct MouseWheelEvent

Mouse wheel events parameters (MouseWheelMoved)

SizeEvent
struct SizeEvent

Size events parameters (Resized)

TextEvent
struct TextEvent

Text event parameters (TextEntered)

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

type
EventType type;

Type of the event

Meta