From 6493010e49f58d8a43ae8810870afaad5e7aa5f3 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 20 Jan 2005 00:37:33 +0000 Subject: [PATCH] Use a Lua script to select the evaluation screen, instead of a ScreenBranch. This approach has several advantages. It's more flexible; full conditionals can be used. It mixes with things like the "bGoingToPlayTheSameMusic" logic in ScreenAttract much better; it gets the real real next screen, not the branch. It also mixes with screen preloading, such as used by ScreenStage. (I don't know if grouping functions that are used like branches makes sense; I'm not sure how Lua will be used in general, so this stuff might get reorganized later.) --- stepmania/Themes/default/Scripts/Branches.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 stepmania/Themes/default/Scripts/Branches.lua diff --git a/stepmania/Themes/default/Scripts/Branches.lua b/stepmania/Themes/default/Scripts/Branches.lua new file mode 100644 index 0000000000..69b5174cb4 --- /dev/null +++ b/stepmania/Themes/default/Scripts/Branches.lua @@ -0,0 +1,10 @@ +function SelectEvaluationScreen() + if IsNetConnected() then return "ScreenNetEvaluation" end + Mode = PlayModeName() + if( Mode == "Regular" ) then return "ScreenEvaluationStage" end + if( Mode == "Nonstop" ) then return "ScreenEvaluationNonstop" end + if( Mode == "Oni" ) then return "ScreenEvaluationOni" end + if( Mode == "Endless" ) then return "ScreenEvaluationEndless" end + if( Mode == "Rave" ) then return "ScreenEvaluationRave" end + if( Mode == "Battle" ) then return "ScreenEvaluationBattle" end +end