ScreenBranch: use ModeChoice

This commit is contained in:
Glenn Maynard
2004-02-16 04:31:18 +00:00
parent 3906ea166f
commit d075baa5d1
2 changed files with 10 additions and 3 deletions
+2 -2
View File
@@ -3664,8 +3664,8 @@ Class=ScreenBranch
Choices=Credits,MusicScroll
ConditionCredits=GetBestFinalGrade() <= Grade("AA")
ConditionMusicScroll=true
NextScreenCredits=ScreenCredits
NextScreenMusicScroll=ScreenMusicScroll
NextScreenCredits=screen,ScreenCredits
NextScreenMusicScroll=screen,ScreenMusicScroll
[EditMenu]
Arrows1X=190
+8 -1
View File
@@ -15,6 +15,7 @@
#include "ScreenManager.h"
#include "ThemeManager.h"
#include "LuaHelpers.h"
#include "ModeChoice.h"
#define CHOICES THEME->GetMetric (m_sName,"Choices")
#define CONDITION(choice) THEME->GetMetric (m_sName,"Condition"+choice)
@@ -50,7 +51,13 @@ void ScreenBranch::HandleScreenMessage( const ScreenMessage SM )
{
CString sNextScreen = NEXT_SCREEN(m_sChoice);
LOG->Trace( "Branching to '%s'", sNextScreen.c_str() );
SCREENMAN->SetNewScreen( sNextScreen );
ModeChoice mc;
mc.Load( 0, sNextScreen );
if( mc.m_sScreen == "" )
RageException::Throw("Metric %s::%s must set \"screen\"",
m_sName, ("NextScreen"+m_sChoice).c_str() );
mc.ApplyToAllPlayers();
}
break;
}