🎨 Add MKS UI goto_previous_ui
This commit is contained in:
@@ -105,8 +105,7 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) {
|
||||
}
|
||||
else if (strcmp_P(txt, PSTR(LV_SYMBOL_CLOSE)) == 0) {
|
||||
if (kb->event_cb != lv_kb_def_event_cb) {
|
||||
lv_clear_keyboard();
|
||||
draw_return_ui();
|
||||
goto_previous_ui();
|
||||
}
|
||||
else {
|
||||
lv_kb_set_ta(kb, nullptr); // De-assign the text area to hide its cursor if needed
|
||||
@@ -122,13 +121,11 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) {
|
||||
#if ENABLED(MKS_WIFI_MODULE)
|
||||
case wifiName:
|
||||
memcpy(uiCfg.wifi_name, ret_ta_txt, sizeof(uiCfg.wifi_name));
|
||||
lv_clear_keyboard();
|
||||
draw_return_ui();
|
||||
goto_previous_ui();
|
||||
break;
|
||||
case wifiPassWord:
|
||||
memcpy(uiCfg.wifi_key, ret_ta_txt, sizeof(uiCfg.wifi_name));
|
||||
lv_clear_keyboard();
|
||||
draw_return_ui();
|
||||
goto_previous_ui();
|
||||
break;
|
||||
case wifiConfig:
|
||||
ZERO(uiCfg.wifi_name);
|
||||
@@ -160,8 +157,7 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) {
|
||||
uint8_t buf[100];
|
||||
strncpy((char *)buf, ret_ta_txt, sizeof(buf));
|
||||
update_gcode_command(AUTO_LEVELING_COMMAND_ADDR, buf);
|
||||
lv_clear_keyboard();
|
||||
draw_return_ui();
|
||||
goto_previous_ui();
|
||||
break;
|
||||
case GCodeCommand:
|
||||
if (ret_ta_txt[0] && !queue.ring_buffer.full(3)) {
|
||||
|
||||
Reference in New Issue
Block a user