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

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

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)