RIT VEXU Core API
Loading...
Searching...
No Matches
screen::SliderWidget Class Reference

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>

Public Member Functions

 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
 

Detailed Description

Widget that updates a double value. Updates by reference so watch out for race conditions cuz the screen stuff lives on another thread.

Constructor & Destructor Documentation

◆ SliderWidget()

screen::SliderWidget::SliderWidget ( double & val,
double low,
double high,
Rect rect,
std::string name )
inline

Creates a slider widget.

Parameters
valreference to the value to modify
lowminimum value to go to
highmaximum value to go to
rectrect to draw it
namename of the value

Member Function Documentation

◆ update()

bool screen::SliderWidget::update ( bool was_pressed,
int x,
int y )

responds to user input

Parameters
was_pressedif the screen is pressed
xx position if the screen was pressed
yy position if the screen was pressed
Returns
true if the value updated

The documentation for this class was generated from the following files: