Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodmer committed May 11, 2021
1 parent 612e763 commit 8164629
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Extensions/Button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
** Grabbed from Adafruit_GFX library and enhanced to handle any label font
***************************************************************************************/
TFT_eSPI_Button::TFT_eSPI_Button(void) {
_gfx = 0;
_gfx = nullptr;
_xd = 0;
_yd = 0;
_textdatum = MC_DATUM;
_label[9] = '\0';
}

// Classic initButton() function: pass center & size
Expand Down
4 changes: 2 additions & 2 deletions Extensions/Button.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TFT_eSPI_Button {

public:
TFT_eSPI_Button(void);
// "Classic" initButton() uses center & size
// "Classic" initButton() uses centre & size
void initButton(TFT_eSPI *gfx, int16_t x, int16_t y,
uint16_t w, uint16_t h, uint16_t outline, uint16_t fill,
uint16_t textcolor, char *label, uint8_t textsize);
Expand All @@ -34,7 +34,7 @@ class TFT_eSPI_Button {
private:
TFT_eSPI *_gfx;
int16_t _x1, _y1; // Coordinates of top-left corner of button
int16_t _xd, _yd; // Button text datum offsets (wrt center of button)
int16_t _xd, _yd; // Button text datum offsets (wrt centre of button)
uint16_t _w, _h; // Width and height of button
uint8_t _textsize, _textdatum; // Text size multiplier and text datum for button
uint16_t _outlinecolor, _fillcolor, _textcolor;
Expand Down

0 comments on commit 8164629

Please sign in to comment.