1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Set AutoSizedEditBox as Static by default

Would look very odd anyway to use it for editable text, with the widget resizing as you type.
This commit is contained in:
scrawl 2017-09-26 18:33:41 +02:00
parent 010a7ea5b3
commit b9341925f2
2 changed files with 10 additions and 0 deletions

View file

@ -66,6 +66,13 @@ namespace Gui
notifySizeChange (this); notifySizeChange (this);
} }
void AutoSizedEditBox::initialiseOverride()
{
Base::initialiseOverride();
setNeedKeyFocus(false);
setEditStatic(true);
}
void AutoSizedEditBox::setPropertyOverride(const std::string& _key, const std::string& _value) void AutoSizedEditBox::setPropertyOverride(const std::string& _key, const std::string& _value)
{ {
if (_key == "ExpandDirection") if (_key == "ExpandDirection")

View file

@ -39,9 +39,12 @@ namespace Gui
MYGUI_RTTI_DERIVED( AutoSizedEditBox ) MYGUI_RTTI_DERIVED( AutoSizedEditBox )
public: public:
virtual MyGUI::IntSize getRequestedSize(); virtual MyGUI::IntSize getRequestedSize();
virtual void setCaption(const MyGUI::UString& _value); virtual void setCaption(const MyGUI::UString& _value);
virtual void initialiseOverride();
protected: protected:
virtual void setPropertyOverride(const std::string& _key, const std::string& _value); virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
}; };