[client] imgui: converted alerts to use imgui

This commit is contained in:
Quantum
2021-07-23 05:58:33 -04:00
committed by Geoffrey McRae
parent efb5019176
commit be44249c05
7 changed files with 107 additions and 9 deletions

View File

@@ -39,6 +39,8 @@
#include <math.h>
#include <string.h>
#define ALERT_TIMEOUT 2000000
bool app_isRunning(void)
{
return
@@ -511,14 +513,11 @@ void app_alert(LG_MsgAlert type, const char * fmt, ...)
valloc_sprintf(&buffer, fmt, args);
va_end(args);
g_state.lgr->on_alert(
g_state.lgrData,
type,
buffer,
NULL
);
free(buffer);
free(g_state.alertMessage);
g_state.alertMessage = buffer;
g_state.alertTimeout = microtime() + ALERT_TIMEOUT;
g_state.alertType = type;
g_state.alertShow = true;
}
KeybindHandle app_registerKeybind(int sc, KeybindFn callback, void * opaque, const char * description)