MCPcopy Create free account
hub / github.com/BruceDevices/firmware / TFT_eSPI_Button

Method TFT_eSPI_Button

lib/TFT_eSPI/Extensions/Button.cpp:5–13  ·  view source on GitHub ↗

** Code for the GFX button UI element ** Grabbed from Adafruit_GFX library and enhanced to handle any label font ***************************************************************************************/

Source from the content-addressed store, hash-verified

3** Grabbed from Adafruit_GFX library and enhanced to handle any label font
4***************************************************************************************/
5TFT_eSPI_Button::TFT_eSPI_Button(void) {
6 _gfx = nullptr;
7 _xd = 0;
8 _yd = 0;
9 _textdatum = MC_DATUM;
10 _label[9] = '\0';
11 currstate = false;
12 laststate = false;
13}
14
15// Classic initButton() function: pass center & size
16void TFT_eSPI_Button::initButton(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected