Adds a NummericUpDown. Your Callback will be called from now on, if the numupdown's value changes
83 if (numupdown->
min > numupdown->
max) {
87 if (numupdown->
value < numupdown->
min) {
89 }
else if (numupdown->
value > numupdown->
max) {
uint8_t tft_font_height(uint8_t fontnum)
const char * text
The label of the button.
uint8_t tft_font_width(uint8_t fontnum)
uint16_t txtcolor
The 16-bit text color.
uint16_t x
The x-Coordinate of the Top-Left Starting Point.
uint16_t y1
Top Left Y-Coordinate of Area.
void tft_print_formatted(uint16_t x, uint16_t y, uint16_t color, uint16_t bgcolor, uint8_t font, const char *format,...)
uint16_t x1
Top Left X-Coordinate of Area.
uint16_t bgcolor
The 16-bit background color of the button.
TOUCH_AREA_STRUCT base
Basic geometry of the button. You only need to set the x1, y1, x2, y2 members of this struct...
uint16_t y2
Bottom Right Y-Coordinate of Area.
void button_down_cb(void *button)
static uint8_t calc_text_width(int16_t val)
uint16_t y
The y-Coordinate of the Top-Left Starting Point.
int16_t max
The maximum possible value (inclusive)
uint16_t x2
Bottom Right X-Coordinate of Area.
int16_t min
The minimum possible value (inclusive)
void tft_fill_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
uint16_t fgcolor
The 16-bit color of the value-text.
BUTTON_STRUCT buttonDown
For internal use, don't change, don't initialize.
void button_up_cb(void *button)
int16_t value
The current/default value.
BUTTON_CALLBACK callback
Callback which is executed when the button is pressed.
bool touch_have_empty(unsigned char num)
uint8_t font
The number of the font to use.
BUTTON_STRUCT buttonUp
For internal use, don't change, don't initialize.