option icons are almost working...
This commit is contained in:
@@ -500,6 +500,7 @@ void Actor::Fade( float fSleepSeconds, CString sFadeString, float fFadeSeconds,
|
|||||||
mod.glow.a *= CONTAINS("glow")?1:0;
|
mod.glow.a *= CONTAINS("glow")?1:0;
|
||||||
|
|
||||||
|
|
||||||
|
StopTweening();
|
||||||
m_current = bOnToScreenOrOffOfScreen ? original : mod;
|
m_current = bOnToScreenOrOffOfScreen ? original : mod;
|
||||||
BeginTweening( fSleepSeconds );
|
BeginTweening( fSleepSeconds );
|
||||||
BeginTweening( fFadeSeconds, tt );
|
BeginTweening( fFadeSeconds, tt );
|
||||||
|
|||||||
@@ -177,8 +177,8 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
void Fade( float fSleepSeconds, CString sFadeString, float fFadeSeconds, bool bOnToScreenOrOffOfScreen );
|
void Fade( float fSleepSeconds, CString sFadeString, float fFadeSeconds, bool bOnToScreenOrOffOfScreen );
|
||||||
void FadeOntoScreen( float fSleepSeconds, CString sFadeString, float fFadeSeconds ) { Fade(fSleepSeconds,sFadeString,fFadeSeconds,false); };
|
void FadeOn( float fSleepSeconds, CString sFadeString, float fFadeSeconds ) { Fade(fSleepSeconds,sFadeString,fFadeSeconds,false); };
|
||||||
void FadeOffScreen( float fSleepSeconds, CString sFadeString, float fFadeSeconds ) { Fade(fSleepSeconds,sFadeString,fFadeSeconds,true); };
|
void FadeOff( float fSleepSeconds, CString sFadeString, float fFadeSeconds ) { Fade(fSleepSeconds,sFadeString,fFadeSeconds,true); };
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ bool BitmapText::LoadFromFont( CString sFontFilePath )
|
|||||||
// load font
|
// load font
|
||||||
m_pFont = FONT->LoadFont( sFontFilePath, "" );
|
m_pFont = FONT->LoadFont( sFontFilePath, "" );
|
||||||
|
|
||||||
|
m_iLineHeight = m_pFont->m_pTexture->GetSourceFrameHeight();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,9 +189,9 @@ void BitmapText::DrawPrimitives()
|
|||||||
int iY; // the center position of the first row of characters
|
int iY; // the center position of the first row of characters
|
||||||
switch( m_VertAlign )
|
switch( m_VertAlign )
|
||||||
{
|
{
|
||||||
case align_bottom: iY = -(m_iNumLines) * iHeight + iHeight/2; break;
|
case align_bottom: iY = -(m_iNumLines) * m_iLineHeight + m_iLineHeight/2; break;
|
||||||
case align_middle: iY = -(m_iNumLines-1) * iHeight/2; break;
|
case align_middle: iY = -(m_iNumLines-1) * m_iLineHeight/2; break;
|
||||||
case align_top: iY = + iHeight/2; break;
|
case align_top: iY = + m_iLineHeight/2; break;
|
||||||
default: ASSERT( false );
|
default: ASSERT( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,7 +259,7 @@ void BitmapText::DrawPrimitives()
|
|||||||
v[iNumV++].t = D3DXVECTOR2( frectTexCoords.right + fExtraTexCoords, frectTexCoords.bottom ); // bottom right
|
v[iNumV++].t = D3DXVECTOR2( frectTexCoords.right + fExtraTexCoords, frectTexCoords.bottom ); // bottom right
|
||||||
}
|
}
|
||||||
|
|
||||||
iY += iHeight;
|
iY += m_iLineHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public:
|
|||||||
|
|
||||||
int GetWidestLineWidthInSourcePixels() { return m_iWidestLineWidth; };
|
int GetWidestLineWidthInSourcePixels() { return m_iWidestLineWidth; };
|
||||||
void CropToWidth( int iWidthInSourcePixels );
|
void CropToWidth( int iWidthInSourcePixels );
|
||||||
|
void SetLineHeight( int iLineHeight ) { m_iLineHeight = iLineHeight; };
|
||||||
|
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@ protected:
|
|||||||
int m_iNumLines;
|
int m_iNumLines;
|
||||||
int m_iLineWidths[MAX_TEXT_LINES]; // in source pixels
|
int m_iLineWidths[MAX_TEXT_LINES]; // in source pixels
|
||||||
int m_iWidestLineWidth; // in source pixels
|
int m_iWidestLineWidth; // in source pixels
|
||||||
|
int m_iLineHeight;
|
||||||
|
|
||||||
bool m_bRainbow;
|
bool m_bRainbow;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,6 +18,12 @@
|
|||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define LABEL_OFFSET_X( i ) THEME->GetMetricF("GrooveRadar",ssprintf("Label%dOffsetX",i+1))
|
||||||
|
#define LABEL_OFFSET_Y( i ) THEME->GetMetricF("GrooveRadar",ssprintf("Label%dOffsetY",i+1))
|
||||||
|
|
||||||
|
|
||||||
float RADAR_VALUE_ROTATION( int iValueIndex ) { return D3DX_PI/2 + D3DX_PI*2 / 5.0f * iValueIndex; }
|
float RADAR_VALUE_ROTATION( int iValueIndex ) { return D3DX_PI/2 + D3DX_PI*2 / 5.0f * iValueIndex; }
|
||||||
|
|
||||||
const float RADAR_EDGE_WIDTH = 3;
|
const float RADAR_EDGE_WIDTH = 3;
|
||||||
@@ -28,28 +34,10 @@ GrooveRadar::GrooveRadar()
|
|||||||
|
|
||||||
for( int c=0; c<NUM_RADAR_CATEGORIES; c++ )
|
for( int c=0; c<NUM_RADAR_CATEGORIES; c++ )
|
||||||
{
|
{
|
||||||
const float fRadius = m_GrooveRadarValueMap.m_sprRadarBase.GetZoomedHeight()/2.0f;
|
m_sprRadarLabels[c].Load( THEME->GetPathTo("Graphics","select music radar labels 1x5") );
|
||||||
const float fRotation = RADAR_VALUE_ROTATION(c);
|
|
||||||
float fX = cosf(fRotation) * fRadius;
|
|
||||||
|
|
||||||
// push the labels out a little
|
|
||||||
switch( c )
|
|
||||||
{
|
|
||||||
case 0: break;
|
|
||||||
case 1:
|
|
||||||
case 4: if( fabsf(fX) > 1 ) fX += fX/fabsf(fX) * 40; break;
|
|
||||||
case 2:
|
|
||||||
case 3: if( fabsf(fX) > 1 ) fX += fX/fabsf(fX) * 50; break;
|
|
||||||
default: ASSERT( false );
|
|
||||||
}
|
|
||||||
|
|
||||||
const float fY = -sinf(fRotation) * fRadius * 1.15f;
|
|
||||||
|
|
||||||
|
|
||||||
m_sprRadarLabels[c].Load( THEME->GetPathTo("Graphics","select music radar words") );
|
|
||||||
m_sprRadarLabels[c].StopAnimating();
|
m_sprRadarLabels[c].StopAnimating();
|
||||||
m_sprRadarLabels[c].SetState( c );
|
m_sprRadarLabels[c].SetState( c );
|
||||||
m_sprRadarLabels[c].SetXY( fX, fY );
|
m_sprRadarLabels[c].SetXY( LABEL_OFFSET_X(c), LABEL_OFFSET_Y(c) );
|
||||||
this->AddChild( &m_sprRadarLabels[c] );
|
this->AddChild( &m_sprRadarLabels[c] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
|
|
||||||
|
|
||||||
// WheelItem stuff
|
// WheelItem stuff
|
||||||
#define ICON_X THEME->GetMetricF("WheelItemDisplay","IconX")
|
#define ICON_X THEME->GetMetricF("WheelItemDisplay","IconX")
|
||||||
#define SONG_NAME_X THEME->GetMetricF("WheelItemDisplay","SongNameX")
|
#define SONG_NAME_X THEME->GetMetricF("WheelItemDisplay","SongNameX")
|
||||||
@@ -30,8 +31,7 @@
|
|||||||
#define ROULETTE_ZOOM THEME->GetMetricF("WheelItemDisplay","RouletteZoom")
|
#define ROULETTE_ZOOM THEME->GetMetricF("WheelItemDisplay","RouletteZoom")
|
||||||
#define COURSE_X THEME->GetMetricF("WheelItemDisplay","CourseX")
|
#define COURSE_X THEME->GetMetricF("WheelItemDisplay","CourseX")
|
||||||
#define COURSE_ZOOM THEME->GetMetricF("WheelItemDisplay","CourseZoom")
|
#define COURSE_ZOOM THEME->GetMetricF("WheelItemDisplay","CourseZoom")
|
||||||
#define GRADE_P1_X THEME->GetMetricF("WheelItemDisplay","GradeP1X")
|
#define GRADE_X( p ) THEME->GetMetricF("WheelItemDisplay",ssprintf("GradeP%dX",p+1))
|
||||||
#define GRADE_P2_X THEME->GetMetricF("WheelItemDisplay","GradeP2Y")
|
|
||||||
|
|
||||||
|
|
||||||
// MusicWheel stuff
|
// MusicWheel stuff
|
||||||
@@ -43,27 +43,12 @@
|
|||||||
#define LOCKED_INITIAL_VELOCITY THEME->GetMetricF("MusicWheel","LockedInitialVelocity")
|
#define LOCKED_INITIAL_VELOCITY THEME->GetMetricF("MusicWheel","LockedInitialVelocity")
|
||||||
#define SCROLL_BAR_X THEME->GetMetricF("MusicWheel","ScrollBarX")
|
#define SCROLL_BAR_X THEME->GetMetricF("MusicWheel","ScrollBarX")
|
||||||
#define SCROLL_BAR_HEIGHT THEME->GetMetricI("MusicWheel","ScrollBarHeight")
|
#define SCROLL_BAR_HEIGHT THEME->GetMetricI("MusicWheel","ScrollBarHeight")
|
||||||
#define SECTION_COLOR_1 THEME->GetMetricC("MusicWheel","SectionColor1")
|
#define ITEM_SPACING_Y THEME->GetMetricF("MusicWheel","ItemSpacingY")
|
||||||
#define SECTION_COLOR_2 THEME->GetMetricC("MusicWheel","SectionColor2")
|
#define NUM_SECTION_COLORS THEME->GetMetricI("MusicWheel","NumSectionColors")
|
||||||
#define SECTION_COLOR_3 THEME->GetMetricC("MusicWheel","SectionColor3")
|
#define SECTION_COLORS( i ) THEME->GetMetricC("MusicWheel",ssprintf("SectionColor%d",i+1))
|
||||||
#define SECTION_COLOR_4 THEME->GetMetricC("MusicWheel","SectionColor4")
|
|
||||||
#define SECTION_COLOR_5 THEME->GetMetricC("MusicWheel","SectionColor5")
|
float g_fItemSpacingY; // cache
|
||||||
#define SECTION_COLOR_6 THEME->GetMetricC("MusicWheel","SectionColor6")
|
|
||||||
#define SECTION_COLOR_7 THEME->GetMetricC("MusicWheel","SectionColor7")
|
|
||||||
const int NUM_SECTION_COLORS = 7;
|
|
||||||
|
|
||||||
D3DXCOLOR SECTION_COLORS( int i ) {
|
|
||||||
switch( i ) {
|
|
||||||
case 0: return SECTION_COLOR_1;
|
|
||||||
case 1: return SECTION_COLOR_2;
|
|
||||||
case 2: return SECTION_COLOR_3;
|
|
||||||
case 3: return SECTION_COLOR_4;
|
|
||||||
case 4: return SECTION_COLOR_5;
|
|
||||||
case 5: return SECTION_COLOR_6;
|
|
||||||
case 6: return SECTION_COLOR_7;
|
|
||||||
default: ASSERT(0); return D3DXCOLOR(1,1,1,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
inline D3DXCOLOR GetNextSectionColor() {
|
inline D3DXCOLOR GetNextSectionColor() {
|
||||||
static int i=0;
|
static int i=0;
|
||||||
i = i % NUM_SECTION_COLORS;
|
i = i % NUM_SECTION_COLORS;
|
||||||
@@ -114,7 +99,7 @@ WheelItemDisplay::WheelItemDisplay()
|
|||||||
{
|
{
|
||||||
m_GradeDisplay[p].Load( THEME->GetPathTo("Graphics","select music small grades 2x8") );
|
m_GradeDisplay[p].Load( THEME->GetPathTo("Graphics","select music small grades 2x8") );
|
||||||
m_GradeDisplay[p].SetZoom( 1.0f );
|
m_GradeDisplay[p].SetZoom( 1.0f );
|
||||||
m_GradeDisplay[p].SetXY( p==PLAYER_1 ? GRADE_P1_X : GRADE_P2_X, 0 );
|
m_GradeDisplay[p].SetXY( GRADE_X(p), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_textCourse.LoadFromFont( THEME->GetPathTo("Fonts","text banner") );
|
m_textCourse.LoadFromFont( THEME->GetPathTo("Fonts","text banner") );
|
||||||
@@ -288,6 +273,11 @@ MusicWheel::MusicWheel()
|
|||||||
{
|
{
|
||||||
LOG->Trace( "MusicWheel::MusicWheel()" );
|
LOG->Trace( "MusicWheel::MusicWheel()" );
|
||||||
|
|
||||||
|
|
||||||
|
// update theme metric cache
|
||||||
|
g_fItemSpacingY = ITEM_SPACING_Y;
|
||||||
|
|
||||||
|
|
||||||
// for debugging
|
// for debugging
|
||||||
if( GAMESTATE->m_CurStyle == STYLE_NONE )
|
if( GAMESTATE->m_CurStyle == STYLE_NONE )
|
||||||
GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE;
|
GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE;
|
||||||
@@ -620,7 +610,7 @@ void MusicWheel::SwitchSortOrder()
|
|||||||
|
|
||||||
float MusicWheel::GetBannerY( float fPosOffsetsFromMiddle )
|
float MusicWheel::GetBannerY( float fPosOffsetsFromMiddle )
|
||||||
{
|
{
|
||||||
return (float)roundf( fPosOffsetsFromMiddle*44 );
|
return (float)roundf( fPosOffsetsFromMiddle*g_fItemSpacingY );
|
||||||
}
|
}
|
||||||
|
|
||||||
float MusicWheel::GetBannerBrightness( float fPosOffsetsFromMiddle )
|
float MusicWheel::GetBannerBrightness( float fPosOffsetsFromMiddle )
|
||||||
|
|||||||
@@ -14,30 +14,41 @@
|
|||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
#include "PlayerOptions.h"
|
#include "PlayerOptions.h"
|
||||||
|
|
||||||
#define TEXT_X THEME->GetMetricF("OptionIcon","TextX")
|
#define TEXT_OFFSET_X THEME->GetMetricF("OptionIcon","TextOffsetX")
|
||||||
#define TEXT_Y THEME->GetMetricF("OptionIcon","TextY")
|
#define TEXT_OFFSET_Y THEME->GetMetricF("OptionIcon","TextOffsetY")
|
||||||
#define TEXT_H_ALIGN THEME->GetMetricI("OptionIcon","TextHAlign")
|
#define TEXT_H_ALIGN THEME->GetMetricI("OptionIcon","TextHAlign")
|
||||||
#define TEXT_V_ALIGN THEME->GetMetricI("OptionIcon","TextVAlign")
|
#define TEXT_V_ALIGN THEME->GetMetricI("OptionIcon","TextVAlign")
|
||||||
#define TEXT_WIDTH THEME->GetMetricI("OptionIcon","TextWidth")
|
#define TEXT_WIDTH THEME->GetMetricI("OptionIcon","TextWidth")
|
||||||
|
#define TEXT_ZOOM THEME->GetMetricF("OptionIcon","TextZoom")
|
||||||
|
|
||||||
|
|
||||||
OptionIcon::OptionIcon()
|
OptionIcon::OptionIcon()
|
||||||
{
|
{
|
||||||
m_spr.Load( THEME->GetPathTo("Graphics","select music option icons 3x2") );
|
m_spr.Load( THEME->GetPathTo("Graphics","select music option icons 3x2") );
|
||||||
|
m_spr.StopAnimating();
|
||||||
this->AddChild( &m_spr );
|
this->AddChild( &m_spr );
|
||||||
|
|
||||||
m_text.LoadFromFont( THEME->GetPathTo("Fonts","option icons") );
|
m_text.LoadFromFont( THEME->GetPathTo("Fonts","option icons") );
|
||||||
|
m_text.TurnShadowOff();
|
||||||
|
m_text.SetZoom( TEXT_ZOOM );
|
||||||
|
m_text.SetXY( TEXT_OFFSET_X, TEXT_OFFSET_Y );
|
||||||
|
m_text.SetHorizAlign( (Actor::HorizAlign)TEXT_H_ALIGN );
|
||||||
|
m_text.SetVertAlign( (Actor::VertAlign)TEXT_V_ALIGN );
|
||||||
this->AddChild( &m_text );
|
this->AddChild( &m_text );
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionIcon::Load( PlayerNumber pn, CString sText, bool bHeader )
|
void OptionIcon::Load( PlayerNumber pn, CString sText, bool bHeader )
|
||||||
{
|
{
|
||||||
bool bVacant = (sText=="");
|
bool bVacant = (sText=="");
|
||||||
m_spr.SetState( pn*3 + bVacant?1:2 );
|
m_spr.SetState( pn*3 + (bHeader?0:(bVacant?1:2)) );
|
||||||
|
|
||||||
m_text.SetText( sText );
|
m_text.SetText( bHeader ? "" : sText );
|
||||||
|
m_text.SetZoom( TEXT_ZOOM );
|
||||||
m_text.CropToWidth( TEXT_WIDTH );
|
m_text.CropToWidth( TEXT_WIDTH );
|
||||||
m_text.SetXY( TEXT_X, TEXT_Y );
|
|
||||||
m_text.SetHorizAlign( (Actor::HorizAlign)TEXT_H_ALIGN );
|
|
||||||
m_text.SetVertAlign( (Actor::VertAlign)TEXT_V_ALIGN );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OptionIcon::DrawPrimitives()
|
||||||
|
{
|
||||||
|
ActorFrame::DrawPrimitives();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public:
|
|||||||
OptionIcon();
|
OptionIcon();
|
||||||
|
|
||||||
void Load( PlayerNumber pn, CString sText, bool bHeader = false );
|
void Load( PlayerNumber pn, CString sText, bool bHeader = false );
|
||||||
|
void DrawPrimitives();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BitmapText m_text;
|
BitmapText m_text;
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
/*
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Class: OptionIconRow
|
||||||
|
|
||||||
|
Desc: A graphic displayed in the OptionIconRow during Dancing.
|
||||||
|
|
||||||
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "OptionIconRow.h"
|
||||||
|
#include "ThemeManager.h"
|
||||||
|
#include "PlayerOptions.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define SPACING_X THEME->GetMetricF("OptionIconRow","SpacingX")
|
||||||
|
#define SPACING_Y THEME->GetMetricF("OptionIconRow","SpacingY")
|
||||||
|
|
||||||
|
|
||||||
|
OptionIconRow::OptionIconRow()
|
||||||
|
{
|
||||||
|
for( int i=0; i<NUM_OPTION_COLS; i++ )
|
||||||
|
{
|
||||||
|
m_OptionIcon[i].SetXY( i*SPACING_X, i*SPACING_Y );
|
||||||
|
this->AddChild( &m_OptionIcon[i] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OptionIconRow::Refresh( PlayerNumber pn )
|
||||||
|
{
|
||||||
|
for( int i=0; i<NUM_OPTION_COLS; i++ )
|
||||||
|
m_OptionIcon[i].Load( pn, "BLAH", i==0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void OptionIconRow::DrawPrimitives()
|
||||||
|
{
|
||||||
|
ActorFrame::DrawPrimitives();
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
#ifndef OptionIconRow_H
|
||||||
|
#define OptionIconRow_H
|
||||||
|
/*
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Class: OptionIconRow
|
||||||
|
|
||||||
|
Desc: Shows PlayerOptions and SongOptions in icon form.
|
||||||
|
|
||||||
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "ActorFrame.h"
|
||||||
|
#include "OptionIcon.h"
|
||||||
|
struct PlayerOptions;
|
||||||
|
|
||||||
|
|
||||||
|
const int NUM_OPTION_COLS = 8;
|
||||||
|
|
||||||
|
|
||||||
|
class OptionIconRow : public ActorFrame
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OptionIconRow();
|
||||||
|
|
||||||
|
void Refresh( PlayerNumber pn );
|
||||||
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
PlayerNumber m_PlayerNumber;
|
||||||
|
OptionIcon m_OptionIcon[NUM_OPTION_COLS];
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -126,7 +126,9 @@ ScreenMusicScroll::ScreenMusicScroll()
|
|||||||
{
|
{
|
||||||
LOG->Trace( "ScreenMusicScroll::ScreenMusicScroll()" );
|
LOG->Trace( "ScreenMusicScroll::ScreenMusicScroll()" );
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
GAMESTATE->Reset(); // so that credits message for both players will show
|
||||||
|
|
||||||
m_sprBackground.Load( THEME->GetPathTo("Graphics","music scroll background") );
|
m_sprBackground.Load( THEME->GetPathTo("Graphics","music scroll background") );
|
||||||
m_sprBackground.StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
m_sprBackground.StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
||||||
|
|||||||
@@ -21,18 +21,15 @@
|
|||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define ICONS_X( p ) THEME->GetMetricF("ScreenOptions",ssprintf("IconsP%dX",p+1))
|
||||||
|
#define LABELS_X THEME->GetMetricF("ScreenOptions","LabelsX")
|
||||||
|
#define ITEMS_START_X THEME->GetMetricF("ScreenOptions","ItemsStartX")
|
||||||
|
#define ITEMS_GAP_X THEME->GetMetricF("ScreenOptions","ItemsGapX")
|
||||||
|
#define ITEMS_START_Y THEME->GetMetricF("ScreenOptions","ItemsStartY")
|
||||||
|
#define ITEMS_SPACING_Y THEME->GetMetricF("ScreenOptions","ItemsSpacingY")
|
||||||
#define HELP_TEXT THEME->GetMetric("ScreenOptions","HelpText")
|
#define HELP_TEXT THEME->GetMetric("ScreenOptions","HelpText")
|
||||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenOptions","TimerSeconds")
|
#define TIMER_SECONDS THEME->GetMetricI("ScreenOptions","TimerSeconds")
|
||||||
|
|
||||||
const float HEADER_X = CENTER_X;
|
|
||||||
const float HEADER_Y = 50;
|
|
||||||
const float HELP_X = CENTER_X;
|
|
||||||
const float HELP_Y = SCREEN_HEIGHT-35;
|
|
||||||
const float ITEM_GAP_X = 14;
|
|
||||||
const float LABELS_X = 80;
|
|
||||||
const float LINE_START_Y = 80;
|
|
||||||
const float LINE_GAP_Y = 34;
|
|
||||||
const float ITEMS_START_X = 160;
|
|
||||||
|
|
||||||
const ScreenMessage SM_PlaySample = ScreenMessage(SM_User-4);
|
const ScreenMessage SM_PlaySample = ScreenMessage(SM_User-4);
|
||||||
const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User-5);
|
const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User-5);
|
||||||
@@ -107,6 +104,9 @@ void ScreenOptions::Init( InputMode im, OptionLineData optionLineData[], int iNu
|
|||||||
{
|
{
|
||||||
m_Underline[p][l].Load( (PlayerNumber)p, true );
|
m_Underline[p][l].Load( (PlayerNumber)p, true );
|
||||||
m_framePage.AddChild( &m_Underline[p][l] );
|
m_framePage.AddChild( &m_Underline[p][l] );
|
||||||
|
|
||||||
|
m_OptionIcons[p][l].Load( (PlayerNumber)p, "BLAH", false );
|
||||||
|
m_framePage.AddChild( &m_OptionIcons[p][l] );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Highlight[p].Load( (PlayerNumber)p, false );
|
m_Highlight[p].Load( (PlayerNumber)p, false );
|
||||||
@@ -130,6 +130,7 @@ void ScreenOptions::Init( InputMode im, OptionLineData optionLineData[], int iNu
|
|||||||
|
|
||||||
InitOptionsText();
|
InitOptionsText();
|
||||||
PositionUnderlines();
|
PositionUnderlines();
|
||||||
|
PositionIcons();
|
||||||
PositionHighlights();
|
PositionHighlights();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,19 +153,22 @@ void ScreenOptions::GetWidthXY( PlayerNumber p, int iRow, int &iWidthOut, int &i
|
|||||||
|
|
||||||
void ScreenOptions::InitOptionsText()
|
void ScreenOptions::InitOptionsText()
|
||||||
{
|
{
|
||||||
const float fLineGap = LINE_GAP_Y - max(0, (m_iNumOptionLines-10)*2);
|
const float fLineGap = ITEMS_SPACING_Y - max(0, (m_iNumOptionLines-10)*2);
|
||||||
|
|
||||||
// init m_textOptions from optionLines
|
// init m_textOptions from optionLines
|
||||||
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line
|
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line
|
||||||
{
|
{
|
||||||
OptionLineData &optline = m_OptionLineData[i];
|
OptionLineData &optline = m_OptionLineData[i];
|
||||||
|
|
||||||
float fY = LINE_START_Y + fLineGap*i;
|
float fY = ITEMS_START_Y + fLineGap*i;
|
||||||
|
|
||||||
BitmapText &title = m_textOptionLineTitles[i];
|
BitmapText &title = m_textOptionLineTitles[i];
|
||||||
|
|
||||||
title.LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
|
title.LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
|
||||||
title.SetText( optline.szTitle );
|
title.SetLineHeight( 20 );
|
||||||
|
CString sText = optline.szTitle;
|
||||||
|
sText.Replace( " ", "\n" );
|
||||||
|
title.SetText( sText );
|
||||||
title.SetXY( LABELS_X, fY );
|
title.SetXY( LABELS_X, fY );
|
||||||
title.SetZoom( 0.7f );
|
title.SetZoom( 0.7f );
|
||||||
title.SetVertAlign( Actor::align_middle );
|
title.SetVertAlign( Actor::align_middle );
|
||||||
@@ -186,7 +190,7 @@ void ScreenOptions::InitOptionsText()
|
|||||||
float fItemWidth = option.GetWidestLineWidthInSourcePixels() * option.GetZoomX();
|
float fItemWidth = option.GetWidestLineWidthInSourcePixels() * option.GetZoomX();
|
||||||
fX += fItemWidth/2;
|
fX += fItemWidth/2;
|
||||||
option.SetXY( fX, fY );
|
option.SetXY( fX, fY );
|
||||||
fX += fItemWidth/2 + ITEM_GAP_X;
|
fX += fItemWidth/2 + ITEMS_GAP_X;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -240,6 +244,23 @@ void ScreenOptions::PositionUnderlines()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScreenOptions::PositionIcons()
|
||||||
|
{
|
||||||
|
// Set the position of the underscores showing the current choice for each option line.
|
||||||
|
for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player
|
||||||
|
{
|
||||||
|
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line
|
||||||
|
{
|
||||||
|
OptionIcon &icon = m_OptionIcons[p][i];
|
||||||
|
|
||||||
|
int iWidth, iX, iY;
|
||||||
|
GetWidthXY( (PlayerNumber)p, i, iWidth, iX, iY );
|
||||||
|
icon.SetXY( ICONS_X(p), (float)iY );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ScreenOptions::PositionHighlights()
|
void ScreenOptions::PositionHighlights()
|
||||||
{
|
{
|
||||||
// Set the position of the highlight showing the current option the user is changing.
|
// Set the position of the highlight showing the current option the user is changing.
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "Quad.h"
|
#include "Quad.h"
|
||||||
#include "MenuElements.h"
|
#include "MenuElements.h"
|
||||||
#include "OptionsCursor.h"
|
#include "OptionsCursor.h"
|
||||||
|
#include "OptionIcon.h"
|
||||||
|
|
||||||
|
|
||||||
const int MAX_OPTION_LINES = 20;
|
const int MAX_OPTION_LINES = 20;
|
||||||
@@ -56,6 +57,7 @@ protected:
|
|||||||
void InitOptionsText();
|
void InitOptionsText();
|
||||||
void GetWidthXY( PlayerNumber p, int iRow, int &iWidthOut, int &iXOut, int &iYOut );
|
void GetWidthXY( PlayerNumber p, int iRow, int &iWidthOut, int &iXOut, int &iYOut );
|
||||||
void PositionUnderlines();
|
void PositionUnderlines();
|
||||||
|
void PositionIcons();
|
||||||
void PositionHighlights();
|
void PositionHighlights();
|
||||||
void TweenHighlight( PlayerNumber player_no );
|
void TweenHighlight( PlayerNumber player_no );
|
||||||
virtual void OnChange();
|
virtual void OnChange();
|
||||||
@@ -93,6 +95,7 @@ protected:
|
|||||||
// Quad m_SelectionHighlight[NUM_PLAYERS];
|
// Quad m_SelectionHighlight[NUM_PLAYERS];
|
||||||
|
|
||||||
OptionsCursor m_Underline[NUM_PLAYERS][MAX_OPTION_LINES];
|
OptionsCursor m_Underline[NUM_PLAYERS][MAX_OPTION_LINES];
|
||||||
|
OptionIcon m_OptionIcons[NUM_PLAYERS][MAX_OPTION_LINES];
|
||||||
OptionsCursor m_Highlight[NUM_PLAYERS];
|
OptionsCursor m_Highlight[NUM_PLAYERS];
|
||||||
|
|
||||||
RandomSample m_SoundChangeCol;
|
RandomSample m_SoundChangeCol;
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ void ScreenSelectDifficulty::TweenOnScreen()
|
|||||||
m_sprCursor[p].SetTweenRotationZ( 0 );
|
m_sprCursor[p].SetTweenRotationZ( 0 );
|
||||||
m_sprCursor[p].SetTweenZoom( 1 );
|
m_sprCursor[p].SetTweenZoom( 1 );
|
||||||
*/
|
*/
|
||||||
m_sprCursor[p].FadeOntoScreen( 0, "SpinZ ZoomX ZoomY Fade", 0.3f );
|
m_sprCursor[p].FadeOn( 0, "SpinZ ZoomX ZoomY Fade", 0.3f );
|
||||||
|
|
||||||
m_sprCursorShadow[p].SetXY( CURSOR_X(iSelection,(PlayerNumber)p), CURSOR_Y(iSelection,(PlayerNumber)p) );
|
m_sprCursorShadow[p].SetXY( CURSOR_X(iSelection,(PlayerNumber)p), CURSOR_Y(iSelection,(PlayerNumber)p) );
|
||||||
D3DXCOLOR colorOriginal = m_sprCursorShadow[p].GetDiffuse();
|
D3DXCOLOR colorOriginal = m_sprCursorShadow[p].GetDiffuse();
|
||||||
|
|||||||
+118
-143
@@ -28,42 +28,44 @@
|
|||||||
#include "CodeDetector.h"
|
#include "CodeDetector.h"
|
||||||
|
|
||||||
|
|
||||||
#define BANNER_FRAME_X THEME->GetMetricF("ScreenSelectMusic","BannerFrameX")
|
#define BANNER_FRAME_X THEME->GetMetricF("ScreenSelectMusic","BannerFrameX")
|
||||||
#define BANNER_FRAME_Y THEME->GetMetricF("ScreenSelectMusic","BannerFrameY")
|
#define BANNER_FRAME_Y THEME->GetMetricF("ScreenSelectMusic","BannerFrameY")
|
||||||
#define BANNER_X THEME->GetMetricF("ScreenSelectMusic","BannerX")
|
#define BANNER_X THEME->GetMetricF("ScreenSelectMusic","BannerX")
|
||||||
#define BANNER_Y THEME->GetMetricF("ScreenSelectMusic","BannerY")
|
#define BANNER_Y THEME->GetMetricF("ScreenSelectMusic","BannerY")
|
||||||
#define BANNER_WIDTH THEME->GetMetricF("ScreenSelectMusic","BannerWidth")
|
#define BANNER_WIDTH THEME->GetMetricF("ScreenSelectMusic","BannerWidth")
|
||||||
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectMusic","BannerHeight")
|
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectMusic","BannerHeight")
|
||||||
#define BPM_X THEME->GetMetricF("ScreenSelectMusic","BPMX")
|
#define BPM_X THEME->GetMetricF("ScreenSelectMusic","BPMX")
|
||||||
#define BPM_Y THEME->GetMetricF("ScreenSelectMusic","BPMY")
|
#define BPM_Y THEME->GetMetricF("ScreenSelectMusic","BPMY")
|
||||||
#define STAGE_X THEME->GetMetricF("ScreenSelectMusic","StageX")
|
#define STAGE_X THEME->GetMetricF("ScreenSelectMusic","StageX")
|
||||||
#define STAGE_Y THEME->GetMetricF("ScreenSelectMusic","StageY")
|
#define STAGE_Y THEME->GetMetricF("ScreenSelectMusic","StageY")
|
||||||
#define CD_TITLE_X THEME->GetMetricF("ScreenSelectMusic","CDTitleX")
|
#define CD_TITLE_X THEME->GetMetricF("ScreenSelectMusic","CDTitleX")
|
||||||
#define CD_TITLE_Y THEME->GetMetricF("ScreenSelectMusic","CDTitleY")
|
#define CD_TITLE_Y THEME->GetMetricF("ScreenSelectMusic","CDTitleY")
|
||||||
#define DIFFICULTY_X THEME->GetMetricF("ScreenSelectMusic","DifficultyX")
|
#define DIFFICULTY_FRAME_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("DifficultyFrameP%dX",p+1))
|
||||||
#define DIFFICULTY_Y THEME->GetMetricF("ScreenSelectMusic","DifficultyY")
|
#define DIFFICULTY_FRAME_Y( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("DifficultyFrameP%dY",p+1))
|
||||||
#define ICON_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("IconP%dX",p+1))
|
#define DIFFICULTY_ICON_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("DifficultyIconP%dX",p+1))
|
||||||
#define ICON_Y( i ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("IconP%dY",i+1))
|
#define DIFFICULTY_ICON_Y( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("DifficultyIconP%dY",p+1))
|
||||||
#define RADAR_X THEME->GetMetricF("ScreenSelectMusic","RadarX")
|
#define RADAR_X THEME->GetMetricF("ScreenSelectMusic","RadarX")
|
||||||
#define RADAR_Y THEME->GetMetricF("ScreenSelectMusic","RadarY")
|
#define RADAR_Y THEME->GetMetricF("ScreenSelectMusic","RadarY")
|
||||||
#define SORT_ICON_X THEME->GetMetricF("ScreenSelectMusic","SortIconX")
|
#define SORT_ICON_X THEME->GetMetricF("ScreenSelectMusic","SortIconX")
|
||||||
#define SORT_ICON_Y THEME->GetMetricF("ScreenSelectMusic","SortIconY")
|
#define SORT_ICON_Y THEME->GetMetricF("ScreenSelectMusic","SortIconY")
|
||||||
#define SCORE_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("ScoreP%dX",p+1))
|
#define SCORE_FRAME_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("ScoreFrameP%dX",p+1))
|
||||||
#define SCORE_Y( i ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("ScoreP%dY",i+1))
|
#define SCORE_FRAME_Y( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("ScoreFrameP%dY",p+1))
|
||||||
#define METER_FRAME_X THEME->GetMetricF("ScreenSelectMusic","MeterFrameX")
|
#define SCORE_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("ScoreP%dX",p+1))
|
||||||
#define METER_FRAME_Y THEME->GetMetricF("ScreenSelectMusic","MeterFrameY")
|
#define SCORE_Y( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("ScoreP%dY",p+1))
|
||||||
#define METER_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("MeterP%dX",p+1))
|
#define METER_FRAME_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("MeterFrameP%dX",p+1))
|
||||||
#define METER_Y( i ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("MeterP%dY",i+1))
|
#define METER_FRAME_Y( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("MeterFrameP%dY",p+1))
|
||||||
#define WHEEL_X THEME->GetMetricF("ScreenSelectMusic","WheelX")
|
#define METER_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("MeterP%dX",p+1))
|
||||||
#define WHEEL_Y THEME->GetMetricF("ScreenSelectMusic","WheelY")
|
#define METER_Y( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("MeterP%dY",p+1))
|
||||||
#define PLAYER_OPTIONS_X( p )THEME->GetMetricF("ScreenSelectMusic",ssprintf("PlayerOptionsP%dX",p+1))
|
#define WHEEL_X THEME->GetMetricF("ScreenSelectMusic","WheelX")
|
||||||
#define PLAYER_OPTIONS_Y( i )THEME->GetMetricF("ScreenSelectMusic",ssprintf("PlayerOptionsP%dY",i+1))
|
#define WHEEL_Y THEME->GetMetricF("ScreenSelectMusic","WheelY")
|
||||||
#define SONG_OPTIONS_X THEME->GetMetricF("ScreenSelectMusic","SongOptionsX")
|
#define PLAYER_OPTIONS_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("PlayerOptionsP%dX",p+1))
|
||||||
#define SONG_OPTIONS_Y THEME->GetMetricF("ScreenSelectMusic","SongOptionsY")
|
#define PLAYER_OPTIONS_Y( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("PlayerOptionsP%dY",p+1))
|
||||||
#define OPTION_ICONS_X THEME->GetMetricF("ScreenSelectMusic","OptionIconsX")
|
#define SONG_OPTIONS_X THEME->GetMetricF("ScreenSelectMusic","SongOptionsX")
|
||||||
#define OPTION_ICONS_Y THEME->GetMetricF("ScreenSelectMusic","OptionIconsY")
|
#define SONG_OPTIONS_Y THEME->GetMetricF("ScreenSelectMusic","SongOptionsY")
|
||||||
#define HELP_TEXT THEME->GetMetric("ScreenSelectMusic","HelpText")
|
#define OPTION_ICONS_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("OptionIconsP%dX",p+1))
|
||||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectMusic","TimerSeconds")
|
#define OPTION_ICONS_Y( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("OptionIconsP%dY",p+1))
|
||||||
|
#define HELP_TEXT THEME->GetMetric("ScreenSelectMusic","HelpText")
|
||||||
|
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectMusic","TimerSeconds")
|
||||||
#define SCORE_CONNECTED_TO_MUSIC_WHEEL THEME->GetMetricB("ScreenSelectMusic","ScoreConnectedToMusicWheel")
|
#define SCORE_CONNECTED_TO_MUSIC_WHEEL THEME->GetMetricB("ScreenSelectMusic","ScoreConnectedToMusicWheel")
|
||||||
|
|
||||||
const float TWEEN_TIME = 0.5f;
|
const float TWEEN_TIME = 0.5f;
|
||||||
@@ -101,7 +103,6 @@ ScreenSelectMusic::ScreenSelectMusic()
|
|||||||
this->AddChild( &m_sprBannerFrame );
|
this->AddChild( &m_sprBannerFrame );
|
||||||
|
|
||||||
m_BPMDisplay.SetXY( BPM_X, BPM_Y );
|
m_BPMDisplay.SetXY( BPM_X, BPM_Y );
|
||||||
m_BPMDisplay.SetZoomX( 1.0f );
|
|
||||||
this->AddChild( &m_BPMDisplay );
|
this->AddChild( &m_BPMDisplay );
|
||||||
|
|
||||||
m_textStage.LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
|
m_textStage.LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
|
||||||
@@ -117,13 +118,18 @@ ScreenSelectMusic::ScreenSelectMusic()
|
|||||||
m_sprCDTitle.SetXY( CD_TITLE_X, CD_TITLE_Y );
|
m_sprCDTitle.SetXY( CD_TITLE_X, CD_TITLE_Y );
|
||||||
this->AddChild( &m_sprCDTitle );
|
this->AddChild( &m_sprCDTitle );
|
||||||
|
|
||||||
m_sprDifficultyFrame.Load( THEME->GetPathTo("Graphics","select music difficulty frame") );
|
|
||||||
m_sprDifficultyFrame.SetXY( DIFFICULTY_X, DIFFICULTY_Y );
|
|
||||||
this->AddChild( &m_sprDifficultyFrame );
|
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
m_DifficultyIcon[p].SetXY( ICON_X(p), ICON_Y(p) );
|
if( !GAMESTATE->IsPlayerEnabled(p) )
|
||||||
|
continue; // skip
|
||||||
|
|
||||||
|
m_sprDifficultyFrame[p].Load( THEME->GetPathTo("Graphics","select music difficulty frame 2x1") );
|
||||||
|
m_sprDifficultyFrame[p].SetXY( DIFFICULTY_FRAME_X(p), DIFFICULTY_FRAME_Y(p) );
|
||||||
|
m_sprDifficultyFrame[p].StopAnimating();
|
||||||
|
m_sprDifficultyFrame[p].SetState( p );
|
||||||
|
this->AddChild( &m_sprDifficultyFrame[p] );
|
||||||
|
|
||||||
|
m_DifficultyIcon[p].SetXY( DIFFICULTY_ICON_X(p), DIFFICULTY_ICON_Y(p) );
|
||||||
this->AddChild( &m_DifficultyIcon[p] );
|
this->AddChild( &m_DifficultyIcon[p] );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +148,7 @@ ScreenSelectMusic::ScreenSelectMusic()
|
|||||||
m_textSongOptions.SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white
|
m_textSongOptions.SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white
|
||||||
this->AddChild( &m_textSongOptions );
|
this->AddChild( &m_textSongOptions );
|
||||||
|
|
||||||
|
/*
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
if( !GAMESTATE->IsPlayerEnabled(p) )
|
if( !GAMESTATE->IsPlayerEnabled(p) )
|
||||||
@@ -158,14 +164,22 @@ ScreenSelectMusic::ScreenSelectMusic()
|
|||||||
m_textPlayerOptions[p].SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white
|
m_textPlayerOptions[p].SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white
|
||||||
this->AddChild( &m_textPlayerOptions[p] );
|
this->AddChild( &m_textPlayerOptions[p] );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
m_sprMeterFrame.Load( THEME->GetPathTo("Graphics","select music meter frame") );
|
|
||||||
m_sprMeterFrame.SetXY( METER_FRAME_X, METER_FRAME_Y );
|
|
||||||
this->AddChild( &m_sprMeterFrame );
|
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
|
if( !GAMESTATE->IsPlayerEnabled(p) )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
m_OptionIconRow[p].SetXY( OPTION_ICONS_X(p), OPTION_ICONS_Y(p) );
|
||||||
|
m_OptionIconRow[p].Refresh( (PlayerNumber)p );
|
||||||
|
this->AddChild( &m_OptionIconRow[p] );
|
||||||
|
|
||||||
|
m_sprMeterFrame[p].Load( THEME->GetPathTo("Graphics","select music meter frame") );
|
||||||
|
m_sprMeterFrame[p].SetXY( METER_FRAME_X(p), METER_FRAME_Y(p) );
|
||||||
|
m_sprMeterFrame[p].StopAnimating();
|
||||||
|
m_sprMeterFrame[p].SetState( p );
|
||||||
|
this->AddChild( &m_sprMeterFrame[p] );
|
||||||
|
|
||||||
m_FootMeter[p].LoadFromFont( THEME->GetPathTo("Fonts","meter") );
|
m_FootMeter[p].LoadFromFont( THEME->GetPathTo("Fonts","meter") );
|
||||||
m_FootMeter[p].SetXY( METER_X(p), METER_Y(p) );
|
m_FootMeter[p].SetXY( METER_X(p), METER_Y(p) );
|
||||||
m_FootMeter[p].SetShadowLength( 2 );
|
m_FootMeter[p].SetShadowLength( 2 );
|
||||||
@@ -241,72 +255,42 @@ void ScreenSelectMusic::DrawPrimitives()
|
|||||||
|
|
||||||
void ScreenSelectMusic::TweenOnScreen()
|
void ScreenSelectMusic::TweenOnScreen()
|
||||||
{
|
{
|
||||||
float fOriginalZoomY;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
CArray<Actor*,Actor*> apActorsInGroupInfoFrame;
|
m_sprBannerFrame.FadeOn( 0, "bounce left", TWEEN_TIME );
|
||||||
apActorsInGroupInfoFrame.Add( &m_sprBannerFrame );
|
m_Banner.FadeOn( 0, "bounce left", TWEEN_TIME );
|
||||||
apActorsInGroupInfoFrame.Add( &m_Banner );
|
m_BPMDisplay.FadeOn( 0, "bounce left", TWEEN_TIME );
|
||||||
apActorsInGroupInfoFrame.Add( &m_BPMDisplay );
|
m_textStage.FadeOn( 0, "bounce left", TWEEN_TIME );
|
||||||
apActorsInGroupInfoFrame.Add( &m_textStage );
|
m_sprCDTitle.FadeOn( 0, "bounce left", TWEEN_TIME );
|
||||||
apActorsInGroupInfoFrame.Add( &m_sprCDTitle );
|
|
||||||
for( i=0; i<apActorsInGroupInfoFrame.GetSize(); i++ )
|
|
||||||
{
|
|
||||||
float fOriginalX = apActorsInGroupInfoFrame[i]->GetX();
|
|
||||||
apActorsInGroupInfoFrame[i]->SetX( fOriginalX-400 );
|
|
||||||
apActorsInGroupInfoFrame[i]->BeginTweening( TWEEN_TIME, TWEEN_BOUNCE_END );
|
|
||||||
apActorsInGroupInfoFrame[i]->SetTweenX( fOriginalX );
|
|
||||||
}
|
|
||||||
|
|
||||||
fOriginalZoomY = m_sprDifficultyFrame.GetZoomY();
|
|
||||||
m_sprDifficultyFrame.BeginTweening( TWEEN_TIME );
|
|
||||||
m_sprDifficultyFrame.SetTweenZoomY( fOriginalZoomY );
|
|
||||||
|
|
||||||
fOriginalZoomY = m_sprMeterFrame.GetZoomY();
|
|
||||||
m_sprMeterFrame.BeginTweening( TWEEN_TIME );
|
|
||||||
m_sprMeterFrame.SetTweenZoomY( fOriginalZoomY );
|
|
||||||
|
|
||||||
m_GrooveRadar.TweenOnScreen();
|
|
||||||
|
|
||||||
// fOriginalZoomY = m_OptionIcons.GetZoomY();
|
|
||||||
// m_OptionIcons.BeginTweening( TWEEN_TIME );
|
|
||||||
// m_OptionIcons.SetTweenZoomY( fOriginalZoomY );
|
|
||||||
|
|
||||||
fOriginalZoomY = m_textSongOptions.GetZoomY();
|
|
||||||
m_textSongOptions.BeginTweening( TWEEN_TIME );
|
|
||||||
m_textSongOptions.SetTweenZoomY( fOriginalZoomY );
|
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
fOriginalZoomY = m_textPlayerOptions[p].GetZoomY();
|
m_sprDifficultyFrame[p].FadeOn( 0, "fade", TWEEN_TIME );
|
||||||
m_textPlayerOptions[p].BeginTweening( TWEEN_TIME );
|
m_sprMeterFrame[p].FadeOn( 0, "fade", TWEEN_TIME );
|
||||||
m_textPlayerOptions[p].SetTweenZoomY( fOriginalZoomY );
|
|
||||||
|
|
||||||
fOriginalZoomY = m_DifficultyIcon[p].GetZoomY();
|
|
||||||
m_DifficultyIcon[p].BeginTweening( TWEEN_TIME );
|
|
||||||
m_DifficultyIcon[p].SetTweenZoomY( fOriginalZoomY );
|
|
||||||
|
|
||||||
fOriginalZoomY = m_FootMeter[p].GetZoomY();
|
|
||||||
m_FootMeter[p].BeginTweening( TWEEN_TIME );
|
|
||||||
m_FootMeter[p].SetTweenZoomY( fOriginalZoomY );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_MusicSortDisplay.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
m_GrooveRadar.TweenOnScreen();
|
||||||
m_MusicSortDisplay.BeginTweening( TWEEN_TIME );
|
|
||||||
m_MusicSortDisplay.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
m_textSongOptions.FadeOn( 0, "fade", TWEEN_TIME );
|
||||||
|
|
||||||
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
{
|
||||||
|
m_OptionIconRow[p].FadeOn( 0, "foldy", TWEEN_TIME );
|
||||||
|
// fOriginalZoomY = m_textPlayerOptions[p].GetZoomY();
|
||||||
|
// m_textPlayerOptions[p].BeginTweening( TWEEN_TIME );
|
||||||
|
// m_textPlayerOptions[p].SetTweenZoomY( fOriginalZoomY );
|
||||||
|
|
||||||
|
m_DifficultyIcon[p].FadeOn( 0, "foldy", TWEEN_TIME );
|
||||||
|
|
||||||
|
m_FootMeter[p].FadeOn( 0, "foldy", TWEEN_TIME );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_MusicSortDisplay.FadeOn( 0, "fade", TWEEN_TIME );
|
||||||
|
|
||||||
|
|
||||||
CArray<Actor*,Actor*> apActorsInScore;
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
apActorsInScore.Add( &m_sprHighScoreFrame[p] );
|
m_sprHighScoreFrame[p].FadeOn( 0, SCORE_CONNECTED_TO_MUSIC_WHEEL?"accelerate right":"accelerate left", TWEEN_TIME );
|
||||||
apActorsInScore.Add( &m_HighScore[p] );
|
m_HighScore[p].FadeOn( 0, SCORE_CONNECTED_TO_MUSIC_WHEEL?"accelerate right":"accelerate left", TWEEN_TIME );
|
||||||
}
|
|
||||||
for( i=0; i<apActorsInScore.GetSize(); i++ )
|
|
||||||
{
|
|
||||||
float fOriginalX = apActorsInScore[i]->GetX();
|
|
||||||
apActorsInScore[i]->SetX( SCORE_CONNECTED_TO_MUSIC_WHEEL ? fOriginalX+400 : fOriginalX-400 );
|
|
||||||
apActorsInScore[i]->BeginTweening( TWEEN_TIME, TWEEN_BIAS_END );
|
|
||||||
apActorsInScore[i]->SetTweenX( fOriginalX );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_MusicWheel.TweenOnScreen();
|
m_MusicWheel.TweenOnScreen();
|
||||||
@@ -316,47 +300,34 @@ void ScreenSelectMusic::TweenOffScreen()
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
CArray<Actor*,Actor*> apActorsInGroupInfoFrame;
|
m_sprBannerFrame.FadeOff( 0, "bounce left", TWEEN_TIME );
|
||||||
apActorsInGroupInfoFrame.Add( &m_sprBannerFrame );
|
m_Banner.FadeOff( 0, "bounce left", TWEEN_TIME );
|
||||||
apActorsInGroupInfoFrame.Add( &m_Banner );
|
m_BPMDisplay.FadeOff( 0, "bounce left", TWEEN_TIME );
|
||||||
apActorsInGroupInfoFrame.Add( &m_BPMDisplay );
|
m_textStage.FadeOff( 0, "bounce left", TWEEN_TIME );
|
||||||
apActorsInGroupInfoFrame.Add( &m_textStage );
|
m_sprCDTitle.FadeOff( 0, "bounce left", TWEEN_TIME );
|
||||||
apActorsInGroupInfoFrame.Add( &m_sprCDTitle );
|
|
||||||
for( i=0; i<apActorsInGroupInfoFrame.GetSize(); i++ )
|
|
||||||
{
|
|
||||||
apActorsInGroupInfoFrame[i]->BeginTweening( TWEEN_TIME, TWEEN_BOUNCE_BEGIN );
|
|
||||||
apActorsInGroupInfoFrame[i]->SetTweenX( apActorsInGroupInfoFrame[i]->GetX()-400 );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_sprDifficultyFrame.BeginTweening( TWEEN_TIME );
|
|
||||||
m_sprDifficultyFrame.SetTweenZoomY( 0 );
|
|
||||||
|
|
||||||
m_sprMeterFrame.BeginTweening( TWEEN_TIME );
|
|
||||||
m_sprMeterFrame.SetTweenZoomY( 0 );
|
|
||||||
|
|
||||||
m_GrooveRadar.TweenOffScreen();
|
|
||||||
|
|
||||||
// m_OptionIcons.BeginTweening( TWEEN_TIME );
|
|
||||||
// m_OptionIcons.SetTweenZoomY( 0 );
|
|
||||||
|
|
||||||
m_textSongOptions.BeginTweening( TWEEN_TIME );
|
|
||||||
m_textSongOptions.SetTweenZoomY( 0 );
|
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
m_textPlayerOptions[p].BeginTweening( TWEEN_TIME );
|
m_sprDifficultyFrame[p].FadeOff( 0, "fade", TWEEN_TIME );
|
||||||
m_textPlayerOptions[p].SetTweenZoomY( 0 );
|
m_sprMeterFrame[p].FadeOff( 0, "fade", TWEEN_TIME );
|
||||||
|
|
||||||
m_DifficultyIcon[p].BeginTweening( TWEEN_TIME );
|
|
||||||
m_DifficultyIcon[p].SetTweenZoomY( 0 );
|
|
||||||
|
|
||||||
m_FootMeter[p].BeginTweening( TWEEN_TIME );
|
|
||||||
m_FootMeter[p].SetTweenZoomY( 0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_MusicSortDisplay.SetEffectNone();
|
|
||||||
m_MusicSortDisplay.BeginTweening( TWEEN_TIME );
|
m_GrooveRadar.TweenOffScreen();
|
||||||
m_MusicSortDisplay.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
|
||||||
|
m_textSongOptions.FadeOff( 0, "fade", TWEEN_TIME );
|
||||||
|
|
||||||
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
{
|
||||||
|
m_OptionIconRow[p].FadeOff( 0, "foldy", TWEEN_TIME );
|
||||||
|
// m_textPlayerOptions[p].FadeOff( 0, "fade", TWEEN_TIME );
|
||||||
|
|
||||||
|
m_DifficultyIcon[p].FadeOff( 0, "foldy", TWEEN_TIME );
|
||||||
|
|
||||||
|
m_FootMeter[p].FadeOff( 0, "foldy", TWEEN_TIME );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_MusicSortDisplay.FadeOff( 0, "fade", TWEEN_TIME );
|
||||||
|
|
||||||
CArray<Actor*,Actor*> apActorsInScore;
|
CArray<Actor*,Actor*> apActorsInScore;
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
@@ -813,13 +784,17 @@ void ScreenSelectMusic::UpdateOptionsDisplays()
|
|||||||
{
|
{
|
||||||
// m_OptionIcons.Load( GAMESTATE->m_PlayerOptions, &GAMESTATE->m_SongOptions );
|
// m_OptionIcons.Load( GAMESTATE->m_PlayerOptions, &GAMESTATE->m_SongOptions );
|
||||||
|
|
||||||
|
// m_PlayerOptionIcons.Refresh();
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
|
m_OptionIconRow[p].Refresh( (PlayerNumber)p );
|
||||||
|
|
||||||
if( GAMESTATE->IsPlayerEnabled(p) )
|
if( GAMESTATE->IsPlayerEnabled(p) )
|
||||||
{
|
{
|
||||||
CString s = GAMESTATE->m_PlayerOptions[p].GetString();
|
CString s = GAMESTATE->m_PlayerOptions[p].GetString();
|
||||||
s.Replace( ", ", "\n" );
|
s.Replace( ", ", "\n" );
|
||||||
m_textPlayerOptions[p].SetText( s );
|
// m_textPlayerOptions[p].SetText( s );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include "GrooveRadar.h"
|
#include "GrooveRadar.h"
|
||||||
#include "DifficultyIcon.h"
|
#include "DifficultyIcon.h"
|
||||||
#include "FootMeter.h"
|
#include "FootMeter.h"
|
||||||
|
#include "OptionIconRow.h"
|
||||||
|
|
||||||
|
|
||||||
class ScreenSelectMusic : public Screen
|
class ScreenSelectMusic : public Screen
|
||||||
@@ -66,12 +67,13 @@ protected:
|
|||||||
BPMDisplay m_BPMDisplay;
|
BPMDisplay m_BPMDisplay;
|
||||||
BitmapText m_textStage;
|
BitmapText m_textStage;
|
||||||
Sprite m_sprCDTitle;
|
Sprite m_sprCDTitle;
|
||||||
Sprite m_sprDifficultyFrame;
|
Sprite m_sprDifficultyFrame[NUM_PLAYERS];
|
||||||
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
|
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
|
||||||
GrooveRadar m_GrooveRadar;
|
GrooveRadar m_GrooveRadar;
|
||||||
BitmapText m_textPlayerOptions[NUM_PLAYERS];
|
// BitmapText m_textPlayerOptions[NUM_PLAYERS];
|
||||||
BitmapText m_textSongOptions;
|
BitmapText m_textSongOptions;
|
||||||
Sprite m_sprMeterFrame;
|
OptionIconRow m_OptionIconRow[NUM_PLAYERS];
|
||||||
|
Sprite m_sprMeterFrame[NUM_PLAYERS];
|
||||||
FootMeter m_FootMeter[NUM_PLAYERS];
|
FootMeter m_FootMeter[NUM_PLAYERS];
|
||||||
MusicSortDisplay m_MusicSortDisplay;
|
MusicSortDisplay m_MusicSortDisplay;
|
||||||
Sprite m_sprHighScoreFrame[NUM_PLAYERS];
|
Sprite m_sprHighScoreFrame[NUM_PLAYERS];
|
||||||
|
|||||||
@@ -275,9 +275,9 @@ void ScreenSelectStyle::MenuBack( PlayerNumber p )
|
|||||||
void ScreenSelectStyle::TweenOnScreen()
|
void ScreenSelectStyle::TweenOnScreen()
|
||||||
{
|
{
|
||||||
for( int i=0; i<m_aPossibleStyles.GetSize(); i++ )
|
for( int i=0; i<m_aPossibleStyles.GetSize(); i++ )
|
||||||
m_sprIcon[i].FadeOntoScreen( (m_aPossibleStyles.GetSize()-i)*0.1f, "Left Accelerate", MENU_ELEMENTS_TWEEN_TIME );
|
m_sprIcon[i].FadeOn( (m_aPossibleStyles.GetSize()-i)*0.05f, "Left Accelerate", MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
|
||||||
m_sprExplanation.FadeOntoScreen( 0, "Right Accelerate", MENU_ELEMENTS_TWEEN_TIME );
|
m_sprExplanation.FadeOn( 0, "Right Accelerate", MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
|
||||||
// let AfterChange tween Preview and Info
|
// let AfterChange tween Preview and Info
|
||||||
}
|
}
|
||||||
@@ -285,13 +285,13 @@ void ScreenSelectStyle::TweenOnScreen()
|
|||||||
void ScreenSelectStyle::TweenOffScreen()
|
void ScreenSelectStyle::TweenOffScreen()
|
||||||
{
|
{
|
||||||
for( int i=0; i<m_aPossibleStyles.GetSize(); i++ )
|
for( int i=0; i<m_aPossibleStyles.GetSize(); i++ )
|
||||||
m_sprIcon[i].FadeOffScreen( (m_aPossibleStyles.GetSize()-i)*0.1f, "Left Accelerate", MENU_ELEMENTS_TWEEN_TIME );
|
m_sprIcon[i].FadeOff( 0, "FoldY", MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
|
||||||
m_sprExplanation.FadeOffScreen( 0, "Right Accelerate", MENU_ELEMENTS_TWEEN_TIME );
|
m_sprExplanation.FadeOff( 0, "FoldY", MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
|
||||||
m_sprPreview.FadeOffScreen( 0, "Fade", MENU_ELEMENTS_TWEEN_TIME );
|
m_sprPreview.FadeOff( 0, "FoldY", MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
|
||||||
m_sprInfo.FadeOffScreen( 0, "FoldY", MENU_ELEMENTS_TWEEN_TIME );
|
m_sprInfo.FadeOff( 0, "FoldY", MENU_ELEMENTS_TWEEN_TIME );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,13 +25,8 @@ SongManager* SONGMAN = NULL; // global and accessable from anywhere in our progr
|
|||||||
|
|
||||||
const CString g_sStatisticsFileName = "statistics.ini";
|
const CString g_sStatisticsFileName = "statistics.ini";
|
||||||
|
|
||||||
#define GROUP_COLOR_1 THEME->GetMetricC("SongManager","GroupColor1")
|
#define NUM_GROUP_COLORS THEME->GetMetricI("SongManager","NumGroupColors")
|
||||||
#define GROUP_COLOR_2 THEME->GetMetricC("SongManager","GroupColor2")
|
#define GROUP_COLOR( i ) THEME->GetMetricC("SongManager",ssprintf("GroupColor%d",i+1))
|
||||||
#define GROUP_COLOR_3 THEME->GetMetricC("SongManager","GroupColor3")
|
|
||||||
#define GROUP_COLOR_4 THEME->GetMetricC("SongManager","GroupColor4")
|
|
||||||
#define GROUP_COLOR_5 THEME->GetMetricC("SongManager","GroupColor5")
|
|
||||||
#define GROUP_COLOR_6 THEME->GetMetricC("SongManager","GroupColor6")
|
|
||||||
#define GROUP_COLOR_7 THEME->GetMetricC("SongManager","GroupColor7")
|
|
||||||
#define EXTRA_COLOR THEME->GetMetricC("SongManager","ExtraColor")
|
#define EXTRA_COLOR THEME->GetMetricC("SongManager","ExtraColor")
|
||||||
|
|
||||||
const int NUM_GROUP_COLORS = 7;
|
const int NUM_GROUP_COLORS = 7;
|
||||||
|
|||||||
@@ -698,18 +698,18 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
|||||||
<File
|
<File
|
||||||
RelativePath="OptionIcon.h">
|
RelativePath="OptionIcon.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="OptionIconRow.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="OptionIconRow.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="OptionsCursor.cpp">
|
RelativePath="OptionsCursor.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="OptionsCursor.h">
|
RelativePath="OptionsCursor.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="PlayerOptionIcons.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="PlayerOptionIcons.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="ScrollBar.cpp">
|
RelativePath="ScrollBar.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ ThemeManager::ThemeManager()
|
|||||||
m_pIniMetrics = new IniFile;
|
m_pIniMetrics = new IniFile;
|
||||||
|
|
||||||
/* Update the metric cache on the first call to GetMetric. */
|
/* Update the metric cache on the first call to GetMetric. */
|
||||||
NextReloadCheck = -1;
|
m_uNextReloadTicks = -1;
|
||||||
|
|
||||||
m_sCurThemeName = BASE_THEME_NAME; // Use te base theme for now. It's up to PrefsManager to change this.
|
m_sCurThemeName = BASE_THEME_NAME; // Use te base theme for now. It's up to PrefsManager to change this.
|
||||||
|
|
||||||
@@ -219,9 +219,9 @@ try_metric_again:
|
|||||||
CString sDefaultMetricPath = GetMetricsPathFromName(BASE_THEME_NAME);
|
CString sDefaultMetricPath = GetMetricsPathFromName(BASE_THEME_NAME);
|
||||||
|
|
||||||
// Is our metric cache out of date?
|
// Is our metric cache out of date?
|
||||||
if (NextReloadCheck == -1 || TIMER->GetTimeSinceStart() > NextReloadCheck)
|
if (m_uNextReloadTicks == -1 || ::GetTickCount() > m_uNextReloadTicks)
|
||||||
{
|
{
|
||||||
NextReloadCheck = TIMER->GetTimeSinceStart()+1.0f;
|
m_uNextReloadTicks = GetTickCount()+1000;
|
||||||
if( m_iHashForCurThemeMetrics != GetHashForFile(sCurMetricPath) ||
|
if( m_iHashForCurThemeMetrics != GetHashForFile(sCurMetricPath) ||
|
||||||
m_iHashForBaseThemeMetrics != GetHashForFile(sDefaultMetricPath) )
|
m_iHashForBaseThemeMetrics != GetHashForFile(sDefaultMetricPath) )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ class IniFile;
|
|||||||
|
|
||||||
class ThemeManager
|
class ThemeManager
|
||||||
{
|
{
|
||||||
float NextReloadCheck;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ThemeManager();
|
ThemeManager();
|
||||||
~ThemeManager();
|
~ThemeManager();
|
||||||
@@ -48,6 +46,7 @@ protected:
|
|||||||
CString m_sCurThemeName;
|
CString m_sCurThemeName;
|
||||||
|
|
||||||
IniFile* m_pIniMetrics; // make this a pointer so we don't have to include IniFile in this header!
|
IniFile* m_pIniMetrics; // make this a pointer so we don't have to include IniFile in this header!
|
||||||
|
DWORD m_uNextReloadTicks;
|
||||||
int m_iHashForCurThemeMetrics;
|
int m_iHashForCurThemeMetrics;
|
||||||
int m_iHashForBaseThemeMetrics;
|
int m_iHashForBaseThemeMetrics;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user