mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-12-11 06:55:40 +00:00
32 lines
823 B
C++
32 lines
823 B
C++
#pragma once
|
|
|
|
#include "../GuiComponent.h"
|
|
#include "../components/NinePatchComponent.h"
|
|
#include "../components/ComponentGrid.h"
|
|
|
|
class TextComponent;
|
|
class ButtonComponent;
|
|
|
|
class GuiMsgBox : public GuiComponent
|
|
{
|
|
public:
|
|
GuiMsgBox(Window* window, const std::string& text,
|
|
const std::string& name1 = "OK", const std::function<void()>& func1 = nullptr,
|
|
const std::string& name2 = "", const std::function<void()>& func2 = nullptr,
|
|
const std::string& name3 = "", const std::function<void()>& func3 = nullptr);
|
|
|
|
void onSizeChanged() override;
|
|
|
|
private:
|
|
void deleteMeAndCall(const std::function<void()>& func);
|
|
|
|
NinePatchComponent mBackground;
|
|
ComponentGrid mGrid;
|
|
|
|
|
|
std::shared_ptr<TextComponent> mMsg;
|
|
std::vector< std::shared_ptr<ButtonComponent> > mButtons;
|
|
std::shared_ptr<ComponentGrid> mButtonGrid;
|
|
|
|
};
|