2017-10-31 17:12:50 +00:00
|
|
|
#pragma once
|
|
|
|
#ifndef ES_CORE_GUIS_GUI_TEXT_EDIT_POPUP_H
|
|
|
|
#define ES_CORE_GUIS_GUI_TEXT_EDIT_POPUP_H
|
|
|
|
|
2014-06-20 01:30:09 +00:00
|
|
|
#include "GuiComponent.h"
|
2014-03-21 16:10:19 +00:00
|
|
|
|
2014-06-20 01:30:09 +00:00
|
|
|
#include "components/NinePatchComponent.h"
|
|
|
|
#include "components/ButtonComponent.h"
|
|
|
|
#include "components/ComponentGrid.h"
|
|
|
|
#include "components/TextEditComponent.h"
|
|
|
|
#include "components/TextComponent.h"
|
2014-03-21 16:10:19 +00:00
|
|
|
|
|
|
|
class GuiTextEditPopup : public GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GuiTextEditPopup(Window* window, const std::string& title, const std::string& initValue,
|
|
|
|
const std::function<void(const std::string&)>& okCallback, bool multiLine, const char* acceptBtnText = "OK");
|
|
|
|
|
|
|
|
bool input(InputConfig* config, Input input);
|
|
|
|
void onSizeChanged();
|
2014-03-24 01:33:27 +00:00
|
|
|
std::vector<HelpPrompt> getHelpPrompts() override;
|
2014-03-21 16:10:19 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
NinePatchComponent mBackground;
|
|
|
|
ComponentGrid mGrid;
|
|
|
|
|
|
|
|
std::shared_ptr<TextComponent> mTitle;
|
|
|
|
std::shared_ptr<TextEditComponent> mText;
|
|
|
|
std::shared_ptr<ComponentGrid> mButtonGrid;
|
|
|
|
|
|
|
|
bool mMultiLine;
|
|
|
|
};
|
2017-10-31 17:12:50 +00:00
|
|
|
|
|
|
|
#endif // ES_CORE_GUIS_GUI_TEXT_EDIT_POPUP_H
|