36 #define BRIGHTNESS_VAL 3 //How much the Brightness is in/decreased for button shadows (3 -> Add/Subtract 1/3 off Full Value)
38 uint16_t c_light, c_dark;
42 r = (bgcolor & 0xF800) >> 11;
43 g = (bgcolor & 0x07E0) >> 5;
44 b = (bgcolor & 0x001F) >> 0;
81 if (light_shadow != NULL) {
82 *light_shadow = c_light;
85 if (dark_shadow != NULL) {
86 *dark_shadow = c_dark;
97 uint16_t c_light, c_dark;
100 switch (triggeredAction) {
146 }
else if ((button->
base.
x2 - button->
base.
x1 + 1) < (strwidth + 2)) {
152 button->
base.
y2 = button->
base.
y1 - 1 + strheight + (strheight / 2);
153 }
else if ((button->
base.
y2 - button->
base.
y1 + 1) < (strheight + 2)) {
169 uint16_t c_light, c_dark;
uint8_t tft_font_height(uint8_t fontnum)
bool touch_register_area(TOUCH_AREA_STRUCT *area)
const char * text
The label of the button.
uint8_t tft_font_width(uint8_t fontnum)
uint16_t txtcolor
The 16-bit text color.
Receive an event when the pen goes down inside the region.
Receive an event when the pen goes up inside the region.
void tft_draw_line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
uint16_t y1
Top Left Y-Coordinate of Area.
void tft_print_line(uint16_t x, uint16_t y, uint16_t color, uint16_t bgcolor, uint8_t font, const char *text)
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...
void touch_unregister_area(TOUCH_AREA_STRUCT *area)
uint16_t y2
Bottom Right Y-Coordinate of Area.
TOUCH_CALLBACK callback
Callback which is executed when an event occurred in this Area.
uint16_t x2
Bottom Right X-Coordinate of Area.
void tft_fill_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
TOUCH_ACTION hookedActions
Actions to listen to.
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.
Receive an event when the pen leaves the region (pen was inside region before)