void set_callback_key_pressed(std::function< void(KeyboardButtons)> &&callback) noexcept
The provided callback function is called once every time a key is pressed.
int get_mouse_x() noexcept
Get the mouse's X position relative to the currently set doodle::FrameOfReference.
EVENT_HOOK void on_key_released(doodle::KeyboardButtons button)
The declaration of the optional on_key_released function to implement in your doodle program.
bool KeyIsPressed
The boolean system variable KeyIsPressed is true if any key is pressed and false if no keys are press...
EVENT_HOOK void on_mouse_released(doodle::MouseButtons button)
The declaration of the optional on_mouse_released function to implement in your doodle program.
void set_callback_key_released(std::function< void(KeyboardButtons)> &&callback) noexcept
The provided callback function is called once every time a key is released.
EVENT_HOOK void on_mouse_moved(int mouse_x, int mouse_y)
The declaration of the optional on_mouse_moved function to implement in your doodle program.
MouseButtons MouseButton
doodle automatically tracks if the mouse button is pressed and which button is pressed....
void set_callback_mouse_pressed(std::function< void(MouseButtons)> &&callback) noexcept
The provided callback is called whenever a mouse button is pressed.
int get_previous_mouse_x() noexcept
Get the previous mouse's X position relative to the currently set doodle::FrameOfReference.
KeyboardButtons Key
The system variable key always contains the value of the most recent key on the keyboard that was typ...
int get_previous_mouse_y() noexcept
Get the previous mouse's Y position relative to the currently set doodle::FrameOfReference.
void set_callback_mouse_released(std::function< void(MouseButtons)> &&callback) noexcept
The provided callback is called whenever a mouse button is released.
bool MouseIsPressed
The boolean system variable MouseIsPressed is true if the mouse is pressed and false if not.
EVENT_HOOK void on_mouse_pressed(doodle::MouseButtons button)
The declaration of the optional on_mouse_pressed function to implement in your doodle program.
void set_callback_mouse_moved(std::function< void(int, int)> &&callback) noexcept
The provided callback function is called every time the mouse moves.
void set_callback_mouse_wheel(std::function< void(int)> &&callback) noexcept
The provided callback is called whenever the mouse wheel is scrolled.
EVENT_HOOK void on_key_pressed(doodle::KeyboardButtons button)
The declaration of the optional on_key_pressed function to implement in your doodle program.
EVENT_HOOK void on_mouse_wheel(int scroll_amount)
The declaration of the optional on_mouse_wheel function to implement in your doodle program.
int get_mouse_y() noexcept
Get the mouse's Y position relative to the currently set doodle::FrameOfReference.
std::string to_string(MouseButtons button) noexcept
Convert MouseButtons enum to std::string.
std::wstring to_wstring(MouseButtons button) noexcept
Convert MouseButtons enum to std::wstring.
@ Right
Right Mouse Button.
@ Middle
Middle Mouse Button.
@ Count
the total number of mouse button keys
@ NumPad_0
The numpad 0 key.
@ Subtract
The - key (minus, usually from numpad)
@ NumPad_1
The numpad 1 key.
@ NumPad_8
The numpad 8 key.
@ NumPad_9
The numpad 9 key.
@ NumPad_4
The numpad 4 key.
@ Hyphen
The - key (hyphen)
@ LeftSystem
The left OS specific key: window (Windows and Linux), apple (MacOS X), ...
@ CapsLock
The Caps Lock key.
@ NumPad_7
The numpad 7 key.
@ Control
The Control key.
@ PrintScreen
The Print Screen key.
@ NumPad_3
The numpad 3 key.
@ NumPad_2
The numpad 2 key.
@ Backspace
The Backspace key.
@ RightSystem
The right OS specific key: window (Windows and Linux), apple (MacOS X), ...
@ NumPad_5
The numpad 5 key.
@ Count
the total number of keyboard keys
@ PageDown
The Page down key.
@ Enter
The Enter/Return keys.
@ NumPad_6
The numpad 6 key.