Widget that updates a double value. Updates by reference so watch out for race conditions cuz the screen stuff lives on another thread.
More...
#include <screen.h>
|
| | SliderWidget (double &val, double low, double high, Rect rect, std::string name) |
| | Creates a slider widget.
|
| |
| bool | update (bool was_pressed, int x, int y) |
| | responds to user input
|
| |
|
void | draw (vex::brain::lcd &, bool first_draw, unsigned int frame_number) |
| | Page::draws the slide to the screen
|
| |
Widget that updates a double value. Updates by reference so watch out for race conditions cuz the screen stuff lives on another thread.
◆ SliderWidget()
| screen::SliderWidget::SliderWidget |
( |
double & | val, |
|
|
double | low, |
|
|
double | high, |
|
|
Rect | rect, |
|
|
std::string | name ) |
|
inline |
Creates a slider widget.
- Parameters
-
| val | reference to the value to modify |
| low | minimum value to go to |
| high | maximum value to go to |
| rect | rect to draw it |
| name | name of the value |
◆ update()
| bool screen::SliderWidget::update |
( |
bool | was_pressed, |
|
|
int | x, |
|
|
int | y ) |
responds to user input
- Parameters
-
| was_pressed | if the screen is pressed |
| x | x position if the screen was pressed |
| y | y position if the screen was pressed |
- Returns
- true if the value updated
The documentation for this class was generated from the following files: