mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 21:42:13 +00:00
25 lines
520 B
C++
25 lines
520 B
C++
|
|
#include "text.hpp"
|
|
|
|
namespace LuaUi
|
|
{
|
|
LuaText::LuaText()
|
|
: mAutoSized(true)
|
|
{}
|
|
|
|
void LuaText::setProperties(sol::object props)
|
|
{
|
|
setCaption(parseProperty(props, "caption", std::string()));
|
|
mAutoSized = parseProperty(props, "autoSize", true);
|
|
WidgetExtension::setProperties(props);
|
|
}
|
|
|
|
MyGUI::IntSize LuaText::calculateSize()
|
|
{
|
|
if (mAutoSized)
|
|
return getTextSize();
|
|
else
|
|
return WidgetExtension::calculateSize();
|
|
}
|
|
}
|