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

Simple page that stores no internal data. the draw and update functions use only global data rather than storing anything. More...

#include <screen.h>

Inheritance diagram for screen::FunctionPage:
screen::Page

Public Member Functions

 FunctionPage (update_func_t update_f, draw_func_t draw_t)
 Creates a function page.
 
void update (bool was_pressed, int x, int y) override
 update uses the supplied update function to update this page
 
void draw (vex::brain::lcd &, bool first_draw, unsigned int frame_number) override
 draw uses the supplied draw function to draw to the screen
 

Detailed Description

Simple page that stores no internal data. the draw and update functions use only global data rather than storing anything.

Constructor & Destructor Documentation

◆ FunctionPage()

screen::FunctionPage::FunctionPage ( update_func_t update_f,
draw_func_t draw_f )

Creates a function page.

FunctionPage.

Parameters
update_fthe function called every tick to respond to user input or do data collection
draw_tthe function called to draw to the screen
update_fdrawing function
draw_fdrawing function

Member Function Documentation

◆ draw()

void screen::FunctionPage::draw ( vex::brain::lcd & screen,
bool first_draw,
unsigned int frame_number )
overridevirtual

draw uses the supplied draw function to draw to the screen

See also
Page::draw

Reimplemented from screen::Page.

◆ update()

void screen::FunctionPage::update ( bool was_pressed,
int x,
int y )
overridevirtual

update uses the supplied update function to update this page

See also
Page::update

Reimplemented from screen::Page.


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