Open Bosser78 opened 5 months ago
int st = 0;
void ui_event_Button3(lv_event_t e) { lv_event_code_t event_code = lv_event_get_code(e); lv_obj_t target = lv_event_get_target(e); if (event_code == LV_EVENT_CLICKED) { if (st == 0) { lv_obj_set_style_bg_color(ui_Button3, lv_color_hex(0xFF0000), LV_STATE_DEFAULT); st = 1; } else { lv_obj_set_style_bg_color(ui_Button3, lv_color_hex(0x0000FF), LV_STATE_DEFAULT); st = 0; } } }
int st = 0;
void ui_event_Button3(lv_event_t e) { lv_event_code_t event_code = lv_event_get_code(e); lv_obj_t target = lv_event_get_target(e); if (event_code == LV_EVENT_CLICKED) { if (st == 0) { lv_obj_set_style_bg_color(ui_Button3, lv_color_hex(0xFF0000), LV_STATE_DEFAULT); st = 1; } else { lv_obj_set_style_bg_color(ui_Button3, lv_color_hex(0x0000FF), LV_STATE_DEFAULT); st = 0; } } }