#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& func1 = nullptr, const std::string& name2 = "", const std::function& func2 = nullptr, const std::string& name3 = "", const std::function& func3 = nullptr); bool input(InputConfig* config, Input input) override; void onSizeChanged() override; std::vector getHelpPrompts() override; private: void deleteMeAndCall(const std::function& func); NinePatchComponent mBackground; ComponentGrid mGrid; std::shared_ptr mMsg; std::vector< std::shared_ptr > mButtons; std::shared_ptr mButtonGrid; std::function mAcceleratorFunc; };