[client] more cleanup and added alerts for new events

This commit is contained in:
Geoffrey McRae
2019-03-30 12:26:06 +11:00
parent 5d254c7751
commit 35094a57cb
10 changed files with 248 additions and 162 deletions

View File

@@ -21,9 +21,26 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <SDL2/SDL.h>
typedef enum LG_MsgAlert
{
LG_ALERT_INFO ,
LG_ALERT_SUCCESS,
LG_ALERT_WARNING,
LG_ALERT_ERROR
}
LG_MsgAlert;
typedef struct KeybindHandle * KeybindHandle;
typedef void (*SuperEventFn)(SDL_Scancode key, void * opaque);
/**
* Show an alert on screen
* @param type The alert type
* param fmt The alert message format
@ param ... formatted message values
*/
void app_alert(LG_MsgAlert type, const char * fmt, ...);
/**
* Register a handler for the <super>+<key> combination
* @param key The scancode to register