Always create UIStyle instances for UIWidgets.

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2019-01-13 19:04:54 -03:00
parent 5df2ec9703
commit e9aa905e5f

View File

@@ -23,7 +23,7 @@ UIWidget::UIWidget( const std::string & tag ) :
UINode(),
mTag( tag ),
mTheme( NULL ),
mStyle( NULL ),
mStyle( UIStyle::New( this ) ),
mTooltip( NULL ),
mMinControlSize(),
mLayoutWeight(0),
@@ -37,9 +37,6 @@ UIWidget::UIWidget( const std::string & tag ) :
mNodeFlags |= NODE_FLAG_WIDGET;
updateAnchorsDistances();
if ( getSceneNode()->isUISceneNode() && static_cast<UISceneNode*>( getSceneNode() )->hasStyleSheet() )
mStyle = UIStyle::New( this );
}
UIWidget::UIWidget() :