2014-03-15 17:18:50 +00:00
|
|
|
#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);
|
|
|
|
|
2014-03-24 01:33:27 +00:00
|
|
|
bool input(InputConfig* config, Input input) override;
|
2014-03-15 17:18:50 +00:00
|
|
|
void onSizeChanged() override;
|
2014-03-24 01:33:27 +00:00
|
|
|
std::vector<HelpPrompt> getHelpPrompts() override;
|
2014-03-15 17:18:50 +00:00
|
|
|
|
|
|
|
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;
|
2014-03-15 22:06:16 +00:00
|
|
|
std::function<void()> mAcceleratorFunc;
|
2014-03-15 17:18:50 +00:00
|
|
|
};
|