Sprite -> AutoActor
This commit is contained in:
@@ -35,19 +35,19 @@ MusicWheelItem::MusicWheelItem( RString sType ):
|
||||
data = NULL;
|
||||
|
||||
m_sprSongBar.Load( THEME->GetPathG(sType,"song") );
|
||||
this->AddChild( &m_sprSongBar );
|
||||
this->AddChild( m_sprSongBar );
|
||||
|
||||
m_sprSectionBar.Load( THEME->GetPathG(sType,"section") );
|
||||
this->AddChild( &m_sprSectionBar );
|
||||
this->AddChild( m_sprSectionBar );
|
||||
|
||||
m_sprExpandedBar.Load( THEME->GetPathG(sType,"expanded") );
|
||||
this->AddChild( &m_sprExpandedBar );
|
||||
this->AddChild( m_sprExpandedBar );
|
||||
|
||||
m_sprModeBar.Load( THEME->GetPathG(sType,"mode") );
|
||||
this->AddChild( &m_sprModeBar );
|
||||
this->AddChild( m_sprModeBar );
|
||||
|
||||
m_sprSortBar.Load( THEME->GetPathG(sType,"sort") );
|
||||
this->AddChild( &m_sprSortBar );
|
||||
this->AddChild( m_sprSortBar );
|
||||
|
||||
m_WheelNotifyIcon.SetName( "Icon" );
|
||||
ActorUtil::LoadAllCommands( m_WheelNotifyIcon, "MusicWheelItem" );
|
||||
@@ -75,7 +75,7 @@ MusicWheelItem::MusicWheelItem( RString sType ):
|
||||
m_textRoulette.LoadFromFont( THEME->GetPathF(sType,"roulette") );
|
||||
ActorUtil::SetXY( m_textRoulette, "MusicWheelItem" );
|
||||
m_textRoulette.SetShadowLength( 0 );
|
||||
m_textRoulette.TurnRainbowOn();
|
||||
m_textRoulette.SetRainbow( true );
|
||||
m_textRoulette.PlayCommand( "On" );
|
||||
this->AddChild( &m_textRoulette );
|
||||
|
||||
@@ -122,11 +122,11 @@ MusicWheelItem::MusicWheelItem( const MusicWheelItem &cpy ):
|
||||
{
|
||||
data = NULL;
|
||||
|
||||
this->AddChild( &m_sprSongBar );
|
||||
this->AddChild( &m_sprSectionBar );
|
||||
this->AddChild( &m_sprExpandedBar );
|
||||
this->AddChild( &m_sprModeBar );
|
||||
this->AddChild( &m_sprSortBar );
|
||||
this->AddChild( m_sprSongBar );
|
||||
this->AddChild( m_sprSectionBar );
|
||||
this->AddChild( m_sprExpandedBar );
|
||||
this->AddChild( m_sprModeBar );
|
||||
this->AddChild( m_sprSortBar );
|
||||
this->AddChild( &m_WheelNotifyIcon );
|
||||
this->AddChild( &m_TextBanner );
|
||||
this->AddChild( &m_textSection );
|
||||
@@ -158,11 +158,11 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD )
|
||||
// hide all
|
||||
m_WheelNotifyIcon.SetHidden( true );
|
||||
m_TextBanner.SetHidden( true );
|
||||
m_sprSongBar.SetHidden( true );
|
||||
m_sprSectionBar.SetHidden( true );
|
||||
m_sprExpandedBar.SetHidden( true );
|
||||
m_sprModeBar.SetHidden( true );
|
||||
m_sprSortBar.SetHidden( true );
|
||||
m_sprSongBar->SetHidden( true );
|
||||
m_sprSectionBar->SetHidden( true );
|
||||
m_sprExpandedBar->SetHidden( true );
|
||||
m_sprModeBar->SetHidden( true );
|
||||
m_sprSortBar->SetHidden( true );
|
||||
m_textSection.SetHidden( true );
|
||||
m_textRoulette.SetHidden( true );
|
||||
FOREACH_PlayerNumber( p )
|
||||
@@ -203,7 +203,7 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD )
|
||||
|
||||
bt->SetText( sDisplayName, sTranslitName );
|
||||
bt->SetDiffuse( data->m_color );
|
||||
bt->TurnRainbowOff();
|
||||
bt->SetRainbow( false );
|
||||
bt->SetHidden( false );
|
||||
}
|
||||
break;
|
||||
@@ -237,7 +237,7 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD )
|
||||
ASSERT( 0 ); // invalid type
|
||||
}
|
||||
|
||||
Actor *pBars[] = { &m_sprBar, &m_sprExpandedBar, &m_sprSectionBar, &m_sprModeBar, &m_sprSortBar, &m_sprSongBar, NULL };
|
||||
Actor *pBars[] = { m_sprBar, m_sprExpandedBar, m_sprSectionBar, m_sprModeBar, m_sprSortBar, m_sprSongBar, NULL };
|
||||
for( unsigned i = 0; pBars[i] != NULL; ++i )
|
||||
pBars[i]->SetVisible( false );
|
||||
|
||||
@@ -248,19 +248,19 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD )
|
||||
case TYPE_RANDOM:
|
||||
case TYPE_PORTAL:
|
||||
if( m_bExpanded )
|
||||
m_sprExpandedBar.SetHidden( false );
|
||||
m_sprExpandedBar->SetHidden( false );
|
||||
else
|
||||
m_sprSectionBar.SetHidden( false );
|
||||
m_sprSectionBar->SetHidden( false );
|
||||
break;
|
||||
case TYPE_SORT:
|
||||
if( pWID->m_pAction->m_pm != PlayMode_Invalid )
|
||||
m_sprModeBar.SetHidden( false );
|
||||
m_sprModeBar->SetHidden( false );
|
||||
else
|
||||
m_sprSortBar.SetHidden( false );
|
||||
m_sprSortBar->SetHidden( false );
|
||||
break;
|
||||
case TYPE_SONG:
|
||||
case TYPE_COURSE:
|
||||
m_sprSongBar.SetHidden( false );
|
||||
m_sprSongBar->SetHidden( false );
|
||||
break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "GameCommand.h"
|
||||
#include "WheelItemBase.h"
|
||||
#include "AutoActor.h"
|
||||
|
||||
class Course;
|
||||
class Song;
|
||||
@@ -32,11 +33,11 @@ public:
|
||||
const WheelItemData *data;
|
||||
|
||||
private:
|
||||
Sprite m_sprSongBar;
|
||||
Sprite m_sprSectionBar;
|
||||
Sprite m_sprExpandedBar;
|
||||
Sprite m_sprModeBar;
|
||||
Sprite m_sprSortBar;
|
||||
AutoActor m_sprSongBar;
|
||||
AutoActor m_sprSectionBar;
|
||||
AutoActor m_sprExpandedBar;
|
||||
AutoActor m_sprModeBar;
|
||||
AutoActor m_sprSortBar;
|
||||
WheelNotifyIcon m_WheelNotifyIcon;
|
||||
TextBanner m_TextBanner;
|
||||
BitmapText m_textSection;
|
||||
|
||||
@@ -17,12 +17,12 @@ WheelItemBase::WheelItemBase( const WheelItemBase &cpy ):
|
||||
m_Type( cpy.m_Type ),
|
||||
m_color( cpy.m_color )
|
||||
{
|
||||
if( cpy.m_pBar == const_cast<Sprite *> (&cpy.m_sprBar) )
|
||||
m_pBar = &m_sprBar;
|
||||
if( cpy.m_pBar == cpy.m_sprBar )
|
||||
m_pBar = m_sprBar;
|
||||
|
||||
if( cpy.GetNumChildren() != 0 )
|
||||
{
|
||||
this->AddChild( &m_sprBar );
|
||||
this->AddChild( m_sprBar );
|
||||
this->AddChild( &m_text );
|
||||
}
|
||||
}
|
||||
@@ -44,9 +44,9 @@ void WheelItemBase::Load( RString sType )
|
||||
m_colorLocked = RageColor(0,0,0,0);
|
||||
|
||||
m_sprBar.Load( THEME->GetPathG(sType,"bar") );
|
||||
m_sprBar.SetXY( 0, 0 );
|
||||
this->AddChild( &m_sprBar );
|
||||
m_pBar = &m_sprBar;
|
||||
m_sprBar->SetXY( 0, 0 );
|
||||
this->AddChild( m_sprBar );
|
||||
m_pBar = m_sprBar;
|
||||
|
||||
m_text.LoadFromFont( THEME->GetPathF(sType,"text") );
|
||||
m_text.SetShadowLength( 0 );
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "WheelNotifyIcon.h"
|
||||
#include "ThemeMetric.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "AutoActor.h"
|
||||
|
||||
struct WheelItemBaseData;
|
||||
|
||||
@@ -45,11 +46,11 @@ protected:
|
||||
const WheelItemBaseData* data;
|
||||
bool m_bExpanded; // if TYPE_SECTION, whether this section is expanded
|
||||
|
||||
Actor *m_pBar;
|
||||
Sprite m_sprBar;
|
||||
BitmapText m_text;
|
||||
WheelItemType m_Type;
|
||||
RageColor m_color;
|
||||
Actor* m_pBar;
|
||||
AutoActor m_sprBar;
|
||||
BitmapText m_text;
|
||||
WheelItemType m_Type;
|
||||
RageColor m_color;
|
||||
|
||||
ThemeMetric<float> TEXT_X;
|
||||
ThemeMetric<float> TEXT_Y;
|
||||
|
||||
Reference in New Issue
Block a user