1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00
OpenMW/apps/openmw/mwgui/textinput.hpp
2014-09-07 18:55:59 +02:00

39 lines
861 B
C++

#ifndef MWGUI_TEXT_INPUT_H
#define MWGUI_TEXT_INPUT_H
#include "windowbase.hpp"
namespace MWGui
{
class WindowManager;
}
namespace MWGui
{
class TextInputDialog : public WindowModal
{
public:
TextInputDialog();
std::string getTextInput() const { return mTextEdit->getCaption(); }
void setTextInput(const std::string &text) { mTextEdit->setCaption(text); }
void setNextButtonShow(bool shown);
void setTextLabel(const std::string &label);
virtual void open();
/** Event : Dialog finished, OK button clicked.\n
signature : void method()\n
*/
EventHandle_WindowBase eventDone;
protected:
void onOkClicked(MyGUI::Widget* _sender);
void onTextAccepted(MyGUI::Edit* _sender);
private:
MyGUI::EditBox* mTextEdit;
};
}
#endif