2013-04-10 04:32:05 +00:00
|
|
|
#ifndef MWGUI_TEXT_INPUT_H
|
|
|
|
#define MWGUI_TEXT_INPUT_H
|
|
|
|
|
|
|
|
#include "windowbase.hpp"
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
class WindowManager;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
class TextInputDialog : public WindowModal
|
|
|
|
{
|
|
|
|
public:
|
2013-04-10 18:46:21 +00:00
|
|
|
TextInputDialog();
|
2013-04-10 04:32:05 +00:00
|
|
|
|
2013-12-27 18:52:10 +00:00
|
|
|
std::string getTextInput() const { return mTextEdit->getCaption(); }
|
|
|
|
void setTextInput(const std::string &text) { mTextEdit->setCaption(text); }
|
2013-04-10 04:32:05 +00:00
|
|
|
|
|
|
|
void setNextButtonShow(bool shown);
|
|
|
|
void setTextLabel(const std::string &label);
|
|
|
|
virtual void open();
|
|
|
|
|
2014-09-07 01:21:24 +00:00
|
|
|
/** Event : Dialog finished, OK button clicked.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_WindowBase eventDone;
|
|
|
|
|
2013-04-10 04:32:05 +00:00
|
|
|
protected:
|
|
|
|
void onOkClicked(MyGUI::Widget* _sender);
|
|
|
|
void onTextAccepted(MyGUI::Edit* _sender);
|
|
|
|
|
|
|
|
private:
|
|
|
|
MyGUI::EditBox* mTextEdit;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|