-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdlgMsg.h
37 lines (23 loc) · 940 Bytes
/
dlgMsg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//--------------------------------------
// The msg, error, and warning windows
//--------------------------------------
#pragma once
#include "gApp.h"
class dlgMsg : public uiWindow
{
public:
dlgMsg();
virtual bool isModal() const override { return true; }
void setMsg(uint16_t color, const char *line1, const char *line2="");
void setTimeout(uint32_t timeout) {m_timeout = timeout;}
// must be called AFTER setMsg
private:
virtual void update() override;
virtual void onButton(const uiElement *ele, bool pressed) override;
uint32_t m_timeout;
};
extern dlgMsg msg_dlg;
extern void okMsg(const char *line1, const char *line2="");
extern void errorMsg(const char *msg);
extern void warningMsg(const char *msg);
extern void doToast(uint16_t color, const char *line1, const char *line2="", uint32_t timeout=5000);