1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-06 00:40:04 +00:00

25 lines
520 B
C++
Raw Normal View History

2021-11-18 15:19:54 +00:00
#include "text.hpp"
namespace LuaUi
{
2021-11-19 16:21:17 +01:00
LuaText::LuaText()
: mAutoSized(true)
{}
void LuaText::setProperties(sol::object props)
2021-11-18 15:19:54 +00:00
{
setCaption(parseProperty(props, "caption", std::string()));
mAutoSized = parseProperty(props, "autoSize", true);
WidgetExtension::setProperties(props);
2021-11-18 15:19:54 +00:00
}
MyGUI::IntSize LuaText::calculateSize()
{
if (mAutoSized)
return getTextSize();
else
return WidgetExtension::calculateSize();
}
}