reset Lua error message on network shutdown

This commit is contained in:
Isaac0-dev 2024-10-22 21:09:46 +10:00
parent fd99cee674
commit 85a81d3d81
3 changed files with 7 additions and 0 deletions

View file

@ -134,6 +134,11 @@ void djui_lua_error(char* text, struct DjuiColor color) {
sDjuiLuaErrorTimeout = 30 * 5;
}
void djui_lua_error_clear(void) {
sDjuiLuaErrorTimeout = 0;
djui_base_set_visible(&sDjuiLuaError->base, false);
}
void djui_reset_hud_params(void) {
djui_hud_set_resolution(RESOLUTION_DJUI);
djui_hud_set_font(FONT_NORMAL);

View file

@ -46,6 +46,7 @@ void djui_init(void);
void djui_init_late(void);
void djui_connect_menu_open(void);
void djui_lua_error(char* text, struct DjuiColor color);
void djui_lua_error_clear(void);
void djui_render(void);
void djui_reset_hud_params(void);

View file

@ -749,6 +749,7 @@ void network_shutdown(bool sendLeaving, bool exiting, bool popup, bool reconnect
gDjuiInMainMenu = true;
djui_panel_main_create(NULL);
}
djui_lua_error_clear();
#ifdef DISCORD_SDK
discord_activity_update();