mirror of
https://github.com/adafruit/Adafruit-GFX-Library.git
synced 2024-10-03 18:18:46 -04:00
Clang 4
This commit is contained in:
parent
3096b939f5
commit
a124bcce30
@ -1729,12 +1729,20 @@ bool Adafruit_GFX_Button::justReleased() { return (!currstate && laststate); }
|
|||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
/*!
|
/*!
|
||||||
@brief Set label to button object.
|
@brief Set label to button object.
|
||||||
|
@param label char pointer to new button label
|
||||||
*/
|
*/
|
||||||
void Adafruit_GFX_Button::setLabel(char *label) {
|
void Adafruit_GFX_Button::setLabel(char *label) {
|
||||||
strncpy(_label, label, 9);
|
strncpy(_label, label, 9);
|
||||||
_label[9] = 0;
|
_label[9] = 0;
|
||||||
}
|
}
|
||||||
|
/**************************************************************************/
|
||||||
|
/*!
|
||||||
|
@brief Get button label
|
||||||
|
@return button label char pointer
|
||||||
|
*/
|
||||||
|
char *Adafruit_GFX_Button::getLabel() {
|
||||||
|
return _label;
|
||||||
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
// GFXcanvas1, GFXcanvas8 and GFXcanvas16 (currently a WIP, don't get too
|
// GFXcanvas1, GFXcanvas8 and GFXcanvas16 (currently a WIP, don't get too
|
||||||
|
@ -271,8 +271,8 @@ public:
|
|||||||
uint8_t textsize_y);
|
uint8_t textsize_y);
|
||||||
void drawButton(bool inverted = false);
|
void drawButton(bool inverted = false);
|
||||||
bool contains(int16_t x, int16_t y);
|
bool contains(int16_t x, int16_t y);
|
||||||
// Public methods to access button label to reuse the Button object.
|
|
||||||
char *getLabel() { return _label; }
|
char *getLabel();
|
||||||
void setLabel(char *label);
|
void setLabel(char *label);
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user