RIT VEXU Core API
Loading...
Searching...
No Matches
auto_chooser.h
1#pragma once
2#include "../core/include/subsystems/screen.h"
3#include "../core/include/utils/geometry.h"
4#include "vex.h"
5#include <string>
6#include <vector>
7
17class AutoChooser : public screen::Page {
18public:
24 AutoChooser(std::vector<std::string> paths, size_t def = 0);
25
26 void update(bool was_pressed, int x, int y);
27 void draw(vex::brain::lcd &, bool first_draw, unsigned int frame_number);
28
33 size_t get_choice();
34
35protected:
39 struct entry_t {
40 Rect rect;
41 std::string name;
42 };
43
44 static const size_t width = 380;
45 static const size_t height = 220;
46
47 size_t choice;
48 std::vector<entry_t> list ;
49};
Definition auto_chooser.h:17
std::vector< entry_t > list
Definition auto_chooser.h:48
size_t choice
Definition auto_chooser.h:47
AutoChooser(std::vector< std::string > paths, size_t def=0)
Definition auto_chooser.cpp:8
size_t get_choice()
Definition auto_chooser.cpp:61
Page describes one part of the screen slideshow.
Definition screen.h:125
Definition auto_chooser.h:39
std::string name
Definition auto_chooser.h:41