staticvoidstate_prompts_set_prompts(lv_obj_t* prompts){/* There has been a prompts */for(char i =0; i <STATE_PROMPTS_SIZE(_state_prompts_pos); i++){if(_state_prompts_pos[i].prompts == prompts){return;}}for(char i =0; i <STATE_PROMPTS_SIZE(_state_prompts_pos); i++){if(_state_prompts_pos[i].prompts ==NULL)/* find a free place */{
_state_prompts_pos[i].prompts = prompts;lv_obj_set_hidden(prompts, false);//printf("set %d\r\n", i);break;}}}
staticvoidstate_prompts_align_not_0(lv_obj_t* obj,lv_obj_t*base,lv_coord_t x,lv_coord_t y){lv_obj_align(obj, base, LV_ALIGN_OUT_LEFT_MID, x, y);}voidlv_update_state_prompts_pos_change(void){for(char i =0; i <(STATE_PROMPTS_SIZE(_state_prompts_pos)); i++){if(_state_prompts_pos[i].prompts ==NULL)/* if current obj is NULL */{char y =0;for(y = i; y <STATE_PROMPTS_SIZE(_state_prompts_pos)-1; y++){if(_state_prompts_pos[y].prompts)break;}
_state_prompts_pos[i].prompts = _state_prompts_pos[y].prompts;
_state_prompts_pos[y].prompts =NULL;}}if(_state_prompts_pos[0].prompts){lv_obj_t* par =lv_scr_act();lv_obj_align(_state_prompts_pos[0].prompts, par, LV_ALIGN_IN_TOP_RIGHT,-10,30);}for(char i =1; i <STATE_PROMPTS_SIZE(_state_prompts_pos); i++){if(_state_prompts_pos[i].prompts ==NULL)continue;state_prompts_align_not_0(_state_prompts_pos[i].prompts, _state_prompts_pos[i-1].prompts,-10,0);}}