updated unlock screen - now it can be configured to be MAX2-style (shows the numbers 1-30)

This commit is contained in:
Andrew Wong
2003-07-08 18:50:24 +00:00
parent 7c07ca4d72
commit a471a70e1e
4 changed files with 61 additions and 52 deletions
+41 -7
View File
@@ -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) == "-" )