Added ScreenHeartEntry to default theme.

This commit is contained in:
Kyzentun
2014-09-12 15:07:46 -06:00
parent b20fe48bba
commit f87afa8a4b
8 changed files with 272 additions and 2 deletions
+22 -2
View File
@@ -182,8 +182,7 @@ Branch = {
GameplayScreen = function()
return IsRoutine() and "ScreenGameplayShared" or "ScreenGameplay"
end,
AfterGameplay = function()
-- pick an evaluation screen based on settings.
EvaluationScreen= function()
if IsNetSMOnline() then
return "ScreenNetEvaluation"
else
@@ -191,6 +190,27 @@ Branch = {
return "ScreenEvaluationNormal"
end
end,
AfterGameplay = function()
-- pick an evaluation screen based on settings.
if THEME:GetMetric("ScreenHeartEntry", "HeartEntryEnabled") then
local go_to_heart= false
for i, pn in ipairs(GAMESTATE:GetEnabledPlayers()) do
local profile= PROFILEMAN:GetProfile(pn)
if profile and profile:GetIgnoreStepCountCalories() then
go_to_heart= true
end
end
if go_to_heart then
return "ScreenHeartEntry"
end
return Branch.EvaluationScreen()
else
return Branch.EvaluationScreen()
end
end,
AfterHeartEntry= function()
return Branch.EvaluationScreen()
end,
AfterEvaluation = function()
if GAMESTATE:IsCourseMode() then
return "ScreenProfileSave"