VSGL2 - Very Simple Graphic Library 2
2.0
|
Functions | |
bool | is_pressed (int key) |
Use to check if a button is pressed. More... | |
string | read_text (string font, int dim, int x, int y, Color c, uint8_t max_length=0) |
Use to read text from the user, the return key stops the input. More... | |
int | get_mouse_x () |
Use to get the mouse x coordinate. More... | |
int | get_mouse_y () |
Use to get the mouse y coordinate. More... | |
int | get_mouse_wheel_x () |
Use to get the mouse wheel horizontal value,. More... | |
int | get_mouse_wheel_y () |
Use to get the mouse wheel vertical value,. More... | |
bool | mouse_left_button_pressed () |
Use to check if the mouse left button is pressed. More... | |
bool | mouse_right_button_pressed () |
Use to check if the mouse right button is pressed. More... | |
int get_mouse_wheel_x | ( | ) |
Use to get the mouse wheel horizontal value,.
int get_mouse_wheel_y | ( | ) |
Use to get the mouse wheel vertical value,.
int get_mouse_x | ( | ) |
Use to get the mouse x coordinate.
int get_mouse_y | ( | ) |
Use to get the mouse y coordinate.
bool is_pressed | ( | int | key | ) |
Use to check if a button is pressed.
key | The enum value indicating the key pressed |
bool mouse_left_button_pressed | ( | ) |
Use to check if the mouse left button is pressed.
bool mouse_right_button_pressed | ( | ) |
Use to check if the mouse right button is pressed.
string read_text | ( | string | font, |
int | dim, | ||
int | x, | ||
int | y, | ||
Color | c, | ||
uint8_t | max_length = 0 |
||
) |
Use to read text from the user, the return key stops the input.
font | The filename of the font. |
dim | Font dimension |
x | The x coordinate of the upper left corner of the text inside the window coordinates |
y | The y coordinate of the upper left corner of the text inside the window coordinates |
c | The color of the text |
max_length | The maximum length of the text that can be written. The default value is 0, which means that there is no limit to the text length, otherwise the user can write only max_length characters. The value range is from 0 to 255, greater numbers than that will be truncated. |