Add default padding argument

This commit is contained in:
Just Call Me Koko 2020-02-01 13:47:39 -05:00
parent 225eb1668b
commit 9b392630f7
2 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,8 @@ void TFT_eSPI_Button::drawButton(bool inverted) {
_gfx->setTextDatum(tempdatum);
}
// Some added arguments for more custom buttons
// Mod author: https://github.com/justcallmekoko
void TFT_eSPI_Button::drawButton(uint8_t d, int padding, String button_name, boolean inverted) {
uint16_t fill, outline, text;

View File

@ -19,7 +19,7 @@ class TFT_eSPI_Button {
uint16_t w, uint16_t h, uint16_t outline, uint16_t fill,
uint16_t textcolor, char *label, uint8_t textsize);
void drawButton(bool inverted = false);
void drawButton(uint8_t d, int padding, String button_name = "", boolean inverted = false);
void drawButton(uint8_t d, int padding = 0, String button_name = "", boolean inverted = false);
bool contains(int16_t x, int16_t y);
void press(bool p);