Skip to content

Commit

Permalink
Added public methods for button label
Browse files Browse the repository at this point in the history
  • Loading branch information
ihakov2 committed Oct 25, 2023
1 parent 126007f commit f11f001
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Adafruit_GFX.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ class Adafruit_GFX_Button {
uint8_t textsize_y);
void drawButton(bool inverted = false);
bool contains(int16_t x, int16_t y);
// Public methods to access button label to reuse the Button object.
char* getLabel() { return _label;}
void setLabel(char* label) {strncpy(_label, label, 9);_label[9]=0;}

/**********************************************************************/
/*!
Expand Down

0 comments on commit f11f001

Please sign in to comment.