1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 05:19:55 +00:00
openmw-tes3mp/apps/openmw/mwgui/text_input.hpp
2010-11-06 11:27:53 +01:00

46 lines
1,019 B
C++

#ifndef MWGUI_TEXT_INPUT_H
#define MWGUI_TEXT_INPUT_H
#include "window_base.hpp"
namespace MWWorld
{
class Environment;
}
/*
*/
namespace MWGui
{
using namespace MyGUI;
class TextInputDialog : public WindowBase
{
public:
TextInputDialog(MWWorld::Environment& environment);
std::string getTextInput() const { return textEdit ? textEdit->getOnlyText() : ""; }
void setTextInput(const std::string &text) { if (textEdit) textEdit->setOnlyText(text); }
void setNextButtonShow(bool shown);
void setTextLabel(const std::string &label);
void open();
// Events
typedef delegates::CDelegate0 EventHandle_Void;
/** Event : Dialog finished, OK button clicked.\n
signature : void method()\n
*/
EventHandle_Void eventDone;
protected:
void onOkClicked(MyGUI::Widget* _sender);
void onTextAccepted(MyGUI::Edit* _sender);
private:
MyGUI::EditPtr textEdit;
};
}
#endif