updated unlock screen - now it can be configured to be MAX2-style (shows the numbers 1-30)
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: ScreenUnlock
|
||||
|
||||
Desc: See header.
|
||||
|
||||
Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
||||
curewater
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#include "global.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "ScreenUnlock.h"
|
||||
@@ -6,22 +18,44 @@
|
||||
#include "RageLog.h"
|
||||
#include "UnlockSystem.h"
|
||||
|
||||
|
||||
|
||||
|
||||
ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock")
|
||||
{
|
||||
LOG->Trace("ScreenUnlock::ScreenUnlock()");
|
||||
PointsUntilNextUnlock.LoadFromFont( THEME->GetPathToF("Common normal") );
|
||||
PointsUntilNextUnlock.SetHorizAlign( Actor::align_left );
|
||||
|
||||
CString sDP = ssprintf( "%f", GAMESTATE->m_pUnlockingSys->NumPointsUntilNextUnlock() );
|
||||
|
||||
// Remove the decimal
|
||||
CString sDP = ssprintf( "%d", (int)GAMESTATE->m_pUnlockingSys->NumPointsUntilNextUnlock() );
|
||||
|
||||
for(int i=1; i <= THEME->GetMetricI("ScreenUnlock", "NumUnlocks"); i++)
|
||||
{
|
||||
// new unlock graphic
|
||||
char filename[30];
|
||||
|
||||
sprintf(filename, "UnlockGraphic%d", i);
|
||||
Unlocks[i].Load( THEME->GetPathToG(filename) );
|
||||
|
||||
sprintf(filename, "Unlock%d", i);
|
||||
PointsUntilNextUnlock.SetXY(
|
||||
THEME->GetMetricI("ScreenUnlock",ssprintf("Unlock%dX", i)),
|
||||
THEME->GetMetricI("ScreenUnlock",ssprintf("Unlock%dX", i)) );
|
||||
|
||||
Unlocks[i].SetName( ssprintf("Unlock%d",i) );
|
||||
|
||||
UtilSetXY( Unlocks[i], "ScreenUnlock" );
|
||||
|
||||
if (!GAMESTATE->m_pUnlockingSys->SongIsLocked
|
||||
(THEME->GetMetric
|
||||
("ScreenUnlock", ssprintf
|
||||
("Unlock%dSong", i))))
|
||||
this->AddChild(&Unlocks[i]);
|
||||
|
||||
}
|
||||
|
||||
/* Remove the decimal
|
||||
if( sDP.Find(".",1) > 0 )
|
||||
{
|
||||
sDP = sDP.Left(sDP.Find(".",1));
|
||||
}
|
||||
} no longer necessary since its an int*/
|
||||
|
||||
// No negative numbers
|
||||
if( sDP.Left(1) == "-" )
|
||||
|
||||
Reference in New Issue
Block a user