add SetDiffuseColor (SetDiffuseAlpha's brother)
This commit is contained in:
@@ -754,6 +754,7 @@ void Actor::HandleCommand( const CStringArray &asTokens )
|
||||
else if( sName=="diffusebottomedge" ) SetDiffuseBottomEdge( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) );
|
||||
/* Add left/right/top/bottom for alpha if needed. */
|
||||
else if( sName=="diffusealpha" ) SetDiffuseAlpha( fParam(1) );
|
||||
else if( sName=="diffusecolor" ) SetDiffuseColor( RageColor( fParam(1),fParam(2),fParam(3),1 ) );
|
||||
else if( sName=="glow" ) SetGlow( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) );
|
||||
else if( sName=="glowmode" ) {
|
||||
if(!sParam(1).CompareNoCase("whiten"))
|
||||
@@ -864,6 +865,16 @@ void Actor::SetGlobalX( float x )
|
||||
m_start.pos.x = x;
|
||||
}
|
||||
|
||||
void Actor::SetDiffuseColor( RageColor c )
|
||||
{
|
||||
for(int i=0; i<4; i++)
|
||||
{
|
||||
DestTweenState().diffuse[i].r = c.r;
|
||||
DestTweenState().diffuse[i].g = c.g;
|
||||
DestTweenState().diffuse[i].b = c.b;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Actor::TweenState::Init()
|
||||
{
|
||||
|
||||
@@ -156,6 +156,7 @@ public:
|
||||
|
||||
virtual void SetDiffuse( RageColor c ) { for(int i=0; i<4; i++) DestTweenState().diffuse[i] = c; };
|
||||
virtual void SetDiffuseAlpha( float f ) { for(int i = 0; i < 4; ++i) { RageColor c = GetDiffuses( i ); c.a = f; SetDiffuses( i, c ); } }
|
||||
virtual void SetDiffuseColor( RageColor c );
|
||||
virtual void SetDiffuses( int i, RageColor c ) { DestTweenState().diffuse[i] = c; };
|
||||
virtual void SetDiffuseUpperLeft( RageColor c ) { DestTweenState().diffuse[0] = c; };
|
||||
virtual void SetDiffuseUpperRight( RageColor c ) { DestTweenState().diffuse[1] = c; };
|
||||
|
||||
Reference in New Issue
Block a user