[client] overlay/msg: provide a method to close messages from code

This commit is contained in:
Geoffrey McRae committed 2022-01-12 09:35:09 +11:00
1 parent ced952a4c6
commit 6fc0c69b2e
4 files changed
+28 -7

No files matched your search

+13 -2
View File
@@ -637,14 +637,25 @@ void app_alert(LG_MsgAlert type, const char * fmt, ...)
va_end(args);
}
void app_msgBox(const char * caption, const char * fmt, ...)
MsgBoxHandle app_msgBox(const char * caption, const char * fmt, ...)
{
va_list args;
va_start(args, fmt);
overlayMsg_show(caption, fmt, args);
MsgBoxHandle handle =
overlayMsg_show(caption, fmt, args);
va_end(args);
core_updateOverlayState();
return handle;
}
void app_msgBoxClose(MsgBoxHandle * handle)
{
if (!handle)
return;
overlayMsg_close(handle);
}
KeybindHandle app_registerKeybind(int sc, KeybindFn callback, void * opaque, const char * description)