Added function getLabel() to expose the button label.

This commit is contained in:
Eduardo Gonzalez 2021-04-05 21:10:30 -03:00
parent 221bb41cd2
commit 95855b1a09

View File

@ -291,6 +291,14 @@ public:
/**********************************************************************/
bool isPressed(void) { return currstate; };
/**********************************************************************/
/*!
@brief Get the label text
@returns the const char pointer of the buttoś label
*/
/**********************************************************************/
char *getLabel(void) const { return _label; };
private:
Adafruit_GFX *_gfx;
int16_t _x1, _y1; // Coordinates of top-left corner