mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 03:54:40 +00:00
34 lines
743 B
C++
34 lines
743 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 ? mTextEdit->getOnlyText() : ""; }
|
|
void setTextInput(const std::string &text) { if (mTextEdit) mTextEdit->setOnlyText(text); }
|
|
|
|
void setNextButtonShow(bool shown);
|
|
void setTextLabel(const std::string &label);
|
|
virtual void open();
|
|
|
|
protected:
|
|
void onOkClicked(MyGUI::Widget* _sender);
|
|
void onTextAccepted(MyGUI::Edit* _sender);
|
|
|
|
private:
|
|
MyGUI::EditBox* mTextEdit;
|
|
};
|
|
}
|
|
#endif
|