29 lines
494 B
C++
29 lines
494 B
C++
|
namespace Components
|
||
|
{
|
||
|
class Toast : public Component
|
||
|
{
|
||
|
public:
|
||
|
Toast();
|
||
|
~Toast();
|
||
|
const char* GetName() { return "Toast"; };
|
||
|
|
||
|
static void Show(const char* image, const char* title, const char* description, int length);
|
||
|
|
||
|
private:
|
||
|
struct UIToast
|
||
|
{
|
||
|
std::string Image;
|
||
|
std::string Title;
|
||
|
std::string Desc;
|
||
|
int Length;
|
||
|
int Start;
|
||
|
};
|
||
|
|
||
|
static void Handler();
|
||
|
static void Draw(UIToast* toast);
|
||
|
|
||
|
static std::queue<UIToast> Queue;
|
||
|
static std::mutex Mutex;
|
||
|
};
|
||
|
}
|