mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 21:26:43 +00:00
Dismiss msgbox only when a button was pressed
This commit is contained in:
parent
6770c57c08
commit
03ad5e4159
@ -509,6 +509,7 @@ void msgbox_event_handler(lv_obj_t* obj, lv_event_t event)
|
||||
if(val != LV_BTNMATRIX_BTN_NONE) {
|
||||
const char* txt = lv_msgbox_get_active_btn_text(obj);
|
||||
strncpy(buffer, txt, sizeof(buffer));
|
||||
if(hasp_event_id == HASP_EVENT_UP || hasp_event_id == HASP_EVENT_RELEASE) lv_msgbox_start_auto_close(obj, 0);
|
||||
} else {
|
||||
buffer[0] = 0; // empty string
|
||||
}
|
||||
@ -518,8 +519,6 @@ void msgbox_event_handler(lv_obj_t* obj, lv_event_t event)
|
||||
last_value_sent = val;
|
||||
event_object_selection_changed(obj, hasp_event_id, val, buffer);
|
||||
// if(max > 0) dispatch_normalized_group_value(obj->user_data.groupid, obj, val, 0, max);
|
||||
|
||||
if(hasp_event_id == HASP_EVENT_UP || hasp_event_id == HASP_EVENT_RELEASE) lv_msgbox_start_auto_close(obj, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user