Base class for GUI, contains all elements and handles viewport and rendering transformations.
More...
#include <base.hpp>
Base class for GUI, contains all elements and handles viewport and rendering transformations.
Tucano::GUI::Base::Base |
( |
void |
| ) |
|
|
inline |
void Tucano::GUI::Base::add |
( |
Element * |
el | ) |
|
|
inline |
Adds an element to the gui.
Check if any element in a given list is inside clicked coordinates.
- Parameters
-
x | X clicked coordinate |
y | Y clicked coordinate |
list | Element list |
- Returns
- True if any element was clicked, false otherwise
bool Tucano::GUI::Base::cursorMove |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
Treats mouse mouvement.
- Parameters
-
x | Mouse x position |
y | Mouse y position |
- Returns
- True if any element is selected, false otherwise
bool Tucano::GUI::Base::leftButtonPressed |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
Treats mouse left click callback for all elements.
- Parameters
-
x | Mouse x position |
y | Mouse y position |
- Returns
- True if any gui element was clicked, false otherwise
bool Tucano::GUI::Base::leftButtonReleased |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
Treats mouse left release callback for last clicked element.
- Parameters
-
x | Mouse x position |
y | Mouse y position |
- Returns
- True if any element is selected, false otherwise
void Tucano::GUI::Base::render |
( |
void |
| ) |
|
|
inline |
renders the 2D gui interface
void Tucano::GUI::Base::setViewportSize |
( |
const Eigen::Vector2i & |
vs | ) |
|
|
inline |
Set viewport size.
- Parameters
-
void Tucano::GUI::Base::setViewportSize |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
inline |
Set viewport size.
- Parameters
-
w | Viewport width |
h | Viewport height |
Vector containing gui elements.
Shader for rendering gui elements.
Eigen::Vector2i Tucano::GUI::Base::viewport_size |
|
protected |
The documentation for this class was generated from the following file: