Wizard Engine
2D cross-platform game engine built around SDL2
 
Loading...
Searching...
No Matches
input.hpp File Reference

Touchscreen finger data. More...

Go to the source code of this file.

Classes

struct  wze::finger
 
struct  wze::gesture
 
class  wze::input
 

Namespaces

namespace  wze
 Wizard Engine.
 

Detailed Description

Touchscreen finger data.

Returns the spatial x, y components of the cursor.

Returns true if a keymap is triggered, false otherwise.

Returns true if a keyboard or mousekey is pressed, false otherwise.

Returns the rotation on the z axis of the accelerometer.

Returns the rotation on the y axis of the accelerometer.

Returns the rotation on the x axis of the accelerometer.

Returns the latest gesture event on the touchscreen if any.

Returns fingers absolute and relative positions on the touchscreen.

Sets the appearance of the cursor.

Sets the visibility of the cursor.

Returns the visibility of the cursor.

Sets the sensitivity of the mouse.

Returns the sensitivity of the mouse.

Returns the current relative y position of the cursor.

Returns the current relative x position of the cursor.

Returns the current absolute y position of the cursor.

Returns the current absolute x position of the cursor.

Returns the keymap registry.

Returns the key of the last keyboard event in UTF-32 encoding.

Enables or disables event based keyboard input.

Return whether the event based keyboard input is enabled.

Polls for accelerometer data if available.

Polls for the latest gesture event on the touchscreen if any.

Polls for fingers absolute and relative positions on the touchscreen.

Polls for cursor absolute and relative positions.

Polls for keyboard and mousekey states.

Polls for the last keyboard event.

Private default constructor to prevent instantiation.

Subsystem to handle keyboard, mouse, touchscreen and sensor input.

Touchscreen gesture data.

Author
Zana Domán
Zana Domán
Warning
If accelerometer data cannot be polled, throws wze::exception.
Author
Zana Domán
Returns
Whether the event based keyboard input is enabled.
Note
Controls on-screen keyboard on mobile systems.
Author
Zana Domán
Parameters
text_inputWhether the event based keyboard input is enabled.
Note
Controls on-screen keyboard on mobile systems.
Author
Zana Domán
Returns
Key of the last keyboard event in UTF-32 encoding.
Author
Zana Domán
Returns
Keymap registry.
Author
Zana Domán
Returns
Current absolute x position of the cursor.
Author
Zana Domán
Returns
Current absolute y position of the cursor.
Author
Zana Domán
Returns
Current relative x position of the cursor.
Author
Zana Domán
Returns
Current relative y position of the cursor.
Author
Zana Domán
Returns
Sensitivity of the mouse.
Note
Setting this value to 0 locks the cursor's relative position, setting this value less than 0 inverts the cursor's relative position.
Author
Zana Domán
Parameters
mouse_sensitivitySensitivity of the mouse.
Note
Setting this value to 0 locks the cursor's relative position, setting this value less than 0 inverts the cursor's relative position.
Author
Zana Domán
Returns
Visibility of the cursor.
Note
Hiding the cursor also captures it into the game window.
Author
Zana Domán
Parameters
cursor_visibleVisibility of the cursor.
Note
Hiding the cursor also captures it into the game window.
Warning
If cursor visibility cannot be set, throws wze::exception.
Author
Zana Domán
Parameters
cursor_appearanceAppearance of the cursor.
Note
The engine must take ownership over the cursor appearance.
Author
Zana Domán
Returns
Fingers absolute and relative positions on the touchscreen.
Author
Zana Domán
Returns
Latest gesture event on the touchscreen if any.
Author
Zana Domán
Returns
Rotation on the x axis of the acccelerometer.
Author
Zana Domán
Returns
Rotation on the y axis of the acccelerometer.
Author
Zana Domán
Returns
Rotation on the z axis of the acccelerometer.
Author
Zana Domán
Parameters
keyThe keyboard or mousekey.
Returns
True if the keyboard or mousekey is pressed, false otherwise.
Author
Zana Domán
Parameters
nameName of the keymap.
Returns
True if the keymap is triggered, false otherwise.
Author
Zana Domán
Parameters
zSpatial z component of the cursor.
Returns
Spatial x, y components of the cursor.

Definition in file input.hpp.