mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 03:56:39 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			520 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			24 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();
 | 
						|
    }
 | 
						|
}
 |