VEXcode IQ C++ Unofficial documentation for version 3.0.4.1
Loading...
Searching...
No Matches
vex::controller::button Class Reference

Use the button class to get values from the controller's buttons. More...

#include <vex_controller.h>

Public Member Functions

 button (const tButtonType id, controller *parent)
 
void pressed (void(*callback)(void)) const
 Sets the function to be called when the button is pressed.
 
void released (void(*callback)(void)) const
 Sets the function to be called when the button is released.
 
bool pressing (void) const
 Gets the status of a button.
 

Detailed Description

Use the button class to get values from the controller's buttons.

Definition at line 89 of file vex_controller.h.

Constructor & Destructor Documentation

◆ button() [1/2]

vex::controller::button::button ( )
inline

Definition at line 95 of file vex_controller.h.

◆ button() [2/2]

vex::controller::button::button ( const tButtonType id,
controller * parent )
inline

Definition at line 96 of file vex_controller.h.

◆ ~button()

vex::controller::button::~button ( )
inline

Definition at line 97 of file vex_controller.h.

Member Function Documentation

◆ pressed()

void vex::controller::button::pressed ( void(* callback )(void)) const

Sets the function to be called when the button is pressed.

Parameters
callbackA reference to a function.

◆ pressing()

bool vex::controller::button::pressing ( void ) const

Gets the status of a button.

Returns
Returns a Boolean value based on the pressed states of the button. If the button is pressed it will return true.

◆ released()

void vex::controller::button::released ( void(* callback )(void)) const

Sets the function to be called when the button is released.

Parameters
callbackA reference to a function.

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