|
|
|
@ -65,10 +65,8 @@ namespace NLGUI
|
|
|
|
|
if( _ViewText != NULL )
|
|
|
|
|
{
|
|
|
|
|
if( _Parent != NULL )
|
|
|
|
|
_Parent->delView( _ViewText );
|
|
|
|
|
else
|
|
|
|
|
delete _ViewText;
|
|
|
|
|
|
|
|
|
|
_Parent->delView( _ViewText, true );
|
|
|
|
|
delete _ViewText;
|
|
|
|
|
_ViewText = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -124,7 +122,10 @@ namespace NLGUI
|
|
|
|
|
else
|
|
|
|
|
if( name == "hardtext" )
|
|
|
|
|
{
|
|
|
|
|
return _ViewText->getText().toString();
|
|
|
|
|
if( _ViewText != NULL )
|
|
|
|
|
return _ViewText->getText().toString();
|
|
|
|
|
else
|
|
|
|
|
return std::string( "" );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if( name == "text_y" )
|
|
|
|
@ -139,7 +140,10 @@ namespace NLGUI
|
|
|
|
|
else
|
|
|
|
|
if( name == "text_underlined" )
|
|
|
|
|
{
|
|
|
|
|
return toString( _ViewText->getUnderlined() );
|
|
|
|
|
if( _ViewText != NULL )
|
|
|
|
|
return toString( _ViewText->getUnderlined() );
|
|
|
|
|
else
|
|
|
|
|
return std::string( "" );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if( name == "text_posref" )
|
|
|
|
@ -280,7 +284,8 @@ namespace NLGUI
|
|
|
|
|
else
|
|
|
|
|
if( name == "hardtext" )
|
|
|
|
|
{
|
|
|
|
|
_ViewText->setText( value );
|
|
|
|
|
if( _ViewText != NULL )
|
|
|
|
|
_ViewText->setText( value );
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -303,8 +308,10 @@ namespace NLGUI
|
|
|
|
|
if( name == "text_underlined" )
|
|
|
|
|
{
|
|
|
|
|
bool b;
|
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
|
_ViewText->setUnderlined( b );
|
|
|
|
|
if( _ViewText != NULL )
|
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
|
_ViewText->setUnderlined( b );
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -813,32 +820,35 @@ namespace NLGUI
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// Setup ViewText color
|
|
|
|
|
if ( pTxId==_TextureIdNormal || editorMode )
|
|
|
|
|
{
|
|
|
|
|
if(_TextHeaderColor) viewTextColor.A= _TextColorNormal.A;
|
|
|
|
|
else viewTextColor= _TextColorNormal;
|
|
|
|
|
_ViewText->setColor(viewTextColor);
|
|
|
|
|
_ViewText->setShadowColor(_TextShadowColorNormal);
|
|
|
|
|
_ViewText->setModulateGlobalColor(_TextModulateGlobalColorNormal);
|
|
|
|
|
}
|
|
|
|
|
else if ( pTxId==_TextureIdPushed )
|
|
|
|
|
{
|
|
|
|
|
if(_TextHeaderColor) viewTextColor.A= _TextColorPushed.A;
|
|
|
|
|
else viewTextColor= _TextColorPushed;
|
|
|
|
|
_ViewText->setColor(viewTextColor);
|
|
|
|
|
_ViewText->setShadowColor(_TextShadowColorPushed);
|
|
|
|
|
_ViewText->setModulateGlobalColor(_TextModulateGlobalColorPushed);
|
|
|
|
|
}
|
|
|
|
|
else if ( pTxId==_TextureIdOver )
|
|
|
|
|
if( _ViewText != NULL )
|
|
|
|
|
{
|
|
|
|
|
if(_TextHeaderColor) viewTextColor.A= _TextColorOver.A;
|
|
|
|
|
else viewTextColor= _TextColorOver;
|
|
|
|
|
_ViewText->setColor(viewTextColor);
|
|
|
|
|
_ViewText->setShadowColor(_TextShadowColorOver);
|
|
|
|
|
_ViewText->setModulateGlobalColor(_TextModulateGlobalColorOver);
|
|
|
|
|
if ( pTxId==_TextureIdNormal || editorMode )
|
|
|
|
|
{
|
|
|
|
|
if(_TextHeaderColor) viewTextColor.A= _TextColorNormal.A;
|
|
|
|
|
else viewTextColor= _TextColorNormal;
|
|
|
|
|
_ViewText->setColor(viewTextColor);
|
|
|
|
|
_ViewText->setShadowColor(_TextShadowColorNormal);
|
|
|
|
|
_ViewText->setModulateGlobalColor(_TextModulateGlobalColorNormal);
|
|
|
|
|
}
|
|
|
|
|
else if ( pTxId==_TextureIdPushed )
|
|
|
|
|
{
|
|
|
|
|
if(_TextHeaderColor) viewTextColor.A= _TextColorPushed.A;
|
|
|
|
|
else viewTextColor= _TextColorPushed;
|
|
|
|
|
_ViewText->setColor(viewTextColor);
|
|
|
|
|
_ViewText->setShadowColor(_TextShadowColorPushed);
|
|
|
|
|
_ViewText->setModulateGlobalColor(_TextModulateGlobalColorPushed);
|
|
|
|
|
}
|
|
|
|
|
else if ( pTxId==_TextureIdOver )
|
|
|
|
|
{
|
|
|
|
|
if(_TextHeaderColor) viewTextColor.A= _TextColorOver.A;
|
|
|
|
|
else viewTextColor= _TextColorOver;
|
|
|
|
|
_ViewText->setColor(viewTextColor);
|
|
|
|
|
_ViewText->setShadowColor(_TextShadowColorOver);
|
|
|
|
|
_ViewText->setModulateGlobalColor(_TextModulateGlobalColorOver);
|
|
|
|
|
}
|
|
|
|
|
if(getFrozen() && getFrozenHalfTone())
|
|
|
|
|
_ViewText->setAlpha(_ViewText->getAlpha()>>2);
|
|
|
|
|
}
|
|
|
|
|
if(getFrozen() && getFrozenHalfTone())
|
|
|
|
|
_ViewText->setAlpha(_ViewText->getAlpha()>>2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -978,5 +988,11 @@ namespace NLGUI
|
|
|
|
|
_Parent->delView( _ViewText, true );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CCtrlTextButton::onWidgetDeleted( CInterfaceElement *e )
|
|
|
|
|
{
|
|
|
|
|
if( e == _ViewText )
|
|
|
|
|
_ViewText = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|