Implement ScreenContinue

This commit is contained in:
Jonathan Payne
2014-08-30 20:17:15 -07:00
parent ab394950e0
commit 3d283a41bc
18 changed files with 190 additions and 48 deletions
@@ -24,18 +24,18 @@ t[#t+1] = Def.ActorFrame {
LoadFont("Common Normal") .. {
Text=ProductID();
InitCommand=cmd(y,-20;zoom,0.75);
OnCommand=cmd(diffuse,color("0,0,0,1");strokecolor,color("#f7941d"));
OnCommand=cmd(diffuse,color("0,0,0,1"));
};
LoadFont("Common Normal") .. {
Text=THEME:GetThemeDisplayName();
OnCommand=cmd(diffuse,color("0,0,0,1");strokecolor,color("#f7941d"));
OnCommand=cmd(diffuse,color("0,0,0,1"));
};
LoadFont("Common Normal") .. {
Text="Created by " .. THEME:GetThemeAuthor();
InitCommand=cmd(y,24;zoom,0.75);
OnCommand=cmd(diffuse,color("0,0,0,1");strokecolor,color("#f7941d"));
OnCommand=cmd(diffuse,color("0,0,0,1"));
};
};
};
return t
return t
+14 -3
View File
@@ -119,12 +119,12 @@ Branch = {
if GAMESTATE:IsEventMode() then
return SelectMusicOrCourse()
elseif STATSMAN:GetCurStageStats():AllFailed() then
return "ScreenGameOver"
return "ScreenContinue"
elseif GAMESTATE:GetSmallestNumStagesLeftForAnyHumanPlayer() == 0 then
if IsCourse() then
return "ScreenEvaluationSummary"
else
return "ScreenGameOver"
return "ScreenContinue"
end
else
return SelectMusicOrCourse()
@@ -215,8 +215,19 @@ Branch = {
return IsNetConnected() and "ScreenTitleMenu" or "ScreenTitleMenu"
end,
AfterSaveSummary = function()
return "ScreenGameOver"
return "ScreenContinue"
-- [[ Enable when Finished ]]
-- return GAMESTATE:AnyPlayerHasRankingFeats() and "ScreenNameEntryTraditional" or "ScreenGameOver"
end,
AfterContinue = function()
if GAMESTATE:GetNumPlayersEnabled() == 0 then
return "ScreenGameOver"
end
if STATSMAN:GetStagesPlayed() == 0 then
return "ScreenSelectPlayMode"
end
return "ScreenProfileLoad"
end
}
+12
View File
@@ -1843,6 +1843,7 @@ ChoiceOptions="screen,ScreenOptionsService;text,Options"
ChoiceEdit="text,Edit/Share;screen,"..Branch.OptionsEdit()
ChoiceExit="screen,ScreenExit;text,Exit"
# Aliases for the future.
ChoiceContinue="screen,ScreenContinue;text,Continue?"
ChoiceOnline="screen,ScreenNetworkOptions;text,Play Online"
ChoiceGameSelect="screen,ScreenSelectGame;text,Select Game"
ChoiceJukebox="screen,ScreenJukeboxMenu;text,Jukebox"
@@ -3654,6 +3655,17 @@ CodeBackspace="@Select-MenuLeft"
CodeJumpToEnter="@Select-Start"
CodeEnter="Start"
[ScreenContinue]
Class="ScreenContinue"
Fallback="ScreenWithMenuElements"
NextScreen=Branch.AfterContinue()
PrevScreen=Branch.AfterContinue()
PrepareScreens=""
HelpText="100"
TimerSeconds=15
ForceTimer=true
ForceTimerWait=true
[ScreenProfileSave]
Class="ScreenProfileSave"
Fallback="ScreenWithMenuElementsBlank"
@@ -0,0 +1,34 @@
local timer_seconds = THEME:GetMetric(Var "LoadingScreen","TimerSeconds");
local t = Def.ActorFrame {};
-- Fade
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(Center);
Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0;linear,0.5;diffusealpha,0.25;
sleep,timer_seconds/2;
linear,timer_seconds/2-0.5;diffusealpha,1);
};
-- Warning Fade
Def.Quad {
InitCommand=cmd(y,16;scaletoclipped,SCREEN_WIDTH,148);
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0.5;
linear,timer_seconds;zoomtoheight,148*0.75);
}
};
--
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(Center;y,SCREEN_CENTER_Y-24);
-- Underline
Def.Quad {
InitCommand=cmd(y,16;zoomto,256,1);
OnCommand=cmd(diffuse,color("#ffd400");shadowlength,1;shadowcolor,BoostColor(color("#ffd40077"),0.25);linear,0.25;zoomtowidth,256;fadeleft,0.25;faderight,0.25);
};
LoadFont("Common Bold") .. {
Text="Continue?";
OnCommand=cmd(skewx,-0.125;diffuse,color("#ffd400");shadowlength,2;shadowcolor,BoostColor(color("#ffd40077"),0.25));
};
};
--
return t
@@ -1,5 +1,8 @@
local function GraphDisplay( pn )
local t = Def.ActorFrame {
LoadActor( THEME:GetPathG("_GraphDisplay","overlay")) .. {
InitCommand=cmd(y,6);
};
Def.GraphDisplay {
InitCommand=cmd(Load,"GraphDisplay";);
BeginCommand=function(self)
@@ -253,4 +256,4 @@ t[#t+1] = Def.ActorFrame {
OnCommand=cmd(diffusealpha,0;zoom,0.85;bounceend,1;zoom,1;diffusealpha,1;sleep,0;glow,Color("White");decelerate,1;glow,Color("Invisible");smooth,0.35;zoom,0.25;y,SCREEN_BOTTOM-72);
};
};
return t
return t
@@ -58,11 +58,11 @@ end;
local t = Def.ActorFrame {};
GAMESTATE:IsPlayerEnabled(PLAYER_1)
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_1);x,WideScale(math.floor(SCREEN_CENTER_X*0.3)-8,math.floor(SCREEN_CENTER_X*0.5)-8);y,SCREEN_CENTER_Y-34);
InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_1);x,WideScale(math.floor(SCREEN_CENTER_X*0.3)-8,math.floor(SCREEN_CENTER_X*0.5)-8);y,SCREEN_CENTER_Y-20);
CreateStats( PLAYER_1 );
};
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_2);x,WideScale(math.floor(SCREEN_CENTER_X*1.7)+8,math.floor(SCREEN_CENTER_X*1.5)+8);y,SCREEN_CENTER_Y-34);
InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_2);x,WideScale(math.floor(SCREEN_CENTER_X*1.7)+8,math.floor(SCREEN_CENTER_X*1.5)+8);y,SCREEN_CENTER_Y-20);
CreateStats( PLAYER_2 );
};
return t
return t
@@ -1,10 +1,29 @@
local timer_seconds = THEME:GetMetric(Var "LoadingScreen","TimerSeconds");
return Def.ActorFrame {
InitCommand=cmd(Center),
-- Fade
Def.ActorFrame {
InitCommand=cmd();
Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT),
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0;linear,0.5;diffusealpha,0.25;
sleep,timer_seconds/2;
linear,timer_seconds/2-0.5;diffusealpha,0.8),
},
-- Warning Fade
Def.Quad {
InitCommand=cmd(y,-4;scaletoclipped,SCREEN_WIDTH,164),
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0.5;
linear,timer_seconds;zoomtoheight,164*0.75),
}
},
--
LoadActor(THEME:GetPathG("ScreenGameOver","gameover"))..{
InitCommand=cmd(y,-16;shadowlength,2)
},
LoadFont("Common Normal")..{
Text=ScreenString("Play again soon!"),
InitCommand=cmd(y,36;shadowlength,1)
InitCommand=cmd(y,36;shadowlength,2)
}
}
@@ -28,7 +28,7 @@ for i=1,NumColumns do
OnCommand=cmd(diffuse,CustomDifficultyToDarkColor(s);diffusealpha,0.5);
};
LoadActor(THEME:GetPathB("_frame","3x1"),"rounded gloss", 18) .. {
OnCommand=cmd(diffuse,CustomDifficultyToColor(s);diffusealpha,0.35);
OnCommand=cmd(diffuse,CustomDifficultyToColor(s);diffusealpha,0.125);
};
LoadFont("Common Normal") .. {
InitCommand=cmd(uppercase,true;settext,CustomDifficultyToLocalizedString(s));
@@ -39,9 +39,9 @@ end
t[#t+1] = LoadFont("Common Bold") .. {
InitCommand=cmd(settext,stString;x,SCREEN_CENTER_X-220;y,SCREEN_CENTER_Y-168);
OnCommand=cmd(zoom,0.675;skewx,-0.125;shadowlength,1);
OnCommand=cmd(skewx,-0.125;diffusebottomedge,color("0.75,0.75,0.75");shadowlength,2);
};
t.OnCommand=cmd(draworder,105);
return t;
return t;
@@ -170,7 +170,6 @@ if not GAMESTATE:IsCourseMode() then
local song = GAMESTATE:GetCurrentSong();
local cdtitle = self:GetChild("CDTitle");
local height = cdtitle:GetHeight();
local width = cdtitle:GetWidth();
if song then
if song:HasCDTitle() then
@@ -183,27 +182,15 @@ if not GAMESTATE:IsCourseMode() then
cdtitle:visible(false);
end;
if height >= 60 and width >= 80 then
if height*(80/60) >= width then
cdtitle:zoom(60/height);
else
cdtitle:zoom(80/width);
end;
elseif height >= 60 then
cdtitle:zoom(60/height);
elseif width >= 80 then
cdtitle:zoom(80/width);
else
cdtitle:zoom(1);
end;
self:zoom(scale(height,48,128,0.8,1.0))
end;
t[#t+1] = Def.ActorFrame {
OnCommand=cmd(draworder,105;x,SCREEN_CENTER_X-76;y,SCREEN_CENTER_Y-72;zoomy,0;sleep,0.5;decelerate,0.25;zoomy,1;SetUpdateFunction,CDTitleUpdate);
OnCommand=cmd(draworder,105;x,SCREEN_CENTER_X-256;y,SCREEN_CENTER_Y-84;zoom,0;sleep,0.5;decelerate,0.25;zoom,1;SetUpdateFunction,CDTitleUpdate);
OffCommand=cmd(bouncebegin,0.15;zoomx,0);
Def.Sprite {
Name="CDTitle";
InitCommand=cmd(y,19);
--OnCommand=cmd(draworder,106;shadowlength,1;zoom,0.75;diffusealpha,1;zoom,0;bounceend,0.35;zoom,0.75;spin;effectmagnitude,0,180,0);
OnCommand=cmd(draworder,106;shadowlength,1;zoom,0.75;diffusealpha,1;zoom,0;bounceend,0.35;zoom,0.75;spin;effectperiod,2;effectmagnitude,0,180,0);
BackCullCommand=cmd(diffuse,color("0.5,0.5,0.5,1"));
};
};
t[#t+1] = StandardDecorationFromFileOptional("NewSong","NewSong") .. {
@@ -276,11 +263,16 @@ t[#t+1] = StandardDecorationFromFileOptional("DifficultyDisplay","DifficultyDisp
t[#t+1] = StandardDecorationFromFileOptional("SortOrder","SortOrderText") .. {
BeginCommand=cmd(playcommand,"Set");
SortOrderChangedMessageCommand=cmd(playcommand,"Set";);
SortOrderChangedMessageCommand=cmd(playcommand,"Set");
SetCommand=function(self)
local s = SortOrderToLocalizedString( GAMESTATE:GetSortOrder() );
self:settext( s );
self:playcommand("Sort");
local s = GAMESTATE:GetSortOrder()
if s ~= nil then
local s = SortOrderToLocalizedString( s )
self:settext( s )
self:playcommand("Sort")
else
return
end
end;
};
@@ -0,0 +1 @@
_roboto Bold 80px
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@@ -0,0 +1,30 @@
[common]
Baseline=66
Top=28
LineSpacing=106
DrawExtraPixelsLeft=0
DrawExtraPixelsRight=0
AdvanceExtraPixels=0
[numbers]
Line 0=0123
Line 1=4567
Line 2=89%.
Line 3= :x,
0=46
1=46
2=46
3=46
4=46
5=46
6=46
7=46
8=46
9=46
10=59
11=23
12=20
13=23
14=41
15=21
@@ -1,3 +1,3 @@
return LoadFont("Combo Numbers") .. {
InitCommand=cmd(zoom,12/54;y,-1;shadowlengthx,0;shadowlengthy,1;strokecolor,color("#00000077"););
};
return LoadFont("Common Bold") .. {
InitCommand=cmd(zoom,12/54;y,-1;shadowlength,1;strokecolor,Color.Outline);
};
@@ -1,5 +1,11 @@
local t = Def.ActorFrame {};
local function Update(self)
local c = self:GetChildren();
local bps = GAMESTATE:GetSongBPS() or 1
c.TextureStripe:texcoordvelocity(bps,0);
end
local function IsVisible()
local r = Screen.String("HeaderText");
return string.len(r) > 0 and true or false
@@ -9,8 +15,9 @@ t[#t+1] = Def.Quad {
InitCommand=cmd(vertalign,top;zoomto,SCREEN_WIDTH+1,50;diffuse,color("#161616"));
}
t[#t+1] = LoadActor("_texture stripe") .. {
InitCommand=cmd(x,-SCREEN_CENTER_X;y,-2;horizalign,left;vertalign,top;zoomto,320,50;customtexturerect,0,0,(320/1.5)/8,50/32);
OnCommand=cmd(faderight,0.5;texcoordvelocity,1.5,0;skewx,-0.0375;diffuse,Color("White");diffusealpha,0.125);
Name="TextureStripe";
InitCommand=cmd(x,-SCREEN_CENTER_X-8;y,-2;horizalign,left;vertalign,top;zoomto,320,50;customtexturerect,0,0,(320/2)/8,50/32);
OnCommand=cmd(texcoordvelocity,2,0;skewx,-0.0575;diffuse,color("#594300");diffuserightedge,color("#59430000"));
};
t[#t+1] = LoadActor("Header") .. {
InitCommand=cmd(y,1;vertalign,top;zoomtowidth,SCREEN_WIDTH+1;diffuse,color("#ffd400"));
@@ -30,8 +37,12 @@ t[#t+1] = LoadFont("Common Bold") .. {
t[#t+1] = Def.Quad {
Name="Underline";
InitCommand=cmd(x,-SCREEN_CENTER_X+24;y,36;horizalign,left);
OnCommand=cmd(visible,IsVisible();diffuse,color("#ffd400");shadowlength,2;shadowcolor,BoostColor(color("#ffd40077"),0.25);linear,0.25;zoomtowidth,192;faderight,0.5);
OnCommand=cmd(visible,IsVisible();diffuse,color("#ffd400");shadowlength,1;linear,0.25;zoomtowidth,192;faderight,0.5);
};
t.BeginCommand=function(self)
self:SetUpdateFunction( Update );
end
return t
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+31 -5
View File
@@ -212,16 +212,25 @@ MiddleOnCommand=;diffuse,PlayerColor(PLAYER_2)
RightOnCommand=horizalign,left;diffuse,PlayerColor(PLAYER_2)
[MenuTimer]
Text1OnCommand=stopeffect;stoptweening;halign,1;shadowlength,0;strokecolor,Color("Outline")
Text1OnCommand=horizalign,right;stopeffect;finishtweening;shadowlength,2;strokecolor,Color("Outline");
Text1FormatFunction=function(fSeconds) fSeconds=math.floor(fSeconds); return string.format("%02.0f",fSeconds) end
Text2OnCommand=x,2;y,-3;stopeffect;stoptweening;halign,0;shadowlength,0;strokecolor,Color("Outline");zoom,0.65
Text2OnCommand=x,2;y,3;stopeffect;stoptweening;halign,0;shadowlength,0;strokecolor,Color("Outline");zoom,0.65
Text2FormatFunction=function(fSeconds) local remainder=fSeconds-math.floor(fSeconds); local digit=math.floor(remainder*100); return string.format("%02.0f",digit) end
Warning10Command=diffuseshift;effectperiod,1;effectcolor2,Color("Red");effectcolor1,color("0.5,0,0,1");
Warning10Command=diffuseshift;effectperiod,1;effectcolor1,Color.White;effectcolor2,Color.Red;
[MenuTimerNoSound]
[MenuTimerContinue]
Fallback="MenuTimer"
Text1OnCommand=strokecolor,Color.Outline;shadowlength,2
Text1FormatFunction=function(fSeconds) return string.format("%02.2f",fSeconds) end;
Text2OnCommand=visible,false
Text2FormatFunction=function(fSeconds) return "" end;
[MusicWheel]
SwitchSeconds=0.04
LockedInitialVelocity=7
@@ -597,7 +606,7 @@ AlternateHelpDisplayOnCommand=SetSecsBetweenSwitches,4;zoom,0.675;maxwidth,480/0
AlternateHelpDisplayOffCommand=linear,0.175;zoomy,0
TimerX=SCREEN_RIGHT-36-4
TimerY=SCREEN_TOP+24
TimerY=SCREEN_TOP+23
TimerOnCommand=draworder,2;visible,PREFSMAN:GetPreference("MenuTimer");
# TimerOnCommand=fov,90;vanishpoint,SCREEN_RIGHT-36-4,SCREEN_TOP+20;draworder,5;visible,PREFSMAN:GetPreference("MenuTimer");rotationy,90;decelerate,0.4;rotationy,0;
TimerOffCommand=
@@ -895,7 +904,7 @@ MusicWheelOnCommand=draworder,-5;fov,90;vanishpoint,SCREEN_CENTER_X+160,SCREEN_C
MusicWheelOffCommand=bouncebegin,0.15;zoomx,0;
#
ShowNewSong=not GAMESTATE:IsCourseMode()
NewSongX=SCREEN_CENTER_X-160+128-30
NewSongX=SCREEN_CENTER_X-160+128-24
NewSongY=SCREEN_TOP+160-2
NewSongOnCommand=finishtweening;diffuse,Color("Orange");diffusetopedge,Color("Yellow");strokecolor,Color("Black");zoom,0.675;draworder,106;playcommand,"Set"
NewSongOffCommand=bouncebegin,0.1;zoom,0;diffusealpha,0
@@ -906,6 +915,7 @@ ShowSongTime=true
SongTimeX=SCREEN_CENTER_X-160
SongTimeY=SCREEN_TOP+160+(36/2)+8
SongTimeOnCommand=zoom,0.75;strokecolor,Color("Outline");shadowlength,1
SongTimeOffCommand=bouncebegin,0.15;zoom,0;diffusealpha,0;
SongTimeResetCommand=diffuse,Color("White");
SongTimeAutogenCommand=diffuse,Color("Green");
@@ -1092,6 +1102,9 @@ ShowNumCourseSongs=true
UsePlayerSelectMenu=false
SelectMenuAvailable=false
#
ShowSortOrder=true
SortOrderOnCommand=visible,false
#
ShowPaneDisplayFrameP1=false
ShowPaneDisplayTextP1=false
ShowPaneDisplayFrameP2=false
@@ -2012,6 +2025,19 @@ SmallBanner6OffCommand=
[ScreenNameEntry]
[ScreenNameEntryTraditional]
[ScreenContinue]
ShowHeader=false
ShowFooter=false
#
TimerSeconds=20
TimerMetricsGroup="MenuTimerContinue"
TimerX=SCREEN_CENTER_X
TimerY=SCREEN_CENTER_Y+24
TimerOnCommand=visible,true
TimerOffCommand=
[ScreenProfileSave]
[ScreenProfileSaveSummary]
+4 -1
View File
@@ -6,4 +6,7 @@ FallbackTheme=default
[ScreenEdit]
EditModifiers="midi-note"
[MusicWheel]
[ScreenTitleMenu]
ChoiceNames="GameStart,Options,Continue,Edit,Jukebox,GameSelect,Exit"
[MusicWheel]