Refactor...
This commit is contained in:
29
src/toast.h
Normal file
29
src/toast.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace anm2ed::toast
|
||||
{
|
||||
|
||||
class Toast
|
||||
{
|
||||
public:
|
||||
std::string message{};
|
||||
float lifetime{};
|
||||
|
||||
Toast(const std::string& message);
|
||||
};
|
||||
|
||||
class Toasts
|
||||
{
|
||||
public:
|
||||
std::vector<Toast> toasts{};
|
||||
|
||||
void update();
|
||||
void add(const std::string& message);
|
||||
void add_error(const std::string& message);
|
||||
};
|
||||
|
||||
extern Toasts toasts;
|
||||
}
|
||||
Reference in New Issue
Block a user