Set AutoSizedEditBox as Static by default

Would look very odd anyway to use it for editable text, with the widget resizing as you type.
new-script-api
scrawl 7 years ago
parent 010a7ea5b3
commit b9341925f2

@ -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")

@ -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);
}; };

Loading…
Cancel
Save