2017-06-12 16:38:59 +00:00
|
|
|
#pragma once
|
2017-10-31 17:12:50 +00:00
|
|
|
#ifndef ES_APP_GUIS_GUI_INFO_POPUP_H
|
|
|
|
#define ES_APP_GUIS_GUI_INFO_POPUP_H
|
2017-06-12 16:38:59 +00:00
|
|
|
|
|
|
|
#include "GuiComponent.h"
|
|
|
|
#include "Window.h"
|
|
|
|
|
2017-11-01 22:21:10 +00:00
|
|
|
class ComponentGrid;
|
|
|
|
class NinePatchComponent;
|
2017-06-12 16:38:59 +00:00
|
|
|
|
|
|
|
class GuiInfoPopup : public GuiComponent, public Window::InfoPopup
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GuiInfoPopup(Window* window, std::string message, int duration);
|
|
|
|
~GuiInfoPopup();
|
2017-10-28 20:24:35 +00:00
|
|
|
void render(const Transform4x4f& parentTrans) override;
|
2017-06-12 16:38:59 +00:00
|
|
|
inline void stop() { running = false; };
|
|
|
|
private:
|
|
|
|
std::string mMessage;
|
|
|
|
int mDuration;
|
|
|
|
int alpha;
|
|
|
|
bool updateState();
|
|
|
|
int mStartTime;
|
|
|
|
ComponentGrid* mGrid;
|
|
|
|
NinePatchComponent* mFrame;
|
|
|
|
bool running;
|
|
|
|
};
|
2017-10-31 17:12:50 +00:00
|
|
|
|
|
|
|
#endif // ES_APP_GUIS_GUI_INFO_POPUP_H
|