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