Fixed a bug with "points till next unlock"
Implemented metrics for unlock screen (sets position and size of dance points till next unlock)
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include "RageLog.h"
|
||||
#include "UnlockSystem.h"
|
||||
|
||||
|
||||
|
||||
|
||||
ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock")
|
||||
{
|
||||
LOG->Trace("ScreenUnlock::ScreenUnlock()");
|
||||
@@ -27,7 +30,7 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock")
|
||||
};
|
||||
|
||||
PointsUntilNextUnlock.SetText( sDP );
|
||||
PointsUntilNextUnlock.SetZoom( 3 );
|
||||
PointsUntilNextUnlock.SetXY( 10, 370 );
|
||||
PointsUntilNextUnlock.SetZoom( THEME->GetMetricF("ScreenUnlock","DancePointsZoom") );
|
||||
PointsUntilNextUnlock.SetXY( THEME->GetMetricI("ScreenUnlock","DancePointsDisplayX"), THEME->GetMetricI("ScreenUnlock","DancePointsDisplayY") );
|
||||
this->AddChild( &PointsUntilNextUnlock );
|
||||
}
|
||||
@@ -287,6 +287,7 @@ float UnlockSystem::NumPointsUntilNextUnlock()
|
||||
fSmallestPoints = min(fSmallestPoints, m_SongEntries[a].m_fDancePointsRequired);
|
||||
}
|
||||
|
||||
if (fSmallestPoints == 400000000) return 0; // no match found
|
||||
return fSmallestPoints - PREFSMAN->m_fDancePointsAccumulated;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user