From f11f001beed4f7a6d6c6a66389b6d10f1e9286c9 Mon Sep 17 00:00:00 2001 From: ildus hakov Date: Wed, 25 Oct 2023 15:34:27 -0400 Subject: [PATCH] Added public methods for button label --- Adafruit_GFX.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Adafruit_GFX.h b/Adafruit_GFX.h index 63c6ab68..bc2b2d6e 100644 --- a/Adafruit_GFX.h +++ b/Adafruit_GFX.h @@ -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;} /**********************************************************************/ /*!