I am trying to figure out how to draw a button on a vex v5 cortex and make it able to be toggled on and off by tapping it. I dont know how to do this at all
There’s an example here, may be a bit more than you need but have a look.
To make the code work for auton selection, we will change how the buttons react and make them more like a radio control group, that is, only one can be selected at a time. We create a global variable to save our selection.
// storage for our auton selection
int autonomousSelection = -1;
The userTouchCallbackReleased function now looks like this.
/*-----------------------------------------------------------------------------*/
/** @brief Screen has been (un)touched …
there’s some explanation earlier in that same topic.