1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-26 19:52:11 +00:00

nyx: Ensure that close button var always gets nulled

This commit is contained in:
CTCaer 2020-04-30 04:32:55 +03:00
parent 7e96a4dd3a
commit 56034f9aac
3 changed files with 12 additions and 1 deletions

View file

@ -455,6 +455,13 @@ void nyx_window_toggle_buttons(lv_obj_t *win, bool disable)
}
}
lv_res_t lv_win_close_action_custom(lv_obj_t * btn)
{
close_btn = NULL;
return lv_win_close_action(btn);
}
lv_obj_t *nyx_create_standard_window(const char *win_title)
{
static lv_style_t win_bg_style;
@ -468,7 +475,7 @@ lv_obj_t *nyx_create_standard_window(const char *win_title)
lv_win_set_style(win, LV_WIN_STYLE_BG, &win_bg_style);
lv_obj_set_size(win, LV_HOR_RES, LV_VER_RES);
close_btn = lv_win_add_btn(win, NULL, SYMBOL_CLOSE" Close", lv_win_close_action);
close_btn = lv_win_add_btn(win, NULL, SYMBOL_CLOSE" Close", lv_win_close_action_custom);
return win;
}

View file

@ -51,6 +51,8 @@ static lv_res_t _action_emummc_window_close(lv_obj_t *btn)
(*emummc_tools)(NULL);
close_btn = NULL;
return LV_RES_INV;
}

View file

@ -71,6 +71,8 @@ static lv_res_t _win_autoboot_close_action(lv_obj_t * btn)
lv_obj_del(win);
close_btn = NULL;
return LV_RES_INV;
}