fix tweening of LAYOUT_SHOW_ONE_IN_ROW
This commit is contained in:
@@ -282,6 +282,11 @@ void OptionRow::LoadExit(
|
|||||||
bt->SetShadowLength( 0 );
|
bt->SetShadowLength( 0 );
|
||||||
bt->SetX( fItemLongRowSharedX );
|
bt->SetX( fItemLongRowSharedX );
|
||||||
this->AddChild( bt );
|
this->AddChild( bt );
|
||||||
|
|
||||||
|
FOREACH_PlayerNumber( p )
|
||||||
|
m_OptionIcons[p].SetHidden( true );
|
||||||
|
m_sprBullet.SetHidden( true );
|
||||||
|
m_textTitle.SetHidden( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionRow::PositionUnderlines( bool bShowUnderlines, float fTweenSeconds )
|
void OptionRow::PositionUnderlines( bool bShowUnderlines, float fTweenSeconds )
|
||||||
@@ -389,7 +394,7 @@ void OptionRow::UpdateEnabledDisabled(
|
|||||||
FOREACH_HumanPlayer( p )
|
FOREACH_HumanPlayer( p )
|
||||||
bThisRowHasFocusByAll &= bThisRowHasFocus[p];
|
bThisRowHasFocusByAll &= bThisRowHasFocus[p];
|
||||||
|
|
||||||
const float fDiffuseAlpha = m_bHidden? 0.0f:1.0f;
|
float fDiffuseAlpha = m_bHidden? 0.0f:1.0f;
|
||||||
|
|
||||||
/* Don't tween selection colors at all. */
|
/* Don't tween selection colors at all. */
|
||||||
RageColor color = bThisRowHasFocusByAny ? colorFocus:colorNoFocus;
|
RageColor color = bThisRowHasFocusByAny ? colorFocus:colorNoFocus;
|
||||||
@@ -425,7 +430,7 @@ void OptionRow::UpdateEnabledDisabled(
|
|||||||
else
|
else
|
||||||
color = colorDisabled;
|
color = colorDisabled;
|
||||||
|
|
||||||
float fEnabledDisabledAlpha = bRowEnabled ? 1.0f:0.0f;
|
color.a = (bRowEnabled && !m_bHidden) ? 1.0f:0.0f;
|
||||||
|
|
||||||
unsigned item_no = m_RowDef.bOneChoiceForAllPlayers ? 0 : pn;
|
unsigned item_no = m_RowDef.bOneChoiceForAllPlayers ? 0 : pn;
|
||||||
|
|
||||||
@@ -445,7 +450,7 @@ void OptionRow::UpdateEnabledDisabled(
|
|||||||
OptionsCursor &ul = *m_Underline[p][item_no];
|
OptionsCursor &ul = *m_Underline[p][item_no];
|
||||||
ul.StopTweening();
|
ul.StopTweening();
|
||||||
ul.BeginTweening( fTweenSeconds );
|
ul.BeginTweening( fTweenSeconds );
|
||||||
ul.SetDiffuseAlpha( fEnabledDisabledAlpha );
|
ul.SetDiffuseAlpha( color.a );
|
||||||
ul.SetY( m_fY );
|
ul.SetY( m_fY );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,6 +125,9 @@ public:
|
|||||||
|
|
||||||
friend RageColor operator * ( float f, const RageColor& other ) { return other*f; } // What is this for? Did I add this? -Chris
|
friend RageColor operator * ( float f, const RageColor& other ) { return other*f; } // What is this for? Did I add this? -Chris
|
||||||
|
|
||||||
|
bool operator == ( const RageColor& other ) const { return r==other.r && g==other.g && b==other.b && a==other.a; }
|
||||||
|
bool operator != ( const RageColor& other ) const { return !operator==(other); }
|
||||||
|
|
||||||
bool FromString( const CString &str )
|
bool FromString( const CString &str )
|
||||||
{
|
{
|
||||||
int result = sscanf( str, "%f,%f,%f,%f", &r, &g, &b, &a );
|
int result = sscanf( str, "%f,%f,%f,%f", &r, &g, &b, &a );
|
||||||
|
|||||||
Reference in New Issue
Block a user