blob: 03d484b4e2bf609f715153bee9c2d97e566a73c6 (
plain)
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
38
|
#ifndef NOTIFICATION_H
#define NOTIFICATION_H
#ifdef __cplusplus
#include <string>
#include <cstdint>
#include <ship/window/gui/GuiWindow.h>
namespace Notification {
struct Options {
uint32_t id = 0;
const char* itemIcon = nullptr;
std::string prefix = "";
ImVec4 prefixColor = ImVec4(0.5f, 0.5f, 1.0f, 1.0f);
std::string message = "";
ImVec4 messageColor = ImVec4(0.7f, 0.7f, 0.7f, 1.0f);
std::string suffix = "";
ImVec4 suffixColor = ImVec4(1.0f, 0.5f, 0.5f, 1.0f);
float remainingTime = 0.0f; // Seconds
bool mute = false;
};
class Window : public Ship::GuiWindow {
public:
using GuiWindow::GuiWindow;
void InitElement() override{};
void DrawElement() override{};
void Draw() override;
void UpdateElement() override;
};
void Emit(Options notification);
} // namespace Notification
#endif // __cplusplus
#endif // NOTIFICATION_H
|