Move button datum and deltas to constructor
This commit is contained in:
parent
1200c655f2
commit
572b65e79b
|
|
@ -3,7 +3,10 @@
|
||||||
** Grabbed from Adafruit_GFX library and enhanced to handle any label font
|
** Grabbed from Adafruit_GFX library and enhanced to handle any label font
|
||||||
***************************************************************************************/
|
***************************************************************************************/
|
||||||
TFT_eSPI_Button::TFT_eSPI_Button(void) {
|
TFT_eSPI_Button::TFT_eSPI_Button(void) {
|
||||||
_gfx = 0;
|
_gfx = 0;
|
||||||
|
_xd = 0;
|
||||||
|
_yd = 0;
|
||||||
|
_textdatum = MC_DATUM;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Classic initButton() function: pass center & size
|
// Classic initButton() function: pass center & size
|
||||||
|
|
@ -27,13 +30,10 @@ void TFT_eSPI_Button::initButtonUL(
|
||||||
_y1 = y1;
|
_y1 = y1;
|
||||||
_w = w;
|
_w = w;
|
||||||
_h = h;
|
_h = h;
|
||||||
_xd = 0;
|
|
||||||
_yd = 0;
|
|
||||||
_outlinecolor = outline;
|
_outlinecolor = outline;
|
||||||
_fillcolor = fill;
|
_fillcolor = fill;
|
||||||
_textcolor = textcolor;
|
_textcolor = textcolor;
|
||||||
_textsize = textsize;
|
_textsize = textsize;
|
||||||
_textdatum = MC_DATUM;
|
|
||||||
_gfx = gfx;
|
_gfx = gfx;
|
||||||
strncpy(_label, label, 9);
|
strncpy(_label, label, 9);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue