Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Object Reference

RobotMan192 edited this page Feb 12, 2023 · 6 revisions

Class: Display

Display::Display(vex::brain* b, int flags = 0)

Takes in a pointer to the brain and any additional flags

Display::addWidget(IWidget* widget)

returns: void

takes a pointer to a widget such as a button

Display::swapCanvas(Canvas *canvas)

returns: void

switches or sets the current canvas the display is using only one canvas can be used at once

Display::init()

returns: void

runs the display add the widgets before doing this

Display::setFont(fontType f)

returns: void

takes in a vex fontType and changes the font on the screen to that

Display::getFrameTime()

returns: int

returns the time in milliseconds it takes to generate a frame

Display::getFPS()

returns: int

returns the frames per second

Class: Canvas

Canvas::Canvas()

Creates a canvas object. A canvas acts like a buffer that stores widgets. Only one canvas can be displayed at a time

Display::addWidget(IWidget* widget)

returns: void