| 65 | } |
| 66 | |
| 67 | void View::setLoading(bool loading) { |
| 68 | if (loading) { |
| 69 | lv_obj_add_flag(connect_button, LV_OBJ_FLAG_HIDDEN); |
| 70 | lv_obj_remove_flag(connecting_spinner, LV_OBJ_FLAG_HIDDEN); |
| 71 | lv_obj_add_state(password_textarea, LV_STATE_DISABLED); |
| 72 | lv_obj_add_state(ssid_textarea, LV_STATE_DISABLED); |
| 73 | lv_obj_add_state(remember_switch, LV_STATE_DISABLED); |
| 74 | } else { |
| 75 | lv_obj_remove_flag(connect_button, LV_OBJ_FLAG_HIDDEN); |
| 76 | lv_obj_add_flag(connecting_spinner, LV_OBJ_FLAG_HIDDEN); |
| 77 | lv_obj_remove_state(password_textarea, LV_STATE_DISABLED); |
| 78 | lv_obj_remove_state(ssid_textarea, LV_STATE_DISABLED); |
| 79 | lv_obj_remove_state(remember_switch, LV_STATE_DISABLED); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | void View::createBottomButtons(lv_obj_t* parent) { |
| 84 | auto* button_container = lv_obj_create(parent); |