DONE! All lua is future-proofed.

This commit is contained in:
Jason Felds
2013-07-05 22:17:42 -04:00
parent 0259af5c80
commit afd0dac0c1
44 changed files with 3017 additions and 1495 deletions
@@ -1,238 +1,271 @@
local maxSegments = 150
local function CreateSegments(Player)
local t = Def.ActorFrame { };
local bars = Def.ActorFrame{ Name="CoverBars" };
local bpmFrame = Def.ActorFrame{ Name="BPMFrame"; };
local stopFrame = Def.ActorFrame{ Name="StopFrame"; };
local delayFrame = Def.ActorFrame{ Name="DelayFrame"; };
local warpFrame = Def.ActorFrame{ Name="WarpFrame"; };
local fakeFrame = Def.ActorFrame{ Name="FakeFrame"; };
local scrollFrame = Def.ActorFrame{ Name="ScrollFrame"; };
local speedFrame = Def.ActorFrame{ Name="SpeedFrame"; };
local fFrameWidth = 380;
local fFrameHeight = 8;
-- XXX: doesn't work in course mode -aj
if not GAMESTATE:IsSideJoined( Player ) then
return t
elseif not GAMESTATE:IsCourseMode() then
-- Straight rip off NCRX
local song = GAMESTATE:GetCurrentSong();
local steps = GAMESTATE:GetCurrentSteps( Player );
if steps then
local timingData = steps:GetTimingData();
-- use the StepsSeconds, which will almost always be more proper
-- than a file with ITG2r21 compatibility.
if song then
local songLen = song:MusicLengthSeconds();
local firstBeatSecs = song:GetFirstSecond();
local lastBeatSecs = song:GetLastSecond();
local bpms = timingData:GetBPMsAndTimes();
local stops = timingData:GetStops();
local delays = timingData:GetDelays();
local warps = timingData:GetWarps();
local fakes = timingData:GetFakes();
local scrolls = timingData:GetScrolls();
local speeds = timingData:GetSpeeds();
-- we don't want too many segments to be shown.
local sumSegments = #bpms + #stops + #delays + #warps + #fakes + #scrolls + #speeds
if sumSegments > maxSegments then
return Def.ActorFrame{}
end
local function CreateLine(beat, secs, firstShadow, firstDiffuse, secondShadow, firstEffect, secondEffect)
local beatTime = timingData:GetElapsedTimeFromBeat(beat);
if beatTime < 0 then beatTime = 0; end;
return Def.ActorFrame {
Def.Quad {
InitCommand=function(self)
self:shadowlength(0);
self:shadowcolor(color(firstShadow));
-- set width
self:zoomto(math.max((secs/songLen)*fFrameWidth, 1), fFrameHeight);
-- find location
self:x((scale(beatTime,firstBeatSecs,lastBeatSecs,-fFrameWidth/2,fFrameWidth/2)));
end;
OnCommand=function(self)
self:diffuse(color(firstDiffuse));
end;
};
--[[ there's a cool effect that can't happen because we don't fade out like we did before
Def.Quad {
InitCommand=function(self)
--self:diffuse(HSVA(192,1,0.8,0.8));
self:shadowlength(0);
self:shadowcolor(color(secondShadow));
-- set width
self:zoomto(math.max((secs/songLen)*fFrameWidth, 1),fFrameHeight);
-- find location
self:x((scale(beatTime,firstBeatSecs,lastBeatSecs,-fFrameWidth/2,fFrameWidth/2)));
end;
OnCommand=function(self)
self:diffusealpha(1);
self:diffuseshift();
self:effectcolor1(color(firstEffect));
self:effectcolor2(color(secondEffect));
self:effectclock('beat');
self:effectperiod(1/8);
--
self:diffusealpha(0);
self:sleep(beatTime+1);
self:diffusealpha(1);
self:linear(4);
self:diffusealpha(0);
end;
};]]
};
end;
for i=2,#bpms do
local data = split("=",bpms[i]);
bpmFrame[#bpmFrame+1] = CreateLine(data[1], 0,
"#00808077", "#00808077", "#00808077", "#FF634777", "#FF000077");
end;
for i=1,#delays do
local data = split("=",delays[i]);
delayFrame[#delayFrame+1] = CreateLine(data[1], data[2],
"#FFFF0077", "#FFFF0077", "#FFFF0077", "#00FF0077", "#FF000077");
end;
for i=1,#stops do
local data = split("=",stops[i]);
stopFrame[#stopFrame+1] = CreateLine(data[1], data[2],
"#FFFFFF77", "#FFFFFF77", "#FFFFFF77", "#FFA50077", "#FF000077");
end;
for i=1,#scrolls do
local data = split("=",scrolls[i]);
scrollFrame[#scrollFrame+1] = CreateLine(data[1], 0,
"#4169E177", "#4169E177", "#4169E177", "#0000FF77", "#FF000077");
end;
for i=1,#speeds do
local data = split("=",speeds[i]);
-- TODO: Turn beats into seconds for this calculation?
speedFrame[#speedFrame+1] = CreateLine(data[1], 0,
"#ADFF2F77", "#ADFF2F77", "#ADFF2F77", "#7CFC0077", "#FF000077");
end;
for i=1,#warps do
local data = split("=",warps[i]);
warpFrame[#warpFrame+1] = CreateLine(data[1], 0,
"#CC00CC77", "#CC00CC77", "#CC00CC77", "#FF33CC77", "#FF000077");
end;
for i=1,#fakes do
local data = split("=",fakes[i]);
fakeFrame[#fakeFrame+1] = CreateLine(data[1], 0,
"#BC8F8F77", "#BC8F8F77", "#BC8F8F77", "#F4A46077", "#FF000077");
end;
end;
bars[#bars+1] = bpmFrame;
bars[#bars+1] = scrollFrame;
bars[#bars+1] = speedFrame;
bars[#bars+1] = stopFrame;
bars[#bars+1] = delayFrame;
bars[#bars+1] = warpFrame;
bars[#bars+1] = fakeFrame;
t[#t+1] = bars;
--addition here: increase performance a ton by only rendering once
t[#t+1] = Def.ActorFrameTexture{Name="Target"}
t[#t+1] = Def.Sprite{Name="Actual"}
local FirstPass=true;
local function Draw(self)
kids=self:GetChildren();
if FirstPass then
kids.Target:setsize(fFrameWidth,fFrameHeight);
kids.Target:EnableAlphaBuffer(true);
kids.Target:Create();
kids.Target:GetTexture():BeginRenderingTo();
for k,v in pairs(kids) do
if k~="Target" and k~="Actual" then
v:Draw();
end
end
kids.Target:GetTexture():FinishRenderingTo();
kids.Actual:SetTexture(kids.Target:GetTexture());
FirstPass=false;
end
kids.Actual:Draw();
end
t.InitCommand=function(self) self:SetDrawFunction(Draw); end
end
end
return t
end
local t = LoadFallbackB()
t[#t+1] = StandardDecorationFromFileOptional("ScoreFrame","ScoreFrame");
local function songMeterScale(val) return scale(val,0,1,-380/2,380/2) end
for pn in ivalues(PlayerNumber) do
local MetricsName = "SongMeterDisplay" .. PlayerNumberToString(pn);
local songMeterDisplay = Def.ActorFrame{
InitCommand=function(self)
self:player(pn);
self:name(MetricsName);
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end;
Def.Quad {
InitCommand=cmd(zoomto,420,20);
OnCommand=cmd(fadeleft,0.35;faderight,0.35;diffuse,Color.Black;diffusealpha,0.5);
};
LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'frame ' .. PlayerNumberToString(pn) ) ) .. {
InitCommand=function(self)
self:name('Frame');
ActorUtil.LoadAllCommandsAndSetXY(self,MetricsName);
end;
};
Def.Quad {
InitCommand=cmd(zoomto,2,8);
OnCommand=cmd(x,songMeterScale(0.25);diffuse,PlayerColor(pn);diffusealpha,0.5);
};
Def.Quad {
InitCommand=cmd(zoomto,2,8);
OnCommand=cmd(x,songMeterScale(0.5);diffuse,PlayerColor(pn);diffusealpha,0.5);
};
Def.Quad {
InitCommand=cmd(zoomto,2,8);
OnCommand=cmd(x,songMeterScale(0.75);diffuse,PlayerColor(pn);diffusealpha,0.5);
};
Def.SongMeterDisplay {
StreamWidth=THEME:GetMetric( MetricsName, 'StreamWidth' );
Stream=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'stream ' .. PlayerNumberToString(pn) ) )..{
InitCommand=cmd(diffuse,PlayerColor(pn);diffusealpha,0.5;blend,Blend.Add;);
};
Tip=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'tip ' .. PlayerNumberToString(pn) ) ) .. { InitCommand=cmd(visible,false); };
};
};
if ThemePrefs.Get("TimingDisplay") == true then
songMeterDisplay[#songMeterDisplay+1] = CreateSegments(pn);
end
t[#t+1] = songMeterDisplay
end;
for pn in ivalues(PlayerNumber) do
local MetricsName = "ToastyDisplay" .. PlayerNumberToString(pn);
t[#t+1] = LoadActor( THEME:GetPathG("Player", 'toasty'), pn ) .. {
InitCommand=function(self)
self:player(pn);
self:name(MetricsName);
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end;
};
end;
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
t[#t+1] = StandardDecorationFromFileOptional("SongTitle","SongTitle");
return t
local maxSegments = 150
local function CreateSegments(Player)
local t = Def.ActorFrame { };
local bars = Def.ActorFrame{ Name="CoverBars" };
local bpmFrame = Def.ActorFrame{ Name="BPMFrame"; };
local stopFrame = Def.ActorFrame{ Name="StopFrame"; };
local delayFrame = Def.ActorFrame{ Name="DelayFrame"; };
local warpFrame = Def.ActorFrame{ Name="WarpFrame"; };
local fakeFrame = Def.ActorFrame{ Name="FakeFrame"; };
local scrollFrame = Def.ActorFrame{ Name="ScrollFrame"; };
local speedFrame = Def.ActorFrame{ Name="SpeedFrame"; };
local fFrameWidth = 380;
local fFrameHeight = 8;
-- XXX: doesn't work in course mode -aj
if not GAMESTATE:IsSideJoined( Player ) then
return t
elseif not GAMESTATE:IsCourseMode() then
-- Straight rip off NCRX
local song = GAMESTATE:GetCurrentSong();
local steps = GAMESTATE:GetCurrentSteps( Player );
if steps then
local timingData = steps:GetTimingData();
-- use the StepsSeconds, which will almost always be more proper
-- than a file with ITG2r21 compatibility.
if song then
local songLen = song:MusicLengthSeconds();
local firstBeatSecs = song:GetFirstSecond();
local lastBeatSecs = song:GetLastSecond();
local bpms = timingData:GetBPMsAndTimes();
local stops = timingData:GetStops();
local delays = timingData:GetDelays();
local warps = timingData:GetWarps();
local fakes = timingData:GetFakes();
local scrolls = timingData:GetScrolls();
local speeds = timingData:GetSpeeds();
-- we don't want too many segments to be shown.
local sumSegments = #bpms + #stops + #delays + #warps + #fakes + #scrolls + #speeds
if sumSegments > maxSegments then
return Def.ActorFrame{}
end
local function CreateLine(beat, secs, firstShadow, firstDiffuse, secondShadow, firstEffect, secondEffect)
local beatTime = timingData:GetElapsedTimeFromBeat(beat);
if beatTime < 0 then beatTime = 0; end;
return Def.ActorFrame {
Def.Quad {
InitCommand=function(self)
self:shadowlength(0);
self:shadowcolor(color(firstShadow));
-- set width
self:zoomto(math.max((secs/songLen)*fFrameWidth, 1), fFrameHeight);
-- find location
self:x((scale(beatTime,firstBeatSecs,lastBeatSecs,-fFrameWidth/2,fFrameWidth/2)));
end;
OnCommand=function(self)
self:diffuse(color(firstDiffuse));
end;
};
--[[ there's a cool effect that can't happen because we don't fade out like we did before
Def.Quad {
InitCommand=function(self)
--self:diffuse(HSVA(192,1,0.8,0.8));
self:shadowlength(0);
self:shadowcolor(color(secondShadow));
-- set width
self:zoomto(math.max((secs/songLen)*fFrameWidth, 1),fFrameHeight);
-- find location
self:x((scale(beatTime,firstBeatSecs,lastBeatSecs,-fFrameWidth/2,fFrameWidth/2)));
end;
OnCommand=function(self)
self:diffusealpha(1);
self:diffuseshift();
self:effectcolor1(color(firstEffect));
self:effectcolor2(color(secondEffect));
self:effectclock('beat');
self:effectperiod(1/8);
--
self:diffusealpha(0);
self:sleep(beatTime+1);
self:diffusealpha(1);
self:linear(4);
self:diffusealpha(0);
end;
};]]
};
end;
for i=2,#bpms do
local data = split("=",bpms[i]);
bpmFrame[#bpmFrame+1] = CreateLine(data[1], 0,
"#00808077", "#00808077", "#00808077", "#FF634777", "#FF000077");
end;
for i=1,#delays do
local data = split("=",delays[i]);
delayFrame[#delayFrame+1] = CreateLine(data[1], data[2],
"#FFFF0077", "#FFFF0077", "#FFFF0077", "#00FF0077", "#FF000077");
end;
for i=1,#stops do
local data = split("=",stops[i]);
stopFrame[#stopFrame+1] = CreateLine(data[1], data[2],
"#FFFFFF77", "#FFFFFF77", "#FFFFFF77", "#FFA50077", "#FF000077");
end;
for i=1,#scrolls do
local data = split("=",scrolls[i]);
scrollFrame[#scrollFrame+1] = CreateLine(data[1], 0,
"#4169E177", "#4169E177", "#4169E177", "#0000FF77", "#FF000077");
end;
for i=1,#speeds do
local data = split("=",speeds[i]);
-- TODO: Turn beats into seconds for this calculation?
speedFrame[#speedFrame+1] = CreateLine(data[1], 0,
"#ADFF2F77", "#ADFF2F77", "#ADFF2F77", "#7CFC0077", "#FF000077");
end;
for i=1,#warps do
local data = split("=",warps[i]);
warpFrame[#warpFrame+1] = CreateLine(data[1], 0,
"#CC00CC77", "#CC00CC77", "#CC00CC77", "#FF33CC77", "#FF000077");
end;
for i=1,#fakes do
local data = split("=",fakes[i]);
fakeFrame[#fakeFrame+1] = CreateLine(data[1], 0,
"#BC8F8F77", "#BC8F8F77", "#BC8F8F77", "#F4A46077", "#FF000077");
end;
end;
bars[#bars+1] = bpmFrame;
bars[#bars+1] = scrollFrame;
bars[#bars+1] = speedFrame;
bars[#bars+1] = stopFrame;
bars[#bars+1] = delayFrame;
bars[#bars+1] = warpFrame;
bars[#bars+1] = fakeFrame;
t[#t+1] = bars;
--addition here: increase performance a ton by only rendering once
t[#t+1] = Def.ActorFrameTexture{Name="Target"}
t[#t+1] = Def.Sprite{Name="Actual"}
local FirstPass=true;
local function Draw(self)
kids=self:GetChildren();
if FirstPass then
kids.Target:setsize(fFrameWidth,fFrameHeight);
kids.Target:EnableAlphaBuffer(true);
kids.Target:Create();
kids.Target:GetTexture():BeginRenderingTo();
for k,v in pairs(kids) do
if k~="Target" and k~="Actual" then
v:Draw();
end
end
kids.Target:GetTexture():FinishRenderingTo();
kids.Actual:SetTexture(kids.Target:GetTexture());
FirstPass=false;
end
kids.Actual:Draw();
end
t.InitCommand=function(self) self:SetDrawFunction(Draw); end
end
end
return t
end
local t = LoadFallbackB()
t[#t+1] = StandardDecorationFromFileOptional("ScoreFrame","ScoreFrame");
local function songMeterScale(val) return scale(val,0,1,-380/2,380/2) end
for pn in ivalues(PlayerNumber) do
local MetricsName = "SongMeterDisplay" .. PlayerNumberToString(pn);
local songMeterDisplay = Def.ActorFrame{
InitCommand=function(self)
self:player(pn);
self:name(MetricsName);
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end;
Def.Quad {
InitCommand=function(self)
self:zoomto(420, 20);
end;
OnCommand=function(self)
self:fadeleft(0.35);
self:faderight(0.35);
self:diffuse(Color.Black);
self:diffusealpha(0.5);
end;
};
LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'frame ' .. PlayerNumberToString(pn) ) ) .. {
InitCommand=function(self)
self:name('Frame');
ActorUtil.LoadAllCommandsAndSetXY(self,MetricsName);
end;
};
Def.Quad {
InitCommand=function(self)
self:zoomto(2,8);
end;
OnCommand=function(self)
self:x(songMeterScale(0.25));
self:diffuse(PlayerColor(pn));
self:diffusealpha(0.5);
end;
};
Def.Quad {
InitCommand=function(self)
self:zoomto(2,8);
end;
OnCommand=function(self)
self:x(songMeterScale(0.5));
self:diffuse(PlayerColor(pn));
self:diffusealpha(0.5);
end;
};
Def.Quad {
InitCommand=function(self)
self:zoomto(2,8);
end;
OnCommand=function(self)
self:x(songMeterScale(0.75));
self:diffuse(PlayerColor(pn));
self:diffusealpha(0.5);
end;
};
Def.SongMeterDisplay {
StreamWidth=THEME:GetMetric( MetricsName, 'StreamWidth' );
Stream=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'stream ' .. PlayerNumberToString(pn) ) )..{
InitCommand=function(self)
self:diffuse(PlayerColor(pn));
self:diffusealpha(0.5);
self:blend(Blend.Add);
end;
};
Tip=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'tip ' .. PlayerNumberToString(pn) ) ) .. {
InitCommand=function(self)
self:visible(false);
end;
};
};
};
if ThemePrefs.Get("TimingDisplay") == true then
songMeterDisplay[#songMeterDisplay+1] = CreateSegments(pn);
end
t[#t+1] = songMeterDisplay
end;
for pn in ivalues(PlayerNumber) do
local MetricsName = "ToastyDisplay" .. PlayerNumberToString(pn);
t[#t+1] = LoadActor( THEME:GetPathG("Player", 'toasty'), pn ) .. {
InitCommand=function(self)
self:player(pn);
self:name(MetricsName);
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end;
};
end;
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
t[#t+1] = StandardDecorationFromFileOptional("SongTitle","SongTitle");
return t
@@ -1,31 +1,76 @@
local longFail = ThemePrefs.Get("LongFail");
local t = Def.ActorFrame{};
if longFail then
t[#t+1] = Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("1,0,0,0");blend,Blend.Multiply);
OnCommand=cmd(decelerate,1.25;diffuse,color("0.75,0,0,0.75");linear,7;diffuse,color("0,0,0,1");sleep,1.25;linear,1;diffuse,color("1,0,0,1");decelerate,2;diffuse,color("0,0,0,1"));
};
t[#t+1] = Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("1,1,1,1");diffusealpha,0);
OnCommand=cmd(finishtweening;diffusealpha,1;decelerate,1.25;diffuse,color("1,0,0,0"));
};
t[#t+1] = LoadActor(THEME:GetPathS( "ScreenGameplayAlternate", "failed" ) ) .. {
StartTransitioningCommand=cmd(play);
};
else
t[#t+1] = Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("1,0,0,0");blend,Blend.Multiply);
OnCommand=cmd(smooth,1;diffuse,color("0.75,0,0,0.75");decelerate,2;diffuse,color("0,0,0,1"));
};
t[#t+1] = Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("1,1,1,1");diffusealpha,0);
OnCommand=cmd(finishtweening;diffusealpha,1;decelerate,1.25;diffuse,color("1,0,0,0"));
};
t[#t+1] = LoadActor(THEME:GetPathS( Var "LoadingScreen", "failed" ) ) .. {
StartTransitioningCommand=cmd(play);
};
end;
local longFail = ThemePrefs.Get("LongFail");
local t = Def.ActorFrame{};
if longFail then
t[#t+1] = Def.Quad{
InitCommand=function(self)
self:FullScreen();
self:diffuse(color("1,0,0,0"));
self:blend(Blend.Multiply);
end;
OnCommand=function(self)
self:decelerate(1.25);
self:diffuse(color("0.75,0,0,0.75"));
self:linear(7);
self:diffuse(color("0,0,0,1"));
self:sleep(1.25);
self:linear(1);
self:diffuse(color("1,0,0,1"));
self:decelerate(2);
self:diffuse(color("0,0,0,1"));
end;
};
t[#t+1] = Def.Quad{
InitCommand=function(self)
self:FullScreen();
self:diffuse(color("1,1,1,1"));
self:diffusealpha(0);
end;
OnCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:decelerate(1.25);
self:diffuse(color("1,0,0,0"));
end;
};
t[#t+1] = LoadActor(THEME:GetPathS( "ScreenGameplayAlternate", "failed" ) ) .. {
StartTransitioningCommand=function(self)
self:play();
end;
};
else
t[#t+1] = Def.Quad{
InitCommand=function(self)
self:FullScreen();
self:diffuse(color("1,0,0,0"));
self:blend(Blend.Multiply);
end;
OnCommand=function(self)
self:smooth(1);
self:diffuse(color("0.75,0,0,0.75"));
self:decelerate(2);
self:diffuse(color("0,0,0,1"));
end;
};
t[#t+1] = Def.Quad{
InitCommand=function(self)
self:FullScreen();
self:diffuse(color("1,1,1,1"));
self:diffusealpha(0);
end;
OnCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:decelerate(1.25);
self:diffuse(color("1,0,0,0"));
end;
};
t[#t+1] = LoadActor(THEME:GetPathS( Var "LoadingScreen", "failed" ) ) .. {
StartTransitioningCommand=function(self)
self:play();
end;
};
end;
return t;
@@ -1,39 +1,82 @@
local t = Def.ActorFrame{};
if not GAMESTATE:IsCourseMode() then return t; end;
t[#t+1] = Def.Sprite {
InitCommand=cmd(Center);
BeforeLoadingNextCourseSongMessageCommand=function(self) self:LoadFromSongBackground( SCREENMAN:GetTopScreen():GetNextCourseSong() ) end;
ChangeCourseSongInMessageCommand=cmd(scale_or_crop_background);
StartCommand=cmd(diffusealpha,0;decelerate,0.5;diffusealpha,1;);
FinishCommand=cmd(linear,0.1;glow,Color.Alpha(Color("White"),0.5);decelerate,0.4;glow,Color("Invisible");diffusealpha,0);
};
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(Center);
OnCommand=cmd(stoptweening;addx,30;linear,3;addx,-30);
LoadFont("Common Normal") .. {
InitCommand=cmd(strokecolor,Color("Outline");y,-10);
BeforeLoadingNextCourseSongMessageCommand=function(self)
local NextSong = SCREENMAN:GetTopScreen():GetNextCourseSong();
self:settext( NextSong:GetDisplayFullTitle() );
end;
StartCommand=cmd(faderight,1;diffusealpha,0;linear,0.5;faderight,0;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
};
--[[ LoadFont("Common Normal") .. {
Text=GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse():GetCourseType() or GAMESTATE:GetCurrentSong():GetDisplayArtist();
InitCommand=cmd(strokecolor,Color("Outline");zoom,0.75);
OnCommand=cmd(faderight,1;diffusealpha,0;linear,0.5;faderight,0;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
}; --]]
LoadFont("Common Normal") .. {
InitCommand=cmd(strokecolor,Color("Outline");diffuse,Color("Orange");diffusebottomedge,Color("Yellow");zoom,0.75;y,10);
BeforeLoadingNextCourseSongMessageCommand=function(self)
local NextSong = SCREENMAN:GetTopScreen():GetNextCourseSong();
self:settext( SecondsToMSSMsMs( NextSong:MusicLengthSeconds() ) );
end;
StartCommand=cmd(faderight,1;diffusealpha,0;linear,0.5;faderight,0;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
};
};
local t = Def.ActorFrame{};
if not GAMESTATE:IsCourseMode() then return t; end;
t[#t+1] = Def.Sprite {
InitCommand=function(self)
self:Center();
end;
BeforeLoadingNextCourseSongMessageCommand=function(self) self:LoadFromSongBackground( SCREENMAN:GetTopScreen():GetNextCourseSong() ) end;
ChangeCourseSongInMessageCommand=function(self)
self:scale_or_crop_background();
end;
StartCommand=function(self)
self:diffusealpha(0);
self:decelerate(0.5);
self:diffusealpha(1);
end;
FinishCommand=function(self)
self:linear(0.1);
self:glow(Color.Alpha(Color("White"),0.5));
self:decelerate(0.4);
self:glow(Color("Invisible"));
self:diffusealpha(0);
end;
};
t[#t+1] = Def.ActorFrame {
InitCommand=function(self)
self:Center();
end;
OnCommand=function(self)
self:stoptweening();
self:addx(30);
self:linear(3);
self:addx(-30);
end;
LoadFont("Common Normal") .. {
InitCommand=function(self)
self:strokecolor(Color("Outline"));
self:y(-10);
end;
BeforeLoadingNextCourseSongMessageCommand=function(self)
local NextSong = SCREENMAN:GetTopScreen():GetNextCourseSong();
self:settext( NextSong:GetDisplayFullTitle() );
end;
StartCommand=function(self)
self:faderight(1);
self:diffusealpha(0);
self:linear(0.5);
self:faderight(0);
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.5);
self:diffusealpha(0);
end;
};
LoadFont("Common Normal") .. {
InitCommand=function(self)
self:strokecolor(Color("Outline"));
self:diffuse(Color("Orange"));
self:diffusebottomedge(Color("Yellow"));
self:zoom(0.75);
self:y(10);
end;
BeforeLoadingNextCourseSongMessageCommand=function(self)
local NextSong = SCREENMAN:GetTopScreen():GetNextCourseSong();
self:settext( SecondsToMSSMsMs( NextSong:MusicLengthSeconds() ) );
end;
StartCommand=function(self)
self:faderight(1);
self:diffusealpha(0);
self:linear(0.5);
self:faderight(0);
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.5);
self:diffusealpha(0);
end;
};
};
return t;
@@ -6,7 +6,10 @@ local bg = Def.ActorFrame{
self:FullScreen();
self:diffuse(color("0,0,0,0"));
end;
OnCommand=cmd(linear,5;diffusealpha,1);
OnCommand=function(self)
self:linear(5);
self:diffusealpha(1);
end;
};
Def.ActorFrame{
@@ -34,18 +37,54 @@ local bg = Def.ActorFrame{
LoadActor(THEME:GetPathG("_rave result","P1"))..{
Name="P1Win";
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
InitCommand=function(self)
self:Center();
self:cropbottom(1);
self:fadebottom(1);
end;
OnCommand=function(self)
self:sleep(2);
self:linear(0.5);
self:cropbottom(0);
self:fadebottom(0);
self:sleep(1.75);
self:linear(0.25);
self:diffusealpha(0);
end;
};
LoadActor(THEME:GetPathG("_rave result","P2"))..{
Name="P2Win";
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
InitCommand=function(self)
self:Center();
self:cropbottom(1);
self:fadebottom(1);
end;
OnCommand=function(self)
self:sleep(2);
self:linear(0.5);
self:cropbottom(0);
self:fadebottom(0);
self:sleep(1.75);
self:linear(0.25);
self:diffusealpha(0);
end;
};
LoadActor(THEME:GetPathG("_rave result","draw"))..{
Name="Draw";
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
InitCommand=function(self)
self:Center();
self:cropbottom(1);
self:fadebottom(1);
end;
OnCommand=function(self)
self:sleep(2);
self:linear(0.5);
self:cropbottom(0);
self:fadebottom(0);
self:sleep(1.75);
self:linear(0.25);
self:diffusealpha(0);
end;
};
};
};
@@ -1,75 +1,292 @@
return Def.ActorFrame {
Def.ActorFrame {
OnCommand=cmd(x,SCREEN_CENTER_X-20);
-- Initial glow around receptors
LoadActor("tapglow") .. {
OnCommand=cmd(x,85;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
LoadActor("tapglow") .. {
OnCommand=cmd(x,275;y,95;zoom,0.7;rotationz,270;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
LoadActor("tapglow") .. {
OnCommand=cmd(x,212;y,95;zoom,0.7;rotationz,180;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
LoadActor("tapglow") .. {
OnCommand=cmd(x,148;y,95;zoom,0.7;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
LoadActor("tapglow") .. {
OnCommand=cmd(x,148;y,95;zoom,0.7;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,9.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
-- 2nd step UP
LoadActor("tapglow") .. {
OnCommand=cmd(x,212;y,95;zoom,0.7;rotationz,180;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,12.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
-- 3rd step UP
LoadActor("tapglow") .. {
OnCommand=cmd(x,84;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,15.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
-- 4th step jump
LoadActor("tapglow") .. {
OnCommand=cmd(x,85;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,18.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
LoadActor("tapglow") .. {
OnCommand=cmd(x,275;y,95;zoom,0.7;rotationz,270;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,18.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
-- miss step
LoadActor("healthhilight") .. {
OnCommand=cmd(x,180;y,40;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,22.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
};
-- messages
LoadFont("Common Normal") .. {
Text=ScreenString("How To Play StepMania"),
InitCommand=cmd(zbuffer,1;z,20;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;shadowlength,1;strokecolor,Color("Outline"));
OnCommand=cmd(diffusealpha,0;zoom,4;sleep,0.0;linear,0.3;diffusealpha,1;zoom,1;sleep,1.8;linear,0.3;zoom,0.75;x,170;y,60);
};
LoadActor("feet") .. {
OnCommand=cmd(z,20;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;addx,-SCREEN_WIDTH;sleep,2.4;decelerate,0.3;addx,SCREEN_WIDTH;sleep,2;linear,0.3;zoomy,0);
};
LoadActor("_message tap")..{
OnCommand=cmd(sleep,6;queuecommand,"Show");
};
LoadActor("_message tap")..{
OnCommand=cmd(sleep,9.7;queuecommand,"Show");
};
LoadActor("_message tap")..{
OnCommand=cmd(sleep,12.7;queuecommand,"Show");
};
LoadActor("_message tap")..{
OnCommand=cmd(sleep,15.7;queuecommand,"Show");
};
LoadActor("_message jump")..{
OnCommand=cmd(sleep,18.7;queuecommand,"Show");
};
LoadActor("_message miss")..{
OnCommand=cmd(sleep,22.7;queuecommand,"Show");
};
};
return Def.ActorFrame {
Def.ActorFrame {
OnCommand=function(self)
self:x(SCREEN_CENTER_X-20);
end;
-- Initial glow around receptors
LoadActor("tapglow") .. {
OnCommand=function(self)
self:x(85);
self:y(95);
self:zoom(0.7);
self:rotationz(90);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(6);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
};
LoadActor("tapglow") .. {
OnCommand=function(self)
self:x(275);
self:y(95);
self:zoom(0.7);
self:rotationz(270);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(6);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
};
LoadActor("tapglow") .. {
OnCommand=function(self)
self:x(212);
self:y(95);
self:zoom(0.7);
self:rotationz(180);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(6);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
};
LoadActor("tapglow") .. {
OnCommand=function(self)
self:x(148);
self:y(95);
self:zoom(0.7);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(6);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
};
LoadActor("tapglow") .. {
OnCommand=function(self)
self:x(148);
self:y(95);
self:zoom(0.7);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(9.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
};
-- 2nd step UP
LoadActor("tapglow") .. {
OnCommand=function(self)
self:x(212);
self:y(95);
self:zoom(0.7);
self:rotationz(180);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(12.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
};
-- 3rd step UP
LoadActor("tapglow") .. {
OnCommand=function(self)
self:x(84);
self:y(95);
self:zoom(0.7);
self:rotationz(90);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(15.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
};
-- 4th step jump
LoadActor("tapglow") .. {
OnCommand=function(self)
self:x(85);
self:y(95);
self:zoom(0.7);
self:rotationz(90);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(18.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
};
LoadActor("tapglow") .. {
OnCommand=function(self)
self:x(275);
self:y(95);
self:zoom(0.7);
self:rotationz(270);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(18.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
};
-- miss step
LoadActor("healthhilight") .. {
OnCommand=function(self)
self:x(180);
self:y(40);
self:zoom(0.7);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(22.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
};
};
-- messages
LoadFont("Common Normal") .. {
Text=ScreenString("How To Play StepMania"),
InitCommand=function(self)
self:zbuffer(1);
self:z(20);
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
self:shadowlength(1);
self:strokecolor(Color("Outline"));
end;
OnCommand=function(self)
self:diffusealpha(0);
self:zoom(4);
self:sleep(0.0);
self:linear(0.3);
self:diffusealpha(1);
self:zoom(1);
self:sleep(1.8);
self:linear(0.3);
self:zoom(0.75);
self:x(170);
self:y(60);
end;
};
LoadActor("feet") .. {
OnCommand=function(self)
self:z(20);
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
self:addx(-SCREEN_WIDTH);
self:sleep(2.4);
self:decelerate(0.3);
self:addx(SCREEN_WIDTH);
self:sleep(2);
self:linear(0.3);
self:zoomy(0);
end;
};
LoadActor("_message tap")..{
OnCommand=function(self)
self:sleep(6);
self:queuecommand("Show");
end;
};
LoadActor("_message tap")..{
OnCommand=function(self)
self:sleep(9.7);
self:queuecommand("Show");
end;
};
LoadActor("_message tap")..{
OnCommand=function(self)
self:sleep(12.7);
self:queuecommand("Show");
end;
};
LoadActor("_message tap")..{
OnCommand=function(self)
self:sleep(15.7);
self:queuecommand("Show");
end;
};
LoadActor("_message jump")..{
OnCommand=function(self)
self:sleep(18.7);
self:queuecommand("Show");
end;
};
LoadActor("_message miss")..{
OnCommand=function(self)
self:sleep(22.7);
self:queuecommand("Show");
end;
};
};
@@ -1,33 +1,41 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(Center);
Def.Sprite {
Condition=not GAMESTATE:IsCourseMode();
OnCommand=function(self)
if GAMESTATE:GetCurrentSong() then
local song = GAMESTATE:GetCurrentSong();
if song:HasBackground() then
self:LoadBackground(song:GetBackgroundPath());
end;
self:scale_or_crop_background();
(cmd(fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480))(self);
else
self:visible(false);
end
end;
};
Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00");diffusealpha,0.45);
};
--[[ LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_grid")).. {
InitCommand=cmd(customtexturerect,0,0,(SCREEN_WIDTH+1)/4,SCREEN_HEIGHT/4;SetTextureFiltering,true);
OnCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;diffuse,Color("Black");diffuseshift;effecttiming,(1/8)*4,0,(7/8)*4,0;effectclock,'beatnooffset';
effectcolor2,Color("Black");effectcolor1,Color.Alpha(Color("Black"),0.45);fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480;diffusealpha,0.345);
}; --]]
LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_bg top")) .. {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT);
};
};
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
InitCommand=function(self)
self:Center();
end;
Def.Sprite {
Condition=not GAMESTATE:IsCourseMode();
OnCommand=function(self)
if GAMESTATE:GetCurrentSong() then
local song = GAMESTATE:GetCurrentSong();
if song:HasBackground() then
self:LoadBackground(song:GetBackgroundPath());
end;
self:scale_or_crop_background();
self:fadebottom(0.25);
self:fadetop(0.25);
self:croptop(48/480);
self:cropbottom(48/480);
else
self:visible(false);
end
end;
};
Def.Quad {
InitCommand=function(self)
self:scaletoclipped(SCREEN_WIDTH + 1, SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("#FFCB05"));
self:diffusebottomedge(color("#F0BA00"));
self:diffusealpha(0.45);
end;
};
LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_bg top")) .. {
InitCommand=function(self)
self:scaletoclipped(SCREEN_WIDTH + 1, SCREEN_HEIGHT);
end;
};
};
return t
@@ -6,33 +6,47 @@ local t = Def.ActorFrame {
LoadActor( THEME:GetPathB("Screen", "out") );
LoadFont( "common normal" ) .. {
InitCommand=cmd(settext,"Press &START; for more options";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+100;visible,false);
AskForGoToOptionsCommand=cmd(
visible,true;
diffusealpha,0;
linear,0.15;
zoomy,1;
diffusealpha,1;
sleep,1;
linear,0.15;
diffusealpha,0;
zoomy,0;
);
GoToOptionsCommand=cmd(visible,false);
InitCommand=function(self)
self:settext("Press &START; for more options");
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y + 100);
self:visible(false);
end;
AskForGoToOptionsCommand=function(self)
self:visible(true);
self:diffusealpha(0);
self:linear(0.15);
self:zoomy(1);
self:diffusealpha(1);
self:sleep(1);
self:linear(0.15);
self:diffusealpha(0);
self:zoomy(0);
end;
GoToOptionsCommand=function(self)
self:visible(false);
end;
};
LoadFont( "common normal" ) .. {
InitCommand=cmd(settext,"entering options...";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+100;visible,false);
AskForGoToOptionsCommand=cmd(
visible,false;
linear,0.15;
zoomy,1;
diffusealpha,1;
sleep,1;
linear,0.15;
diffusealpha,0;
zoomy,0;
);
GoToOptionsCommand=cmd(visible,true);
InitCommand=function(self)
self:settext("entering options...");
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y + 100);
self:visible(false);
end;
AskForGoToOptionsCommand=function(self)
self:visible(false);
self:linear(0.15);
self:zoomy(1);
self:diffusealpha(1);
self:sleep(1);
self:linear(0.15);
self:diffusealpha(0);
self:zoomy(0);
end;
GoToOptionsCommand=function(self)
self:visible(true);
end;
};
};
@@ -7,7 +7,9 @@ local function StepsDisplay(pn)
end
local t = Def.StepsDisplay {
InitCommand=cmd(Load,"StepsDisplay",GAMESTATE:GetPlayerState(pn););
InitCommand=function(self)
self:Load("StepsDisplay", GAMESTATE:GetPlayerState(pn));
end;
};
if pn == PLAYER_1 then
@@ -24,8 +26,13 @@ t[#t+1] = StandardDecorationFromFileOptional("AlternateHelpDisplay","AlternateHe
local function PercentScore(pn)
local t = LoadFont("Common normal")..{
InitCommand=cmd(zoom,0.625;shadowlength,1);
BeginCommand=cmd(playcommand,"Set");
InitCommand=function(self)
self:zoom(0.625);
self:shadowlength(1);
end;
BeginCommand=function(self)
self:playcommand("Set");
end;
SetCommand=function(self)
local SongOrCourse, StepsOrTrail;
if GAMESTATE:IsCourseMode() then
@@ -72,16 +79,28 @@ local function PercentScore(pn)
end;
self:settext(text);
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set");
end;
CurrentCourseChangedMessageCommand=function(self)
self:playcommand("Set");
end;
};
if pn == PLAYER_1 then
t.CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set");
t.CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
t.CurrentStepsP1ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
t.CurrentTrailP1ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
else
t.CurrentStepsP2ChangedMessageCommand=cmd(playcommand,"Set");
t.CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
t.CurrentStepsP2ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
t.CurrentTrailP2ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
end
return t;
@@ -95,13 +114,16 @@ for pn in ivalues(PlayerNumber) do
PlayerJoinedMessageCommand=function(self, params)
if params.Player == pn then
self:visible(true);
(cmd(zoom,0;bounceend,0.3;zoom,1))(self);
self:zoom(0);
self:bounceend(0.3);
self:zoom(1);
end;
end;
PlayerUnjoinedMessageCommand=function(self, params)
if params.Player == pn then
self:visible(true);
(cmd(bouncebegin,0.3;zoom,0))(self);
self:bouncebegin(0.3);
self:zoom(0);
end;
end;
};
@@ -159,10 +181,18 @@ t[#t+1] = StandardDecorationFromFileOptional("SongTime","SongTime") .. {
end;
self:settext( SecondsToMSS(length) );
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set");
end;
CurrentCourseChangedMessageCommand=function(self)
self:playcommand("Set");
end;
CurrentTrailP1ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
CurrentTrailP2ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
}
if not GAMESTATE:IsCourseMode() then
@@ -198,20 +228,37 @@ if not GAMESTATE:IsCourseMode() then
end;
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);
OffCommand=cmd(bouncebegin,0.15;zoomx,0);
OnCommand=function(self)
self:draworder(105);
self:x(SCREEN_CENTER_X-76);
self:y(SCREEN_CENTER_Y-72);
self:zoomy(0);
self:sleep(0.5);
self:decelerate(0.25);
self:zoomy(1);
self:SetUpdateFunction(CDTitleUpdate);
end;
OffCommand=function(self)
self:bouncebegin(0.15);
self:zoomx(0);
end;
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);
InitCommand=function(self)
self:y(19);
end;
};
};
t[#t+1] = StandardDecorationFromFileOptional("NewSong","NewSong") .. {
-- ShowCommand=THEME:GetMetric(Var "LoadingScreen", "NewSongShowCommand" );
-- HideCommand=THEME:GetMetric(Var "LoadingScreen", "NewSongHideCommand" );
InitCommand=cmd(playcommand,"Set");
BeginCommand=cmd(playcommand,"Set");
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
InitCommand=function(self)
self:playcommand("Set");
end;
BeginCommand=function(self)
self:playcommand("Set");
end;
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set");
end;
SetCommand=function(self)
-- local pTargetProfile;
local sSong;
@@ -232,7 +279,9 @@ end;
if GAMESTATE:IsCourseMode() then
t[#t+1] = StandardDecorationFromFileOptional("NumCourseSongs","NumCourseSongs")..{
InitCommand=cmd(horizalign,right);
InitCommand=function(self)
self:horizalign(right);
end;
SetCommand=function(self)
local curSelection= nil;
local sAppend = "";
@@ -249,23 +298,23 @@ if GAMESTATE:IsCourseMode() then
self:visible(false);
end;
end;
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
CurrentCourseChangedMessageCommand=function(self)
self:playcommand("Set");
end;
};
end
t[#t+1] = StandardDecorationFromFileOptional("DifficultyDisplay","DifficultyDisplay");
t[#t+1] = StandardDecorationFromFileOptional("SortOrderFrame","SortOrderFrame") .. {
--[[ BeginCommand=cmd(playcommand,"Set");
SortOrderChangedMessageCommand=cmd(playcommand,"Set";);
SetCommand=function(self)
local s = SortOrderToLocalizedString( GAMESTATE:GetSortOrder() );
self:settext( s );
self:playcommand("Sort");
end; --]]
};
t[#t+1] = StandardDecorationFromFileOptional("SortOrder","SortOrderText") .. {
BeginCommand=cmd(playcommand,"Set");
SortOrderChangedMessageCommand=cmd(playcommand,"Set";);
BeginCommand=function(self)
self:playcommand("Set");
end;
SortOrderChangedMessageCommand=function(self)
self:playcommand("Set");
end;
SetCommand=function(self)
local s = SortOrderToLocalizedString( GAMESTATE:GetSortOrder() );
self:settext( s );
@@ -285,10 +334,15 @@ t[#t+1] = StandardDecorationFromFileOptional("SongOptions","SongOptionsText") ..
-- Sounds
t[#t+1] = Def.ActorFrame {
LoadActor(THEME:GetPathS("_switch","up")) .. {
SelectMenuOpenedMessageCommand=cmd(stop;play);
SelectMenuOpenedMessageCommand=function(self)
self:playcommand("Set");
end;
};
LoadActor(THEME:GetPathS("_switch","down")) .. {
SelectMenuClosedMessageCommand=cmd(stop;play);
SelectMenuClosedMessageCommand=function(self)
self:stop();
self:play();
end;
};
};
@@ -7,10 +7,21 @@ function GetLocalProfiles()
LoadFont("Common Normal") .. {
Text=profile:GetDisplayName();
InitCommand=cmd(shadowlength,1;y,-10;zoom,1;ztest,true);
InitCommand=function(self)
self:shadowlength(1);
self:y(-10);
self:zoom(1);
self:ztest(true);
end;
};
LoadFont("Common Normal") .. {
InitCommand=cmd(shadowlength,1;y,8;zoom,0.5;vertspacing,-8;ztest,true);
InitCommand=function(self)
self:shadowlength(1);
self:y(8);
self:zoom(0.5);
self:vertspacing(-8);
self:ztest(true);
end;
BeginCommand=function(self)
local numSongsPlayed = profile:GetNumTotalSongsPlayed();
local s = numSongsPlayed == 1 and "Song" or "Songs";
@@ -27,7 +38,9 @@ end;
function LoadCard(cColor)
local t = Def.ActorFrame {
LoadActor( THEME:GetPathG("ScreenSelectProfile","CardBackground") ) .. {
InitCommand=cmd(diffuse,cColor);
InitCommand=function(self)
self:diffuse(cColor);
end;
};
LoadActor( THEME:GetPathG("ScreenSelectProfile","CardFrame") );
};
@@ -44,8 +57,14 @@ function LoadPlayerStuff(Player)
LoadFont("Common Normal") .. {
Text=THEME:GetString("ScreenSelectProfile","PressStart");
InitCommand=cmd(shadowlength,1);
OnCommand=cmd(diffuseshift;effectcolor1,Color('White');effectcolor2,color("0.5,0.5,0.5"));
InitCommand=function(self)
self:shadowlength(1);
end;
OnCommand=function(self)
self:diffuseshift();
self:effectcolor1(Color('White'));
self:effectcolor2(color("0.5,0.5,0.5"));
end;
};
};
table.insert( ret, t );
@@ -59,22 +78,49 @@ function LoadPlayerStuff(Player)
t = Def.ActorFrame {
Name = 'SmallFrame';
InitCommand=cmd(y,-2);
InitCommand=function(self)
self:y(-2);
end;
Def.Quad {
InitCommand=cmd(zoomto,200-10,40+2);
OnCommand=cmd(diffuse,Color('Black');diffusealpha,0.5);
InitCommand=function(self)
self:zoomto(200-10, 40+2);
end;
OnCommand=function(self)
self:diffuse(Color('Black'));
self:diffusealpha(0.5);
end;
};
Def.Quad {
InitCommand=cmd(zoomto,200-10,40);
OnCommand=cmd(diffuse,PlayerColor(Player);fadeleft,0.25;faderight,0.25;glow,color("1,1,1,0.25"));
InitCommand=function(self)
self:zoomto(200-10, 40);
end;
OnCommand=function(self)
self:diffuse(PlayerColor(Player));
self:fadeleft(0.25);
self:faderight(0.25);
self:glow(color("1,1,1,0.25"));
end;
};
Def.Quad {
InitCommand=cmd(zoomto,200-10,40;y,-40/2+20);
OnCommand=cmd(diffuse,Color("Black");fadebottom,1;diffusealpha,0.35);
InitCommand=function(self)
self:zoomto(200-10, 40);
self:y(-40 / 2 + 20);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:fadebottom(1);
self:diffusealpha(0.35);
end;
};
Def.Quad {
InitCommand=cmd(zoomto,200-10,1;y,-40/2+1);
OnCommand=cmd(diffuse,PlayerColor(Player);glow,color("1,1,1,0.25"));
InitCommand=function(self)
self:zoomto(200 - 10, 1);
self:y(-40 / 2 + 1);
end;
OnCommand=function(self)
self:diffuse(PlayerColor(Player));
self:glow(color("1,1,1,0.25"));
end;
};
};
table.insert( ret, t );
@@ -82,7 +128,12 @@ function LoadPlayerStuff(Player)
t = Def.ActorScroller{
Name = 'ProfileScroller';
NumItemsToDraw=6;
OnCommand=cmd(y,1;SetFastCatchup,true;SetMask,200,58;SetSecondsPerItem,0.15);
OnCommand=function(self)
self:y(1);
self:SetFastCatchup(true);
self:SetMask(200, 58);
self:SetSecondsPerItem(0.15);
end;
TransformFunction=function(self, offset, itemIndex, numItems)
local focus = scale(math.abs(offset),0,2,1,0);
self:visible(false);
@@ -98,7 +149,10 @@ function LoadPlayerStuff(Player)
table.insert( ret, t );
t = LoadFont("Common Normal") .. {
Name = 'SelectedProfileText';
InitCommand=cmd(y,160;shadowlength,1;);
InitCommand=function(self)
self:y(160);
self:shadowlength(1);
end;
};
table.insert( ret, t );
@@ -1,32 +1,49 @@
if not GAMESTATE:IsCourseMode() then return Def.ActorFrame{} end; -- short circuit
local course = GAMESTATE:GetCurrentCourse()
local t = Def.ActorFrame{
-- background
Def.Sprite{
InitCommand=cmd(Center);
BeginCommand=function(self)
if course:GetBackgroundPath() then
self:Load( course:GetBackgroundPath() )
else
-- default to the BG of the first song in the course
self:LoadFromCurrentSongBackground()
end
end;
OnCommand=cmd(diffusealpha,0;scale_or_crop_background;sleep,0.5;linear,0.50;diffusealpha,1;sleep,3);
};
-- alternate background
Def.Sprite{
InitCommand=cmd(Center;);
BeginCommand=cmd(LoadFromCurrentSongBackground;scale_or_crop_background;diffusealpha,0);
OnCommand=cmd(sleep,4;playcommand,"Show");
ShowCommand=function(self)
if course:HasBackground() then
self:accelerate(0.25)
self:diffusealpha(1)
end
end;
};
};
if not GAMESTATE:IsCourseMode() then return Def.ActorFrame{} end; -- short circuit
local course = GAMESTATE:GetCurrentCourse()
local t = Def.ActorFrame{
-- background
Def.Sprite{
InitCommand=function(self)
self:(Center);
end;
BeginCommand=function(self)
if course:GetBackgroundPath() then
self:Load( course:GetBackgroundPath() )
else
-- default to the BG of the first song in the course
self:LoadFromCurrentSongBackground()
end
end;
OnCommand=function(self)
self:diffusealpha(0);
self:scale_or_crop_background();
self:sleep(0.5);
self:linear(0.50);
self:diffusealpha(1);
self:sleep(3);
end;
};
-- alternate background
Def.Sprite{
InitCommand=function(self)
self:(Center);
end;
BeginCommand=function(self)
self:LoadFromCurrentSongBackground();
self:scale_or_crop_background();
self:diffusealpha(0);
OnCommand=function(self)
self:sleep(4);
self:playcommand("Show");
end;
ShowCommand=function(self)
if course:HasBackground() then
self:accelerate(0.25)
self:diffusealpha(1)
end
end;
};
};
return t;
@@ -1,99 +1,166 @@
local playMode = GAMESTATE:GetPlayMode()
local sStage = ""
sStage = GAMESTATE:GetCurrentStage()
if playMode ~= 'PlayMode_Regular' and playMode ~= 'PlayMode_Rave' and playMode ~= 'PlayMode_Battle' then
sStage = playMode;
end;
if not (GAMESTATE:IsCourseMode() or GAMESTATE:IsExtraStage() or GAMESTATE:IsExtraStage2()) then
local tRemap = {
Stage_Event = 0,
Stage_1st = 1,
Stage_2nd = 2,
Stage_3rd = 3,
Stage_4th = 4,
Stage_5th = 5,
Stage_6th = 6,
};
local nSongCount = tRemap[sStage] + (GAMESTATE:GetCurrentSong():GetStageCost()-1);
if nSongCount >= PREFSMAN:GetPreference("SongsPerPlay") then
sStage = "Stage_Final";
else
sStage = sStage;
end;
end;
local t = Def.ActorFrame {};
t[#t+1] = Def.Quad {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color("Black"));
};
if GAMESTATE:IsCourseMode() then
t[#t+1] = LoadActor("CourseDisplay");
else
t[#t+1] = Def.Sprite {
InitCommand=cmd(Center;diffusealpha,0);
BeginCommand=cmd(LoadFromCurrentSongBackground);
OnCommand=function(self)
if PREFSMAN:GetPreference("StretchBackgrounds") then
self:SetSize(SCREEN_WIDTH,SCREEN_HEIGHT)
else
self:scale_or_crop_background()
end
self:sleep(0.5)
self:linear(0.50)
self:diffusealpha(1)
self:sleep(3)
end;
};
end
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y);
OnCommand=cmd(stoptweening;zoom,1.25;decelerate,3;zoom,1);
LoadActor( THEME:GetPathG("ScreenStageInformation", "Stage " .. ToEnumShortString(sStage) ) ) .. {
OnCommand=cmd(diffusealpha,0;linear,0.25;diffusealpha,1;sleep,1.75;linear,0.5;zoomy,0;zoomx,2;diffusealpha,0);
};
};
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+96);
OnCommand=cmd(stoptweening;addy,-16;decelerate,3;addy,16);
LoadFont("Common Normal") .. {
Text=GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() or GAMESTATE:GetCurrentSong():GetDisplayFullTitle();
InitCommand=cmd(strokecolor,Color("Outline");y,-20);
OnCommand=cmd(diffusealpha,0;linear,0.5;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
};
LoadFont("Common Normal") .. {
Text=GAMESTATE:IsCourseMode() and ToEnumShortString( GAMESTATE:GetCurrentCourse():GetCourseType() ) or GAMESTATE:GetCurrentSong():GetDisplayArtist();
InitCommand=cmd(strokecolor,Color("Outline");zoom,0.75);
OnCommand=cmd(diffusealpha,0;linear,0.5;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
};
LoadFont("Common Normal") .. {
InitCommand=cmd(strokecolor,Color("Outline");diffuse,Color("Orange");diffusebottomedge,Color("Yellow");zoom,0.75;y,20);
BeginCommand=function(self)
local text = "";
local SongOrCourse;
if GAMESTATE:IsCourseMode() then
local trail = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber());
SongOrCourse = GAMESTATE:GetCurrentCourse();
if SongOrCourse:GetEstimatedNumStages() == 1 then
text = SongOrCourse:GetEstimatedNumStages() .." Stage / ".. SecondsToMSSMsMs( TrailUtil.GetTotalSeconds(trail) );
else
text = SongOrCourse:GetEstimatedNumStages() .." Stages / ".. SecondsToMSSMsMs( TrailUtil.GetTotalSeconds(trail) );
end
else
SongOrCourse = GAMESTATE:GetCurrentSong();
text = SecondsToMSSMsMs( SongOrCourse:MusicLengthSeconds() );
end;
self:settext(text);
end;
OnCommand=cmd(diffusealpha,0;linear,0.5;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
};
};
return t
local playMode = GAMESTATE:GetPlayMode()
local sStage = ""
sStage = GAMESTATE:GetCurrentStage()
if playMode ~= 'PlayMode_Regular' and playMode ~= 'PlayMode_Rave' and playMode ~= 'PlayMode_Battle' then
sStage = playMode;
end;
if not (GAMESTATE:IsCourseMode() or GAMESTATE:IsExtraStage() or GAMESTATE:IsExtraStage2()) then
local tRemap = {
Stage_Event = 0,
Stage_1st = 1,
Stage_2nd = 2,
Stage_3rd = 3,
Stage_4th = 4,
Stage_5th = 5,
Stage_6th = 6,
};
local nSongCount = tRemap[sStage] + (GAMESTATE:GetCurrentSong():GetStageCost()-1);
if nSongCount >= PREFSMAN:GetPreference("SongsPerPlay") then
sStage = "Stage_Final";
else
sStage = sStage;
end;
end;
local t = Def.ActorFrame {};
t[#t+1] = Def.Quad {
InitCommand=function(self)
self:Center();
self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT);
self:diffuse(Color("Black"));
end;
};
if GAMESTATE:IsCourseMode() then
t[#t+1] = LoadActor("CourseDisplay");
else
t[#t+1] = Def.Sprite {
InitCommand=function(self)
self:Center();
self:diffusealpha(0);
end;
BeginCommand=function(self)
self:LoadFromCurrentSongBackground();
end;
OnCommand=function(self)
if PREFSMAN:GetPreference("StretchBackgrounds") then
self:SetSize(SCREEN_WIDTH,SCREEN_HEIGHT)
else
self:scale_or_crop_background()
end
self:sleep(0.5)
self:linear(0.50)
self:diffusealpha(1)
self:sleep(3)
end;
};
end
t[#t+1] = Def.ActorFrame {
InitCommand=function(self)
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:stoptweening();
self:zoom(1.25);
self:decelerate(3);
self:zoom(1);
end;
LoadActor( THEME:GetPathG("ScreenStageInformation", "Stage " .. ToEnumShortString(sStage) ) ) .. {
OnCommand=function(self)
self:diffusealpha(0);
self:linear(0.25);
self:diffusealpha(1);
self:sleep(1.75);
self:linear(0.5);
self:zoomy(0);
self:zoomx(2);
self:diffusealpha(0);
end;
};
};
t[#t+1] = Def.ActorFrame {
InitCommand=function(self)
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y + 96);
end;
OnCommand=function(self)
self:stoptweening();
self:addy(-16);
self:decelerate(3);
self:addy(16);
end;
LoadFont("Common Normal") .. {
Text=GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() or GAMESTATE:GetCurrentSong():GetDisplayFullTitle();
InitCommand=function(self)
self:strokecolor(Color("Outline"));
self:y(-20);
end;
OnCommand=function(self)
self:diffusealpha(0);
self:linear(0.5);
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.5);
self:diffusealpha(0);
end;
};
LoadFont("Common Normal") .. {
Text=GAMESTATE:IsCourseMode() and ToEnumShortString( GAMESTATE:GetCurrentCourse():GetCourseType() ) or GAMESTATE:GetCurrentSong():GetDisplayArtist();
InitCommand=function(self)
self:strokecolor(Color("Outline"));
self:zoom(0.75);
end;
OnCommand=function(self)
self:diffusealpha(0);
self:linear(0.5);
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.5);
self:diffusealpha(0);
end;
};
LoadFont("Common Normal") .. {
InitCommand=function(self)
self:strokecolor(Color("Outline"));
self:diffuse(Color("Orange"));
self:diffusebottomedge(Color("Yellow"));
self:zoom(0.75);
self:y(20);
end;
BeginCommand=function(self)
local text = "";
local SongOrCourse;
if GAMESTATE:IsCourseMode() then
local trail = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber());
SongOrCourse = GAMESTATE:GetCurrentCourse();
if SongOrCourse:GetEstimatedNumStages() == 1 then
text = SongOrCourse:GetEstimatedNumStages() .." Stage / ".. SecondsToMSSMsMs( TrailUtil.GetTotalSeconds(trail) );
else
text = SongOrCourse:GetEstimatedNumStages() .." Stages / ".. SecondsToMSSMsMs( TrailUtil.GetTotalSeconds(trail) );
end
else
SongOrCourse = GAMESTATE:GetCurrentSong();
text = SecondsToMSSMsMs( SongOrCourse:MusicLengthSeconds() );
end;
self:settext(text);
end;
OnCommand=function(self)
self:diffusealpha(0);
self:linear(0.5);
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.5);
self:diffusealpha(0);
end;
};
};
return t
@@ -1,48 +1,66 @@
local t = Def.ActorFrame {};
local bOpen = false;
local function GetTime(self)
-- Painfully ugly, sorry.
local c = self:GetChildren();
local tTime = { Hour = nil, Minute = nil, Second = nil, Append = nil};
if Hour() then tTime.Hour = Hour() else tTime.Hour = 0 end;
if Minute() then tTime.Minute = Minute() else tTime.Minute = 0 end;
if Second() then tTime.Second = Second() else tTime.Second = 0 end;
if( Hour() < 12 ) then
tTime.Append = "AM"
else
tTime.Append = "PM"
end;
if( Hour() == 0 ) then
tTime.Hour = 12;
end;
c.Time:settextf("%02i:%02i:%02i %s",tTime.Hour,tTime.Minute,tTime.Second,tTime.Append);
end;
t[#t+1] = Def.ActorFrame {
Def.ActorFrame {
LoadActor(THEME:GetPathB("","_frame 3x3"),"rounded black",96,12) .. {
Name="Background";
};
LoadFont("Common Normal") .. {
Text="Test";
Name="Time";
InitCommand=cmd(zoom,0.675);
};
--
BeginCommand=function(self)
self:SetUpdateFunction( GetTime );
self:SetUpdateRate( 1/30 );
end;
};
ToggleConsoleDisplayMessageCommand=function(self)
bOpen = not bOpen;
if bOpen then self:playcommand("Show") else self:playcommand("Hide") end
end;
InitCommand=cmd(x,SCREEN_RIGHT-50;y,10;zoomy,0);
ShowCommand=cmd(finishtweening;zoomx,1;zoomy,0;bounceend,0.125;zoomy,1);
HideCommand=cmd(finishtweening;zoom,1;bouncebegin,0.125;zoomy,0);
};
local t = Def.ActorFrame {};
local bOpen = false;
local function GetTime(self)
-- Painfully ugly, sorry.
local c = self:GetChildren();
local tTime = { Hour = nil, Minute = nil, Second = nil, Append = nil};
if Hour() then tTime.Hour = Hour() else tTime.Hour = 0 end;
if Minute() then tTime.Minute = Minute() else tTime.Minute = 0 end;
if Second() then tTime.Second = Second() else tTime.Second = 0 end;
if( Hour() < 12 ) then
tTime.Append = "AM"
else
tTime.Append = "PM"
end;
if( Hour() == 0 ) then
tTime.Hour = 12;
end;
c.Time:settextf("%02i:%02i:%02i %s",tTime.Hour,tTime.Minute,tTime.Second,tTime.Append);
end;
t[#t+1] = Def.ActorFrame {
Def.ActorFrame {
LoadActor(THEME:GetPathB("","_frame 3x3"),"rounded black",96,12) .. {
Name="Background";
};
LoadFont("Common Normal") .. {
Text="Test";
Name="Time";
InitCommand=function(self)
self:zoom(0.675);
end;
};
--
BeginCommand=function(self)
self:SetUpdateFunction( GetTime );
self:SetUpdateRate( 1/30 );
end;
};
ToggleConsoleDisplayMessageCommand=function(self)
bOpen = not bOpen;
if bOpen then self:playcommand("Show") else self:playcommand("Hide") end
end;
InitCommand=function(self)
self:x(SCREEN_RIGHT-50);
self:y(10);
self:zoomy(0);
end;
ShowCommand=function(self)
self:finishtweening();
self:zoomx(1);
self:zoomy(0);
self:bounceend(0.125);
self:zoomy(1);
end;
HideCommand=function(self)
self:finishtweening();
self:zoom(1);
self:bouncebegin(0.125);
self:zoomy(0);
end;
};
return t;
@@ -1,30 +1,60 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
FOV=90;
InitCommand=cmd(Center);
InitCommand=function(self)
self:Center();
end;
Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00"));
InitCommand=function(self)
self:scaletoclipped(SCREEN_WIDTH,SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("#FFCB05"));
self:diffusebottomedge(color("#F0BA00"));
end;
};
Def.ActorFrame {
Def.ActorFrame {
InitCommand=cmd(hide_if,hideFancyElements;);
OffCommand=cmd(decelerate,0.25;rotationx,-90/4*3.5;y,SCREEN_CENTER_Y);
ShiftCommand=cmd(
smooth,1.25;z,256;
sleep,2;
smooth,1.25;z,0;
sleep,2;queuecommand,"Shift"
);
FlipCommand=cmd(
smooth,0.5;rotationy,180;
sleep,2;smooth,0.5;rotationy,360;
sleep,1;rotationy,0;sleep,1;
queuecommand,"Flip"
);
InitCommand=function(self)
self:hide_if(hideFancyElements);
end;
OffCommand=function(self)
self:decelerate(0.25);
self:rotationx(-90 / 4 * 3.5);
self:y(SCREEN_CENTER_Y);
end;
ShiftCommand=function(self)
self:smooth(1.25);
self:z(256);
self:sleep(2);
self:smooth(1.25);
self:z(0);
self:sleep(2);
self:queuecommand("Shift");
end;
FlipCommand=function(self)
self:smooth(0.5);
self:rotationy(180);
self:sleep(2);
self:smooth(0.5);
self:rotationy(360);
self:sleep(1);
self:rotationy(0);
self:sleep(1);
self:queuecommand("Flip");
end;
LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_checkerboard")) .. {
InitCommand=cmd(zoomto,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;customtexturerect,0,0,SCREEN_WIDTH*4/256,SCREEN_HEIGHT*4/256);
OnCommand=cmd(texcoordvelocity,0,0.5;diffuse,color("#ffd400");diffusealpha,0.5;fadetop,1;fadebottom,1);
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2);
self:customtexturerect(0, 0, SCREEN_WIDTH * 4 / 256, SCREEN_HEIGHT * 4 / 256);
end;
OnCommand=function(self)
self:texcoordvelocity(0, 0.5);
self:diffuse(color("#ffd400"));
self:diffusealpha(0.5);
self:fadetop(1);
self:fadebottom(1);
end;
};
};
};
@@ -1,80 +1,111 @@
local function Clock()
function UpdateVisible(self)
local screen = SCREENMAN:GetTopScreen()
local bShow = true
if screen then
local sClass = screen:GetName()
bShow = THEME:GetMetric(sClass, "ShowClock")
end
if bShow then
self:smooth(0.25)
self:y(12)
else
self:smooth(0.25)
self:y(-56)
end
end
-- clock
clock = Def.ActorFrame {
Name="Clock",
InitCommand=cmd(x,50;y,12;playcommand,"Update"),
ScreenChangedMessageCommand=UpdateVisible,
UpdateCommand=cmd(runcommandsonleaves,cmd(queuecommand,"Update")),
Def.RoundedBox(90,26)..{ InitCommand=cmd(x,-22;y,-4) },
Def.ActorFrame {
Name="ClockText",
InitCommand=cmd(y,-2),
LoadFont("Common", "normal")..{
Text="00:00:",
InitCommand=cmd(horizalign,right;shadowlength,0;diffusebottomedge,color("0.9,0.9,0.9")),
UpdateCommand=function(self)
local hour, min = Hour(), Minute()
if hour > 12 and GetUserPrefB("Use12HourClock") then
hour = hour - 12
elseif hour == 0 and GetUserPrefB("Use12HourClock") then
hour = 12
end
self:settext(string.format('%02i:%02i:', hour, min))
self:sleep(1)
self:queuecommand("Update")
end
},
LoadFont("Common", "normal")..{
Text="00",
InitCommand=cmd(horizalign,left;shadowlength,0;diffusebottomedge,color("0.9,0.9,0.9")),
UpdateCommand=function(self)
local sec = Second()
self:settext(string.format('%02i', sec))
self:sleep(1)
self:queuecommand("Update")
end,
},
LoadFont("Common", "normal")..{
Text="",
InitCommand=cmd(x,28;y,-3;horizalign,left;shadowlength,0;diffusebottomedge,color("0.9,0.9,0.9");visible,false;zoom,0.75),
UpdateCommand=function(self)
if not GetUserPrefB("Use12HourClock") then
self:visible(false)
return
end
local hour = Hour()
if hour < 12 then
self:settext("AM")
self:diffuse(color("1,0.85,0,1"))
self:diffusebottomedge(color("0.75,0.55,0,1"))
else
self:settext("PM")
self:diffuse(color("0,0.85,1,1"))
self:diffusebottomedge(color("0,0.55,1,1"))
end
self:visible(true)
self:sleep(1)
self:queuecommand("Update")
end
}
}
}
return clock;
end
local t = Def.ActorFrame {};
local function Clock()
function UpdateVisible(self)
local screen = SCREENMAN:GetTopScreen()
local bShow = true
if screen then
local sClass = screen:GetName()
bShow = THEME:GetMetric(sClass, "ShowClock")
end
if bShow then
self:smooth(0.25)
self:y(12)
else
self:smooth(0.25)
self:y(-56)
end
end
-- clock
clock = Def.ActorFrame {
Name="Clock",
InitCommand=function(self)
self:x(50);
self:y(12);
self:playcommand("Update")
end;
ScreenChangedMessageCommand=UpdateVisible,
UpdateCommand=function(self)
self:runcommandsonleaves(function(self)
self:queuecommand("Update");
end;);
end;
Def.RoundedBox(90,26)..{
InitCommand=function(self)
self:x(-22);
self:y(-4);
end;
};
Def.ActorFrame {
Name="ClockText",
InitCommand=function(self)
self:y(-2);
end;
LoadFont("Common", "normal")..{
Text="00:00:",
InitCommand=function(self)
self:horizalign(right);
self:shadowlength(0);
self:diffusebottomedge(color("0.9,0.9,0.9"));
end;
UpdateCommand=function(self)
local hour, min = Hour(), Minute()
if hour > 12 and GetUserPrefB("Use12HourClock") then
hour = hour - 12
elseif hour == 0 and GetUserPrefB("Use12HourClock") then
hour = 12
end
self:settext(string.format('%02i:%02i:', hour, min))
self:sleep(1)
self:queuecommand("Update")
end
},
LoadFont("Common", "normal")..{
Text="00",
InitCommand=function(self)
self:horizalign(left);
self:shadowlength(0);
self:diffusebottomedge(color("0.9,0.9,0.9"));
end;
UpdateCommand=function(self)
local sec = Second()
self:settext(string.format('%02i', sec))
self:sleep(1)
self:queuecommand("Update")
end,
},
LoadFont("Common", "normal")..{
Text="",
InitCommand=function(self)
self:x(28);
self:y(-3);
self:horizalign(left);
self:shadowlength(0);
self:diffusebottomedge(color("0.9,0.9,0.9"));
self:visible(false);
self:zoom(0.75);
end;
UpdateCommand=function(self)
if not GetUserPrefB("Use12HourClock") then
self:visible(false)
return
end
local hour = Hour()
if hour < 12 then
self:settext("AM")
self:diffuse(color("1,0.85,0,1"))
self:diffusebottomedge(color("0.75,0.55,0,1"))
else
self:settext("PM")
self:diffuse(color("0,0.85,1,1"))
self:diffusebottomedge(color("0,0.55,1,1"))
end
self:visible(true)
self:sleep(1)
self:queuecommand("Update")
end
}
}
}
return clock;
end
local t = Def.ActorFrame {};
return t;
@@ -1,35 +1,46 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
FOV=90;
InitCommand=cmd(Center);
Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00"));
};
Def.ActorFrame {
InitCommand=cmd(hide_if,hideFancyElements;);
LoadActor("_checkerboard") .. {
InitCommand=cmd(rotationy,0;rotationz,0;rotationx,-90/4*3.5;zoomto,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;customtexturerect,0,0,SCREEN_WIDTH*4/256,SCREEN_HEIGHT*4/256);
OnCommand=cmd(texcoordvelocity,0,0.5;diffuse,color("#ffd400");diffusealpha,0.5;fadetop,1);
};
};
LoadActor("_particleLoader") .. {
InitCommand=cmd(x,-SCREEN_CENTER_X;y,-SCREEN_CENTER_Y;hide_if,hideFancyElements;);
};
--[[ LoadActor("_particles") .. {
InitCommand=cmd(x,-SCREEN_CENTER_X;y,-SCREEN_CENTER_Y);
}; --]]
--[[ LoadActor("_pattern") .. {
InitCommand=cmd(z,32;x,4;y,4;;rotationy,-12.25;rotationz,-30;rotationx,-20;zoomto,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;customtexturerect,0,0,SCREEN_WIDTH*4/256,SCREEN_HEIGHT*4/256);
OnCommand=cmd(texcoordvelocity,0.125,0.5;diffuse,Color("Black");diffusealpha,0.5);
}; --]]
--[[ LoadActor("_grid") .. {
InitCommand=cmd(customtexturerect,0,0,(SCREEN_WIDTH+1)/4,SCREEN_HEIGHT/4;SetTextureFiltering,true);
OnCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;diffuse,Color("Black");diffuseshift;effecttiming,(1/8)*2,0,(7/8)*2,0;effectclock,'beatnooffset';
effectcolor2,Color("White");effectcolor1,Color("Black");fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480;blend,Blend.Add;
diffusealpha,0.155);
}; --]]
};
return t;
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
FOV=90;
InitCommand=function(self)
self:Center();
end;
Def.Quad {
InitCommand=function(self)
self:scaletoclipped(SCREEN_WIDTH,SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("#FFCB05"));
self:diffusebottomedge(color("#F0BA00"));
end;
};
Def.ActorFrame {
InitCommand=function(self)
self:hide_if(hideFancyElements);
end;
LoadActor("_checkerboard") .. {
InitCommand=function(self)
self:rotationy(0);
self:rotationz(0);
self:rotationx(-90 / 4 * 3.5);
self:zoomto(SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2);
self:customtexturerect(0, 0, SCREEN_WIDTH * 4 / 256, SCREEN_HEIGHT * 4 / 256);
end;
OnCommand=function(self)
self:texcoordvelocity(0, 0.5);
self:diffuse(color("#ffd400"));
self:diffusealpha(0.5);
self:fadetop(1);
end;
};
};
LoadActor("_particleLoader") .. {
InitCommand=function(self)
self:x(-SCREEN_CENTER_X);
self:y(-SCREEN_CENTER_Y);
self:hide_if(hideFancyElements);
end;
};
};
return t;
@@ -2,34 +2,27 @@ local fTileSize = 32;
local iTilesX = math.ceil( SCREEN_WIDTH/fTileSize );
local iTilesY = math.ceil( SCREEN_HEIGHT/fTileSize );
local fSleepTime = THEME:GetMetric( Var "LoadingScreen","ScreenInDelay");
--[[ local function Actor:PositionTile(self,iX,iY)
self:x( scale(iX,1,iTilesX,-SCREEN_CENTER_X,SCREEN_CENTER_X) );
self:y( scale(iY,1,iTilesY,-SCREEN_CENTER_Y,SCREEN_CENTER_Y) );
end --]]
local t = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y);
OnCommand=cmd(sleep,fSleepTime);
InitCommand=function(self)
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:sleep(fSleepTime);
end;
};
--[[ for indx=1,iTilesX do
for indy=1,iTilesY do
t[#t+1] = Def.Quad {
InitCommand=cmd(zoom,fTileSize-2;
x,math.floor( scale(indx,1,iTilesX,(iTilesX/2)*fTileSize*-1,(iTilesX/2)*fTileSize*1) );
y,math.floor( scale(indy,1,iTilesY,(iTilesY/2)*fTileSize*-1,(iTilesY/2)*fTileSize*1) );
);
OnCommand=cmd(diffuse,Color("Black");diffusealpha,1;zoom,fTileSize-2;sleep,(iTilesX+iTilesY)*(1/60);linear,0.0325 + ( indx / 60 );diffusealpha,0;zoom,fTileSize*1.25);
};
end
end --]]
t[#t+1] = Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("0,0,0,1");sleep,0.0325 + fSleepTime;linear,0.15;diffusealpha,0);
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH + 1, SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("0,0,0,1"));
self:sleep(0.0325 + fSleepTime);
self:linear(0.15);
self:diffusealpha(0);
end;
};
--[[ return Def.ActorFrame {
Def.Quad {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("0,0,0,1");linear,0.15;diffusealpha,0);
};
}; --]]
return t
@@ -2,34 +2,28 @@ local fTileSize = 32;
local iTilesX = math.ceil( SCREEN_WIDTH/fTileSize );
local iTilesY = math.ceil( SCREEN_HEIGHT/fTileSize );
local fSleepTime = THEME:GetMetric( Var "LoadingScreen","ScreenOutDelay");
--[[ local function Actor:PositionTile(self,iX,iY)
self:x( scale(iX,1,iTilesX,-SCREEN_CENTER_X,SCREEN_CENTER_X) );
self:y( scale(iY,1,iTilesY,-SCREEN_CENTER_Y,SCREEN_CENTER_Y) );
end --]]
local t = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y);
OnCommand=cmd(sleep,fSleepTime);
InitCommand=function(self)
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:sleep(fSleepTime);
end;
};
--[[ for indx=1,iTilesX do
for indy=1,iTilesY do
t[#t+1] = Def.Quad {
InitCommand=cmd(zoom,fTileSize-2;
x,math.floor( scale(indx,1,iTilesX,(iTilesX/2)*fTileSize*-1,(iTilesX/2)*fTileSize*1) );
y,math.floor( scale(indy,1,iTilesY,(iTilesY/2)*fTileSize*-1,(iTilesY/2)*fTileSize*1) );
);
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0;zoom,fTileSize*1.25;linear,0.0325 + ( indx / 60 );diffusealpha,1;zoom,fTileSize-2);
};
end
end --]]
t[#t+1] = Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("0,0,0,0");sleep,0.0325 + fSleepTime;linear,0.15;diffusealpha,1);
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH + 1, SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("0,0,0,0"));
self:sleep(0.0325 + fSleepTime);
self:linear(0.15);
self:diffusealpha(0);
end;
};
--[[ return Def.ActorFrame {
Def.Quad {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("0,0,0,1");linear,0.15;diffusealpha,0);
};
}; --]]
return t
@@ -9,14 +9,31 @@ t[#t+1] = Def.ActorFrame {
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen")
end;
LoadActor(THEME:GetPathG("OptionRowExit","Frame")) .. {
InitCommand=cmd(diffuse,Color("Orange");diffusealpha,0.35);
InitCommand=function(self)
self:diffuse(Color("Orange"));
self:diffusealpha(0.35);
end;
};
LoadFont("Common Normal") .. {
InitCommand=cmd(zoom,0.75;shadowlength,1;glowshift;strokecolor,Color("Outline");diffuse,Color("Orange");diffusetopedge,Color("Yellow");textglowmode,'TextGlowMode_Inner');
InitCommand=function(self)
self:zoom(0.75);
self:shadowlength(1);
self:glowshift();
self:strokecolor(Color("Outline"));
self:diffuse(Color("Orange"));
self:diffusetopedge(Color("Yellow"));
self:textglowmode('TextGlowMode_Inner');
end;
Text="TESTING";
OnCommand=cmd(playcommand,"Refresh");
CoinInsertedMessageCommand=cmd(playcommand,"Refresh");
CoinModeChangedMessageCommand=cmd(playcommand,"Refresh");
OnCommand=function(self)
self:playcommand("Refresh");
end;
CoinInsertedMessageCommand=function(self)
self:playcommand("Refresh");
end;
CoinModeChangedMessageCommand=function(self)
self:playcommand("Refresh");
end;
RefreshCommand=function(self)
local bCanPlay = GAMESTATE:EnoughCreditsToJoin();
local bReady = GAMESTATE:GetNumSidesJoined() > 0;
@@ -1,23 +1,67 @@
return Def.ActorFrame {
InitCommand=cmd(Center);
InitCommand=function(self)
self:Center();
end;
Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;visible,false);
StartTransitioningCommand=cmd(visible,true;diffuse,Color("Black");sleep,3.5;diffusealpha,0);
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT);
self:visible(false);
end;
StartTransitioningCommand=function(self)
self:visible(true);
self:diffuse(Color("Black"));
self:sleep(3.5);
self:diffusealpha(0);
end;
};
-- Sublime
Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH,80;diffuse,Color("Orange");visible,false);
StartTransitioningCommand=cmd(visible,true;decelerate,2;zoomy,44;decelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH, 80);
self:diffuse(Color("Orange"));
self:visible(false);
end;
StartTransitioningCommand=function(self)
self:visible(true);
self:decelerate(2);
self:zoomy(44);
self:decelerate(0.5);
self:diffusealpha(0);
end;
};
LoadFont("Common Normal") .. {
Text="This is only the beginning...";
InitCommand=cmd(visible,false;shadowlength,1;shadowcolor,BoostColor(Color("Orange"),0.5));
StartTransitioningCommand=cmd(visible,true;zoom,0.75;fadeleft,1;faderight,1;linear,1;faderight,0;fadeleft,0;sleep,1;decelerate,0.5;y,12;diffusealpha,0);
InitCommand=function(self)
self:visible(false);
self:shadowlength(1);
self:shadowcolor(BoostColor(Color("Orange"),0.5));
end;
StartTransitioningCommand=function(self)
self:visible(true);
self:zoom(0.75);
self:fadeleft(1);
self:faderight(1);
self:linear(1);
self:faderight(0);
self:fadeleft(0);
self:sleep(1);
self:decelerate(0.5);
self:y(12);
self:diffusealpha(0);
end;
};
-- End
Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color("White");visible,false);
StartTransitioningCommand=cmd(visible,true;decelerate,1;diffusealpha,0);
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT);
self:diffuse(Color("White"));
self:visible(false);
end;
StartTransitioningCommand=function(self)
self:visible(true);
self:decelerate(1);
self:diffusealpha(0);
end;
};
};
@@ -6,13 +6,90 @@ assert( Height );
local FullFile = THEME:GetPathB('','_frame files 3x3/'..File )
local Frame = LoadActor( FullFile )
return Def.ActorFrame {
Frame .. { InitCommand=cmd(setstate,0;pause;horizalign,right;vertalign,bottom;x,-Width/2;y,-Height/2) };
Frame .. { InitCommand=cmd(setstate,1;pause;zoomtowidth,Width;vertalign,bottom;zoomtowidth,Width;y,-Height/2) };
Frame .. { InitCommand=cmd(setstate,2;pause;horizalign,left;vertalign,bottom;x,Width/2;y,-Height/2) };
Frame .. { InitCommand=cmd(setstate,3;pause;horizalign,right;x,-Width/2;zoomtoheight,Height) };
Frame .. { InitCommand=cmd(setstate,4;pause;zoomtowidth,Width;zoomtoheight,Height) };
Frame .. { InitCommand=cmd(setstate,5;pause;horizalign,left;x,Width/2;zoomtoheight,Height) };
Frame .. { InitCommand=cmd(setstate,6;pause;horizalign,right;vertalign,top;x,-Width/2;y,Height/2) };
Frame .. { InitCommand=cmd(setstate,7;pause;zoomtowidth,Width;vertalign,top;zoomtowidth,Width;y,Height/2) };
Frame .. { InitCommand=cmd(setstate,8;pause;horizalign,left;vertalign,top;x,Width/2;y,Height/2) };
Frame .. {
InitCommand=function(self)
self:setstate(0);
self:pause();
self:horizalign(right);
self:vertalign(bottom);
self:x(-Width / 2);
self:y(-Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(1);
self:pause();
self:zoomtowidth(Width);
self:vertalign(bottom);
self:zoomtowidth(Width);
self:y(-Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(2);
self:pause();
self:horizalign(left);
self:vertalign(bottom);
self:x(Width / 2);
self:y(-Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(3);
self:pause();
self:horizalign(right);
self:x(-Width / 2);
self:zoomtoheight(Height);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(4);
self:pause();
self:zoomtowidth(Width);
self:zoomtoheight(Height);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(5);
self:pause();
self:horizalign(left);
self:x(Width / 2);
self:zoomtoheight(Height);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(6);
self:pause();
self:horizalign(right);
self:vertalign(top);
self:x(-Width / 2);
self:y(Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(7);
self:pause();
self:zoomtowidth(Width);
self:vertalign(top);
self:zoomtowidth(Width);
self:y(Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(8);
self:pause();
self:horizalign(left);
self:vertalign(top);
self:x(Width / 2);
self:y(Height / 2);
end;
};
};
@@ -1,12 +1,4 @@
return Def.ActorFrame {
FOV=90;
--[[ LoadActor("shot") .. {
InitCommand=cmd(diffusealpha,0;zoom,2;blend,'BlendMode_Add');
MilestoneCommand=cmd(diffusealpha,0.75;rotationz,0;accelerate,2.5;diffusealpha,0;rotationz,360;zoom,2.5);
}; --]]
--[[ LoadActor("shot") .. {
InitCommand=cmd(diffusealpha,0;zoom,2;zoomx,-2;blend,'BlendMode_Add');
MilestoneCommand=cmd(diffusealpha,0.75;rotationz,-360;x,0;linear,2.5;diffusealpha,0;rotationz,0;zoom,2.5);
}; --]]
LoadActor(THEME:GetPathG("Combo","100Milestone"));
};
@@ -1,11 +1,35 @@
local ShowFlashyCombo = ThemePrefs.Get("FlashyCombo")
return Def.ActorFrame {
LoadActor("explosion") .. {
InitCommand=cmd(diffusealpha,0;blend,'BlendMode_Add';hide_if,not ShowFlashyCombo);
MilestoneCommand=cmd(rotationz,0;zoom,2;diffusealpha,0.5;linear,0.5;rotationz,90;zoom,1.75;diffusealpha,0);
};
LoadActor("explosion") .. {
InitCommand=cmd(diffusealpha,0;blend,'BlendMode_Add';hide_if,not ShowFlashyCombo);
MilestoneCommand=cmd(rotationz,0;zoom,2;diffusealpha,0.5;linear,0.5;rotationz,-90;zoom,2.5;diffusealpha,0);
};
local ShowFlashyCombo = ThemePrefs.Get("FlashyCombo")
return Def.ActorFrame {
LoadActor("explosion") .. {
InitCommand=function(self)
self:diffusealpha(0);
self:blend('BlendMode_Add');
self:hide_if(not ShowFlashyCombo);
end;
MilestoneCommand=function(self)
self:rotationz(0);
self:zoom(2);
self:diffusealpha(0.5);
self:linear(0.5);
self:rotationz(90);
self:zoom(1.75);
self:diffusealpha(0);
end;
};
LoadActor("explosion") .. {
InitCommand=function(self)
self:diffusealpha(0);
self:blend('BlendMode_Add');
self:hide_if(not ShowFlashyCombo);
end;
MilestoneCommand=function(self)
self:rotationz(0);
self:zoom(2);
self:diffusealpha(0.5);
self:linear(0.5);
self:rotationz(-90);
self:zoom(1.75);
self:diffusealpha(0);
end;
};
};
@@ -12,23 +12,22 @@ local grades = {
Grade_None = 8;
};
--[[ local t = LoadActor( "grades" ) .. {
InitCommand=cmd(pause);
SetGradeCommand=function(self, params)
local state = grades[params.Grade] or grades.Grade_None;
state = state*2;
if params.PlayerNumber == PLAYER_2 then
state = state+1;
end
self:setstate(state);
end;
}; --]]
local t = LoadFont("Common Normal") .. {
InitCommand=cmd(zoom,0.75;shadowlength,1;strokecolor,Color("Black"));
ShowCommand=cmd(stoptweening;bounceend,0.15;zoomy,0.75);
HideCommand=cmd(stoptweening;bouncebegin,0.15;zoomy,0);
InitCommand=function(self)
self:zoom(0.75);
self:shadowlength(1);
self:strokecolor(Color("Black"));
end;
ShowCommand=function(self)
self:stoptweening();
self:bounceend(0.15);
self:zoomy(0.75);
end;
HideCommand=function(self)
self:stoptweening();
self:bouncebegin(0.15);
self:zoomy(0);
end;
SetGradeCommand=function(self,params)
local pnPlayer = params.PlayerNumber;
local sGrade = params.Grade or 'Grade_None';
@@ -38,12 +37,6 @@ local t = LoadFont("Common Normal") .. {
self:diffuse(PlayerColor(pnPlayer));
self:diffusetopedge(BoostColor(PlayerColor(pnPlayer),1.5));
self:strokecolor(BoostColor(PlayerColor(pnPlayer),0.25));
--[[ if sGrade == "Grade_NoTier" then
self:playcommand("Hide");
else
self:playcommand("Show");
end; --]]
end;
};
+52 -12
View File
@@ -22,13 +22,25 @@ local function CreatePaneDisplayItem( _pnPlayer, _sLabel, _rcRadarCategory )
return Def.ActorFrame {
LoadFont("Common SemiBold") .. {
Text=string.upper( THEME:GetString("PaneDisplay",_sLabel) );
InitCommand=cmd(horizalign,left);
OnCommand=cmd(zoom,0.5875;diffuse,color("0.9,0.9,0.9");shadowlength,1);
InitCommand=function(self)
self:horizalign(left);
end;
OnCommand=function(self)
self:zoom(0.5875);
self:diffuse(color("0.9,0.9,0.9"));
self:shadowlength(1);
end;
};
LoadFont("Common Normal") .. {
Text=string.format("%04i", 0);
InitCommand=cmd(x,96;horizalign,right);
OnCommand=cmd(zoom,0.5875;shadowlength,1);
InitCommand=function(self)
self:x(96);
self:horizalign(right);
end;
OnCommand=function(self)
self:zoom(0.5875);
self:shadowlength(1);
end;
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set");
end;
@@ -64,16 +76,37 @@ local function CreatePaneDisplayGraph( _pnPlayer, _sLabel, _rcRadarCategory )
return Def.ActorFrame {
LoadFont("Common Normal") .. {
Text=_sLabel;
InitCommand=cmd(horizalign,left);
OnCommand=cmd(zoom,0.5;shadowlength,1);
InitCommand=function(self)
self:horizalign(left);
end;
OnCommand=function(self)
self:zoom(0.5);
self:shadowlength(1);
end;
};
Def.Quad {
InitCommand=cmd(x,12;zoomto,50,10;horizalign,left);
OnCommand=cmd(diffuse,Color("Black");shadowlength,1;diffusealpha,0.5);
InitCommand=function(self)
self:x(12);
self:zoomto(50, 10);
self:horizalign(left);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:shadowlength(1);
self:diffusealpha(0.5);
end;
};
Def.Quad {
InitCommand=cmd(x,12;zoomto,50,10;horizalign,left);
OnCommand=cmd(shadowlength,0;diffuse,Color("Green");diffusebottomedge,ColorLightTone(Color("Green")));
InitCommand=function(self)
self:x(12);
self:zoomto(50, 10);
self:horizalign(left);
end;
OnCommand=function(self)
self:shadowlength(0);
self:diffuse(Color("Green"));
self:diffusebottomedge(ColorLightTone(Color("Green")));
end;
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set");
end;
@@ -107,8 +140,15 @@ local function CreatePaneDisplayGraph( _pnPlayer, _sLabel, _rcRadarCategory )
end;
};
LoadFont("Common Normal") .. {
InitCommand=cmd(x,14;zoom,0.5;halign,0;);
OnCommand=cmd(shadowlength,1;strokecolor,color("0.15,0.15,0.15,0.625"));
InitCommand=function(self)
self:x(14);
self:zoom(0.5);
self:halign(0);
end;
OnCommand=function(self)
self:shadowlength(1);
self:strokecolor(color("0.15,0.15,0.15,0.625"));
end;
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set");
end;
+144 -158
View File
@@ -1,158 +1,144 @@
local c;
local cf;
local canAnimate = false;
local player = Var "Player";
local ShowComboAt = THEME:GetMetric("Combo", "ShowComboAt");
local Pulse = THEME:GetMetric("Combo", "PulseCommand");
local PulseLabel = THEME:GetMetric("Combo", "PulseLabelCommand");
local NumberMinZoom = THEME:GetMetric("Combo", "NumberMinZoom");
local NumberMaxZoom = THEME:GetMetric("Combo", "NumberMaxZoom");
local NumberMaxZoomAt = THEME:GetMetric("Combo", "NumberMaxZoomAt");
local LabelMinZoom = THEME:GetMetric("Combo", "LabelMinZoom");
local LabelMaxZoom = THEME:GetMetric("Combo", "LabelMaxZoom");
local ShowFlashyCombo = ThemePrefs.Get("FlashyCombo")
local t = Def.ActorFrame {
InitCommand=cmd(vertalign,bottom);
-- flashy combo elements:
LoadActor(THEME:GetPathG("Combo","100Milestone")) .. {
Name="OneHundredMilestone";
InitCommand=cmd(visible,ShowFlashyCombo);
FiftyMilestoneCommand=cmd(playcommand,"Milestone");
};
LoadActor(THEME:GetPathG("Combo","1000Milestone")) .. {
Name="OneThousandMilestone";
InitCommand=cmd(visible,ShowFlashyCombo);
ToastyAchievedMessageCommand=cmd(playcommand,"Milestone");
};
-- normal combo elements:
Def.ActorFrame {
Name="ComboFrame";
LoadFont( "Combo", "numbers" ) .. {
Name="Number";
OnCommand = THEME:GetMetric("Combo", "NumberOnCommand");
};
LoadActor("_combo")..{
Name="ComboLabel";
OnCommand = THEME:GetMetric("Combo", "ComboLabelOnCommand");
};
LoadActor("_misses")..{
Name="MissLabel";
OnCommand = THEME:GetMetric("Combo", "MissLabelOnCommand");
};
};
InitCommand = function(self)
c = self:GetChildren();
cf = c.ComboFrame:GetChildren();
cf.Number:visible(false);
cf.ComboLabel:visible(false)
cf.MissLabel:visible(false)
end;
-- Milestones:
-- 25,50,100,250,600 Multiples;
--[[ if (iCombo % 100) == 0 then
c.OneHundredMilestone:playcommand("Milestone");
elseif (iCombo % 250) == 0 then
-- It should really be 1000 but thats slightly unattainable, since
-- combo doesnt save over now.
c.OneThousandMilestone:playcommand("Milestone");
else
return
end; --]]
TwentyFiveMilestoneCommand=function(self,parent)
if ShowFlashyCombo then
(cmd(finishtweening;addy,-4;bounceend,0.125;addy,4))(self);
end;
end;
--]]
--[[
ToastyAchievedMessageCommand=function(self,params)
if params.PlayerNumber == player then
(cmd(thump,2;effectclock,'beat'))(c.ComboFrame);
end;
end;
ToastyDroppedMessageCommand=function(self,params)
if params.PlayerNumber == player then
(cmd(stopeffect))(c.ComboFrame);
end;
end; --]]
ComboCommand=function(self, param)
local iCombo = param.Misses or param.Combo;
if not iCombo or iCombo < ShowComboAt then
cf.Number:visible(false);
cf.ComboLabel:visible(false)
cf.MissLabel:visible(false)
return;
end
cf.ComboLabel:visible(false)
cf.MissLabel:visible(false)
param.Zoom = scale( iCombo, 0, NumberMaxZoomAt, NumberMinZoom, NumberMaxZoom );
param.Zoom = clamp( param.Zoom, NumberMinZoom, NumberMaxZoom );
param.LabelZoom = scale( iCombo, 0, NumberMaxZoomAt, LabelMinZoom, LabelMaxZoom );
param.LabelZoom = clamp( param.LabelZoom, LabelMinZoom, LabelMaxZoom );
if param.Combo then
cf.ComboLabel:visible(true)
cf.MissLabel:visible(false)
else
cf.ComboLabel:visible(false)
cf.MissLabel:visible(true)
end
cf.Number:visible(true);
cf.Number:settext( string.format("%i", iCombo) );
cf.Number:textglowmode("TextGlowMode_Stroke");
-- FullCombo Rewards
if param.FullComboW1 then
cf.Number:diffuse( GameColor.Judgment["JudgmentLine_W1"] );
cf.Number:strokecolor( GameColor.Judgment["JudgmentLine_W1"] );
cf.Number:textglowmode("TextGlowMode_Stroke");
cf.Number:glowshift();
elseif param.FullComboW2 then
cf.Number:diffuse( GameColor.Judgment["JudgmentLine_W2"] );
cf.Number:strokecolor( GameColor.Judgment["JudgmentLine_W2"] );
cf.Number:textglowmode("TextGlowMode_Stroke");
cf.Number:glowshift();
elseif param.FullComboW3 then
cf.Number:diffuse( GameColor.Judgment["JudgmentLine_W3"] );
cf.Number:strokecolor( GameColor.Judgment["JudgmentLine_W3"] );
cf.Number:textglowmode("TextGlowMode_Stroke");
cf.Number:glowshift();
elseif param.Combo then
-- Player 1's color is Red, which conflicts with the miss combo.
-- instead, just diffuse to white for now. -aj
--c.Number:diffuse(PlayerColor(player));
cf.Number:diffuse(Color("White"));
cf.Number:strokecolor(Color("Stealth"));
cf.Number:stopeffect();
else
cf.Number:diffuse(color("#ff0000"));
cf.Number:stopeffect();
end
-- Pulse
Pulse( cf.Number, param );
if param.Combo then
PulseLabel( cf.ComboLabel, param );
else
PulseLabel( cf.MissLabel, param );
end
-- Milestone Logic
end;
--[[ ScoreChangedMessageCommand=function(self,param)
local iToastyCombo = param.ToastyCombo;
if iToastyCombo and (iToastyCombo > 0) then
-- (cmd(thump;effectmagnitude,1,1.2,1;effectclock,'beat'))(c.Number)
-- (cmd(thump;effectmagnitude,1,1.2,1;effectclock,'beat'))(c.Number)
else
-- c.Number:stopeffect();
end;
end; --]]
};
return t;
local c;
local cf;
local canAnimate = false;
local player = Var "Player";
local ShowComboAt = THEME:GetMetric("Combo", "ShowComboAt");
local Pulse = THEME:GetMetric("Combo", "PulseCommand");
local PulseLabel = THEME:GetMetric("Combo", "PulseLabelCommand");
local NumberMinZoom = THEME:GetMetric("Combo", "NumberMinZoom");
local NumberMaxZoom = THEME:GetMetric("Combo", "NumberMaxZoom");
local NumberMaxZoomAt = THEME:GetMetric("Combo", "NumberMaxZoomAt");
local LabelMinZoom = THEME:GetMetric("Combo", "LabelMinZoom");
local LabelMaxZoom = THEME:GetMetric("Combo", "LabelMaxZoom");
local ShowFlashyCombo = ThemePrefs.Get("FlashyCombo")
local t = Def.ActorFrame {
InitCommand=function(self)
self:vertalign(bottom);
end;
-- flashy combo elements:
LoadActor(THEME:GetPathG("Combo","100Milestone")) .. {
Name="OneHundredMilestone";
InitCommand=function(self)
self:visible(ShowFlashyCombo);
end;
FiftyMilestoneCommand=function(self)
self:playcommand("Milestone");
end;
};
LoadActor(THEME:GetPathG("Combo","1000Milestone")) .. {
Name="OneThousandMilestone";
InitCommand=function(self)
self:visible(ShowFlashyCombo);
end;
ToastyAchievedMessageCommand=function(self)
self:playcommand("Milestone");
end;
};
-- normal combo elements:
Def.ActorFrame {
Name="ComboFrame";
LoadFont( "Combo", "numbers" ) .. {
Name="Number";
OnCommand = THEME:GetMetric("Combo", "NumberOnCommand");
};
LoadActor("_combo")..{
Name="ComboLabel";
OnCommand = THEME:GetMetric("Combo", "ComboLabelOnCommand");
};
LoadActor("_misses")..{
Name="MissLabel";
OnCommand = THEME:GetMetric("Combo", "MissLabelOnCommand");
};
};
InitCommand = function(self)
c = self:GetChildren();
cf = c.ComboFrame:GetChildren();
cf.Number:visible(false);
cf.ComboLabel:visible(false)
cf.MissLabel:visible(false)
end;
-- Milestones:
-- 25,50,100,250,600 Multiples;
TwentyFiveMilestoneCommand=function(self,parent)
if ShowFlashyCombo then
self:finishtweening();
self:addy(-4);
self:bounceend(0.125);
self:addy(4);
end;
end;
ComboCommand=function(self, param)
local iCombo = param.Misses or param.Combo;
if not iCombo or iCombo < ShowComboAt then
cf.Number:visible(false);
cf.ComboLabel:visible(false)
cf.MissLabel:visible(false)
return;
end
cf.ComboLabel:visible(false)
cf.MissLabel:visible(false)
param.Zoom = scale( iCombo, 0, NumberMaxZoomAt, NumberMinZoom, NumberMaxZoom );
param.Zoom = clamp( param.Zoom, NumberMinZoom, NumberMaxZoom );
param.LabelZoom = scale( iCombo, 0, NumberMaxZoomAt, LabelMinZoom, LabelMaxZoom );
param.LabelZoom = clamp( param.LabelZoom, LabelMinZoom, LabelMaxZoom );
if param.Combo then
cf.ComboLabel:visible(true)
cf.MissLabel:visible(false)
else
cf.ComboLabel:visible(false)
cf.MissLabel:visible(true)
end
cf.Number:visible(true);
cf.Number:settext( string.format("%i", iCombo) );
cf.Number:textglowmode("TextGlowMode_Stroke");
-- FullCombo Rewards
if param.FullComboW1 then
cf.Number:diffuse( GameColor.Judgment["JudgmentLine_W1"] );
cf.Number:strokecolor( GameColor.Judgment["JudgmentLine_W1"] );
cf.Number:textglowmode("TextGlowMode_Stroke");
cf.Number:glowshift();
elseif param.FullComboW2 then
cf.Number:diffuse( GameColor.Judgment["JudgmentLine_W2"] );
cf.Number:strokecolor( GameColor.Judgment["JudgmentLine_W2"] );
cf.Number:textglowmode("TextGlowMode_Stroke");
cf.Number:glowshift();
elseif param.FullComboW3 then
cf.Number:diffuse( GameColor.Judgment["JudgmentLine_W3"] );
cf.Number:strokecolor( GameColor.Judgment["JudgmentLine_W3"] );
cf.Number:textglowmode("TextGlowMode_Stroke");
cf.Number:glowshift();
elseif param.Combo then
-- Player 1's color is Red, which conflicts with the miss combo.
-- instead, just diffuse to white for now. -aj
--c.Number:diffuse(PlayerColor(player));
cf.Number:diffuse(Color("White"));
cf.Number:strokecolor(Color("Stealth"));
cf.Number:stopeffect();
else
cf.Number:diffuse(color("#ff0000"));
cf.Number:stopeffect();
end
-- Pulse
Pulse( cf.Number, param );
if param.Combo then
PulseLabel( cf.ComboLabel, param );
else
PulseLabel( cf.MissLabel, param );
end
-- Milestone Logic
end;
};
return t;
@@ -56,7 +56,10 @@ local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
LoadActor(THEME:GetPathG("Judgment","Normal")) .. {
Name="Judgment";
InitCommand=cmd(pause;visible,false);
InitCommand=function(self)
self:pause();
self:visible(false);
end;
OnCommand=THEME:GetMetric("Judgment","JudgmentOnCommand");
ResetCommand=function(self)
self:finishtweening();
@@ -67,7 +70,9 @@ t[#t+1] = Def.ActorFrame {
LoadFont("Combo Numbers") .. {
Name="ProtimingDisplay";
Text="";
InitCommand=cmd(visible,false);
InitCommand=function(self)
self:visible(false);
end;
OnCommand=THEME:GetMetric("Protiming","ProtimingOnCommand");
ResetCommand=function(self)
self:finishtweening();
@@ -78,7 +83,9 @@ t[#t+1] = Def.ActorFrame {
LoadFont("Common Normal") .. {
Name="ProtimingAverage";
Text="";
InitCommand=cmd(visible,false);
InitCommand=function(self)
self:visible(false);
end;
OnCommand=THEME:GetMetric("Protiming","AverageOnCommand");
ResetCommand=function(self)
self:finishtweening();
@@ -89,7 +96,9 @@ t[#t+1] = Def.ActorFrame {
LoadFont("Common Normal") .. {
Name="TextDisplay";
Text=THEME:GetString("Protiming","MS");
InitCommand=cmd(visible,false);
InitCommand=function(self)
self:visible(false);
end;
OnCommand=THEME:GetMetric("Protiming","TextOnCommand");
ResetCommand=function(self)
self:finishtweening();
@@ -99,79 +108,148 @@ t[#t+1] = Def.ActorFrame {
};
Def.Quad {
Name="ProtimingGraphBG";
InitCommand=cmd(visible,false;y,32;zoomto,ProtimingWidth,16);
ResetCommand=cmd(finishtweening;diffusealpha,0.8;visible,false);
OnCommand=cmd(diffuse,Color("Black");diffusetopedge,color("0.1,0.1,0.1,1");diffusealpha,0.8;shadowlength,2;);
InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(ProtimingWidth, 16);
end;
ResetCommand=function(self)
self:finishtweening();
self:diffusealpha(0.8);
self:visible(false);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:diffusetopedge(color("0.1,0.1,0.1,1"));
self:diffusealpha(0.8);
self:shadowlength(2);
end;
};
Def.Quad {
Name="ProtimingGraphWindowW3";
InitCommand=cmd(visible,false;y,32;zoomto,ProtimingWidth-4,16-4);
InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(ProtimingWidth - 4, 16 - 4);
end;
ResetCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:visible(false);
end;
OnCommand=cmd(diffuse,GameColor.Judgment["JudgmentLine_W3"];);
OnCommand=function(self)
self:diffuse(GameColor.Judgment["JudgmentLine_W3"]);
end;
};
Def.Quad {
Name="ProtimingGraphWindowW2";
InitCommand=cmd(visible,false;y,32;zoomto,scale(PREFSMAN:GetPreference("TimingWindowSecondsW2"),0,PREFSMAN:GetPreference("TimingWindowSecondsW3"),0,ProtimingWidth-4),16-4);
InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(scale(
PREFSMAN:GetPreference("TimingWindowSecondsW2"),
0,
PREFSMAN:GetPreference("TimingWindowSecondsW3"),
0,
ProtimingWidth-4),16-4);
end;
ResetCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:visible(false);
end;
OnCommand=cmd(diffuse,GameColor.Judgment["JudgmentLine_W2"];);
OnCommand=function(self)
self:diffuse(GameColor.Judgment["JudgmentLine_W2"]);
end;
};
Def.Quad {
Name="ProtimingGraphWindowW1";
InitCommand=cmd(visible,false;y,32;zoomto,scale(PREFSMAN:GetPreference("TimingWindowSecondsW1"),0,PREFSMAN:GetPreference("TimingWindowSecondsW3"),0,ProtimingWidth-4),16-4);
InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(scale(
PREFSMAN:GetPreference("TimingWindowSecondsW1"),
0,
PREFSMAN:GetPreference("TimingWindowSecondsW3"),
0,
ProtimingWidth-4),16-4);
end;
ResetCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:visible(false);
end;
OnCommand=cmd(diffuse,GameColor.Judgment["JudgmentLine_W1"];);
OnCommand=function(self)
self:diffuse(GameColor.Judgment["JudgmentLine_W1"]);
end;
};
Def.Quad {
Name="ProtimingGraphUnderlay";
InitCommand=cmd(visible,false;y,32;zoomto,ProtimingWidth-4,16-4);
InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(ProtimingWidth-4,16-4);
end;
ResetCommand=function(self)
self:finishtweening();
self:diffusealpha(0.25);
self:visible(false);
end;
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25);
OnCommand=function(self)
self:diffuse(Color("Black"));
self:diffusealpha(0.25);
end;
};
Def.Quad {
Name="ProtimingGraphFill";
InitCommand=cmd(visible,false;y,32;zoomto,0,16-4;horizalign,left;);
InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(0,16-4);
self:horizalign(left);
end;
ResetCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:visible(false);
end;
OnCommand=cmd(diffuse,Color("Red"););
OnCommand=function(self)
self:diffuse(Color("Red"));
end;
};
Def.Quad {
Name="ProtimingGraphAverage";
InitCommand=cmd(visible,false;y,32;zoomto,2,7;);
InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(2,7);
end;
ResetCommand=function(self)
self:finishtweening();
self:diffusealpha(0.85);
self:visible(false);
end;
OnCommand=cmd(diffuse,Color("Orange");diffusealpha,0.85);
OnCommand=function(self)
self:diffuse(Color("Orange"));
self:diffusealpha(0.85);
end;
};
Def.Quad {
Name="ProtimingGraphCenter";
InitCommand=cmd(visible,false;y,32;zoomto,2,16-4;);
InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(2,16-4);
end;
ResetCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:visible(false);
end;
OnCommand=cmd(diffuse,Color("White");diffusealpha,1);
OnCommand=function(self)
self:diffuse(Color("White"));
self:diffusealpha(1);
end;
};
InitCommand = function(self)
c = self:GetChildren();
@@ -1,34 +1,57 @@
local Player = ...
assert(Player);
local HasToasty = false;
local fWidth = ( GAMESTATE:GetCurrentStyle():GetStyleType() == 'StyleType_OnePlayerTwoSides' ) and 600 or 256+16;
return Def.ActorFrame {
ToastyAchievedMessageCommand=function(self,params)
if params.PlayerNumber == Player then
(cmd(thump,1;effectclock,'beat';effectmagnitude,1,1,1;
effectcolor1,color("1,1.125,1,1");effectcolor2,color("1,1,1,1")))(self);
end
end;
Def.Quad {
InitCommand=cmd(zoomto,fWidth,SCREEN_HEIGHT;diffuse,PlayerColor(Player);diffusealpha,0;fadeleft,32/(256+16);faderight,32/(256+16));
ToastyAchievedMessageCommand=function(self,params)
if params.PlayerNumber == Player then
(cmd(stoptweening;linear,2.125;diffuse,Color.Alpha( PlayerColor(Player), 0.345 );glow,color("1,1,1,0.5");decelerate,3;glow,Color.Alpha( ColorDarkTone( PlayerColor(Player) ), 0 );diffuseramp;
effectcolor1,ColorLightTone( PlayerColor(Player) );effectcolor2,PlayerColor(Player);
effectclock,'beat';effectperiod,2;
))(self);
HasToasty = true;
end
end;
ToastyDroppedMessageCommand=function(self,params)
if params.PlayerNumber == Player then
if HasToasty then
(cmd(finishtweening;stopeffect;glow,color("1,1,1,0.5");decelerate,0.35;diffuse,Color.Alpha( Color("Black"), 0.25 );glow,color("1,1,1,0");linear,0.35*0.25;diffusealpha,0))(self);
HasToasty = false;
else
return
end
end
end;
};
local Player = ...
assert(Player);
local HasToasty = false;
local fWidth = ( GAMESTATE:GetCurrentStyle():GetStyleType() == 'StyleType_OnePlayerTwoSides' ) and 600 or 256+16;
return Def.ActorFrame {
ToastyAchievedMessageCommand=function(self,params)
if params.PlayerNumber == Player then
self:thump(1);
self:effectclock('beat');
self:effectmagnitude(1, 1, 1);
self:effectcolor1(color("1,1.125,1,1"));
self:effectcolor2(color("1,1,1,1"));
end
end;
Def.Quad {
InitCommand=function(self)
self:zoomto(fWidth, SCREEN_HEIGHT);
self:diffuse(PlayerColor(Player));
self:diffusealpha(0);
self:fadeleft(32 / (256 + 16));
self:faderight(32 / (256 + 16));
end;
ToastyAchievedMessageCommand=function(self,params)
if params.PlayerNumber == Player then
self:stoptweening();
self:linear(2.125);
self:diffuse(Color.Alpha( PlayerColor(Player), 0.345 ));
self:glow(color("1,1,1,0.5"));
self:decelerate(3);
self:glow(Color.Alpha( ColorDarkTone( PlayerColor(Player) ), 0 ));
self:diffuseramp();
self:effectcolor1(ColorLightTone( PlayerColor(Player) ));
self:effectcolor2(PlayerColor(Player));
self:effectclock('beat');
self:effectperiod(2);
HasToasty = true;
end
end;
ToastyDroppedMessageCommand=function(self,params)
if params.PlayerNumber == Player then
if HasToasty then
self:finishtweening();
self:stopeffect();
self:glow(color("1,1,1,0.5"));
self:decelerate(0.35);
self:diffuse(Color.Alpha( Color("Black"), 0.25 ));
self:glow(color("1,1,1,0"));
self:linear(0.35 * 0.25);
self:diffusealpha(0);
HasToasty = false;
else
return
end
end
end;
};
};
@@ -1,20 +1,35 @@
return Def.ActorFrame {
LoadFont("Common Normal") .. {
Name="TextTitle";
InitCommand=cmd(y,-16.5;zoom,0.875;maxwidth,256/0.875;);
OnCommand=cmd(shadowlength,1);
-- TickCommand=cmd(finishtweening;diffusealpha,0;addx,-10;zoomx,1.25;zoomy,0;decelerate,0.25;diffusealpha,1;addx,10;zoom,1;sleep,0;glow,Color("White");decelerate,0.275;glow,Color("Invisible"));
InitCommand=function(self)
self:y(-16.5);
self:zoom(0.875);
self:maxwidth(256/0.875);
end;
OnCommand=function(self)
self:shadowlength(1);
end;
};
LoadFont("Common Normal") .. {
Name="TextSubtitle";
InitCommand=cmd(zoom,0.5;maxwidth,256/0.5);
OnCommand=cmd(shadowlength,1);
-- TickCommand=cmd(finishtweening;diffusealpha,0;addy,-10;addx,10;decelerate,0.25;diffusealpha,1;addy,10;addx,-10);
InitCommand=function(self)
self:zoom(0.5);
self:maxwidth(256/0.5);
end;
OnCommand=function(self)
self:shadowlength(1);
end;
};
LoadFont("Common Normal") .. {
Name="TextArtist";
InitCommand=cmd(y,18;zoom,0.75;maxwidth,256/0.75);
OnCommand=cmd(shadowlength,1;skewx,-0.2);
-- TickCommand=cmd(finishtweening;diffusealpha,0;addy,10;addx,10;decelerate,0.25;diffusealpha,1;addy,-10;addx,-10);
InitCommand=function(self)
self:y(18);
self:zoom(0.75);
self:maxwidth(256/0.75);
end;
OnCommand=function(self)
self:shadowlength(1);
self:skewx(-0.2);
end;
};
};
@@ -1,96 +1,100 @@
-- check if players are playing steps with different timingdata.
local numPlayers = GAMESTATE:GetNumPlayersEnabled()
local function UpdateSingleBPM(self)
local bpmDisplay = self:GetChild("BPMDisplay")
local pn = GAMESTATE:GetMasterPlayerNumber()
local pState = GAMESTATE:GetPlayerState(pn);
local songPosition = pState:GetSongPosition()
local bpm = songPosition:GetCurBPS() * 60
bpmDisplay:settext( string.format("%03.2f",bpm) )
end
local displaySingle = Def.ActorFrame{
-- manual bpm display
LoadFont("BPMDisplay", "bpm")..{
Name="BPMDisplay";
InitCommand=cmd(zoom,0.675;shadowlength,1);
};
--[[
Def.SongBPMDisplay {
File=THEME:GetPathF("BPMDisplay", "bpm");
Name="BPMDisplay";
InitCommand=cmd(zoom,0.675;shadowlength,1);
SetCommand=function(self) self:SetFromGameState() end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
};
--]]
};
displaySingle.InitCommand=cmd(SetUpdateFunction,UpdateSingleBPM);
if numPlayers == 1 then
return displaySingle
else
-- check if both players are playing the same steps
local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
if not stepsP1 or not stepsP2 then
return displaySingle
end
local stP1 = stepsP1:GetStepsType()
local stP2 = stepsP2:GetStepsType()
local diffP1 = stepsP1:GetDifficulty()
local diffP2 = stepsP2:GetDifficulty()
-- get timing data...
local timingP1 = stepsP1:GetTimingData()
local timingP2 = stepsP2:GetTimingData()
--if stP1 == stP2 and diffP1 == diffP2 then
if timingP1 == timingP2 then
-- both players are steps with the same TimingData; only need one.
return displaySingle
end
-- otherwise, we have some more work to do.
local function Update2PBPM(self)
local dispP1 = self:GetChild("DisplayP1")
local dispP2 = self:GetChild("DisplayP2")
-- needs current bpm for p1 and p2
for pn in ivalues(PlayerNumber) do
local bpmDisplay = (pn == PLAYER_1) and dispP1 or dispP2
local pState = GAMESTATE:GetPlayerState(pn);
local songPosition = pState:GetSongPosition()
local bpm = songPosition:GetCurBPS() * 60
bpmDisplay:settext( string.format("%03.2f",bpm) )
end
end
local playerOffset = 36 -- was 28
local displayTwoPlayers = Def.ActorFrame{
-- manual bpm displays
LoadFont("BPMDisplay", "bpm")..{
Name="DisplayP1";
InitCommand=cmd(x,-playerOffset;zoom,0.6;shadowlength,1);
};
LoadFont("BPMDisplay", "bpm")..{
Name="DisplayP2";
InitCommand=cmd(x,playerOffset;zoom,0.6;shadowlength,1);
};
};
displayTwoPlayers.InitCommand=cmd(SetUpdateFunction,Update2PBPM);
return displayTwoPlayers
end
-- should not get here
-- check if players are playing steps with different timingdata.
local numPlayers = GAMESTATE:GetNumPlayersEnabled()
local function UpdateSingleBPM(self)
local bpmDisplay = self:GetChild("BPMDisplay")
local pn = GAMESTATE:GetMasterPlayerNumber()
local pState = GAMESTATE:GetPlayerState(pn);
local songPosition = pState:GetSongPosition()
local bpm = songPosition:GetCurBPS() * 60
bpmDisplay:settext( string.format("%03.2f",bpm) )
end
local displaySingle = Def.ActorFrame{
-- manual bpm display
LoadFont("BPMDisplay", "bpm")..{
Name="BPMDisplay";
InitCommand=function(self)
self:zoom(0.675);
self:shadowlength(1);
end;
};
};
displaySingle.InitCommand=function(self)
self:SetUpdateFunction(UpdateSingleBPM);
end;
if numPlayers == 1 then
return displaySingle
else
-- check if both players are playing the same steps
local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
if not stepsP1 or not stepsP2 then
return displaySingle
end
local stP1 = stepsP1:GetStepsType()
local stP2 = stepsP2:GetStepsType()
local diffP1 = stepsP1:GetDifficulty()
local diffP2 = stepsP2:GetDifficulty()
-- get timing data...
local timingP1 = stepsP1:GetTimingData()
local timingP2 = stepsP2:GetTimingData()
--if stP1 == stP2 and diffP1 == diffP2 then
if timingP1 == timingP2 then
-- both players are steps with the same TimingData; only need one.
return displaySingle
end
-- otherwise, we have some more work to do.
local function Update2PBPM(self)
local dispP1 = self:GetChild("DisplayP1")
local dispP2 = self:GetChild("DisplayP2")
-- needs current bpm for p1 and p2
for pn in ivalues(PlayerNumber) do
local bpmDisplay = (pn == PLAYER_1) and dispP1 or dispP2
local pState = GAMESTATE:GetPlayerState(pn);
local songPosition = pState:GetSongPosition()
local bpm = songPosition:GetCurBPS() * 60
bpmDisplay:settext( string.format("%03.2f",bpm) )
end
end
local playerOffset = 36 -- was 28
local displayTwoPlayers = Def.ActorFrame{
-- manual bpm displays
LoadFont("BPMDisplay", "bpm")..{
Name="DisplayP1";
InitCommand=function(self)
self:x(-playerOffset);
self:zoom(0.6);
self:shadowlength(1);
end;
};
LoadFont("BPMDisplay", "bpm")..{
Name="DisplayP2";
InitCommand=function(self)
self:x(playerOffset);
self:zoom(0.6);
self:shadowlength(1);
end;
};
};
displayTwoPlayers.InitCommand=function(self)
self:SetUpdateFunction(Update2PBPM);
end;
return displayTwoPlayers
end
-- should not get here
-- return Def.ActorFrame{}
@@ -3,14 +3,40 @@ local squareSize = 8; -- was 18
return Def.ActorFrame {
Def.Quad{
InitCommand=cmd(x,-12;zoom,squareSize;rotationz,45;diffuse,color("#222222"));
GainFocusCommand=cmd(stoptweening;accelerate,0.25;zoom,squareSize;rotationz,45;);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;zoom,0;rotationz,360+45);
InitCommand=function(self)
self:x(-12);
self:zoom(squareSize);
self:rotationz(45);
self:diffuse(color("#222222"));
end;
GainFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.25);
self:zoom(squareSize);
self:rotationz(45);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:zoom(0);
self:rotationz(360+45);
end;
};
LoadFont("Common Normal") .. {
Text=gc:GetText();
InitCommand=cmd(halign,0;zoom,0.625);
GainFocusCommand=cmd(stoptweening;decelerate,0.25;diffuse,color("1,1,1,1"));
LoseFocusCommand=cmd(stoptweening;accelerate,0.25;diffuse,color("0.5,0.5,0.5,1"));
InitCommand=function(self)
self:halign(0);
self:zoom(0.625);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffuse(color("1,1,1,1"));
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.25);
self:diffuse(color("0.5,0.5,0.5,1"));
end;
};
};
@@ -1,10 +1,33 @@
return LoadFont("Common Normal") .. {
Text=ScreenString("Exit");
InitCommand=cmd(x,SCREEN_CENTER_X;zoom,0.75;shadowlength,0;diffuse,color("#880000");NoStroke);
OnCommand=cmd(diffusealpha,0;decelerate,0.5;diffusealpha,1);
OffCommand=cmd(stoptweening;accelerate,0.3;diffusealpha,0;queuecommand,"Hide");
HideCommand=cmd(visible,false);
GainFocusCommand=cmd(diffuseshift;effectcolor1,color("#FF2222");effectcolor2,color("#880000"););
LoseFocusCommand=cmd(stopeffect);
};
return LoadFont("Common Normal") .. {
Text=ScreenString("Exit");
InitCommand=function(self)
self:x(SCREEN_CENTER_X);
self:zoom(0.75);
self:shadowlength(0);
self:diffuse(color("#880000"));
self:NoStroke();
end;
OnCommand=function(self)
self:diffusealpha(0);
self:decelerate(0.5);
self:diffusealpha(1);
end;
OffCommand=function(self)
self:stoptweening();
self:accelerate(0.3);
self:diffusealpha(0);
self:queuecommand("Hide");
end;
HideCommand=function(self)
self:visible(false);
end;
GainFocusCommand=function(self)
self:diffuseshift();
self:effectcolor1(color("#FF2222"));
self:effectcolor2(color("#880000"));
end;
LoseFocusCommand=function(self)
self:stopeffect();
end;
};
@@ -5,32 +5,80 @@ local c = {};
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
Condition=( gc:GetName() ~= "Back" );
InitCommand=cmd(x,c.X;y,c.Y);
GainFocusCommand=cmd(finishtweening;zoom,1.125;bounceend,0.125;zoom,1);
LoseFocusCommand=cmd(stoptweening;linear,0.125;zoom,0.875);
InitCommand=function(self)
self:x(c.X);
self:y(c.Y);
end;
GainFocusCommand=function(self)
self:finishtweening();
self:zoom(1.125);
self:bounceend(0.125);
self:zoom(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.125);
self:zoom(0.875);
LoadActor("_base") .. {
GainFocusCommand=cmd(stoptweening;linear,0.125;diffuse,Color("Orange");diffusetopedge,Color("Yellow"));
LoseFocusCommand=cmd(stoptweening;linear,0.125;diffuse,Color("White"));
GainFocusCommand=function(self)
self:stoptweening();
self:linear(0.125);
self:diffuse(Color("Orange"));
self:diffusetopedge(Color("Yellow"));
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.125);
self:diffuse(Color("White"));
end;
};
LoadFont("Common Normal") .. {
Text=gc:GetName();
InitCommand=cmd(strokecolor,Color("White"));
OnCommand=cmd(diffuse,Color("Black"));
InitCommand=function(self)
self:strokecolor(Color("White"));
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
end;
};
};
t[#t+1] = Def.ActorFrame {
Condition=( gc:GetName() == "Back" );
InitCommand=cmd(x,c.X;y,c.Y);
GainFocusCommand=cmd(finishtweening;zoom,1.125;bounceend,0.125;zoom,1);
LoseFocusCommand=cmd(stoptweening;linear,0.125;zoom,0.875);
InitCommand=function(self)
self:x(c.X);
self:y(c.Y);
end;
GainFocusCommand=function(self)
self:finishtweening();
self:zoom(1.125);
self:bounceend(0.125);
self:zoom(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.125);
self:zoom(0.875);
end;
LoadActor("_base") .. {
GainFocusCommand=cmd(stoptweening;linear,0.125;diffuse,Color("Red"));
LoseFocusCommand=cmd(stoptweening;linear,0.125;diffuse,Color("White"));
GainFocusCommand=function(self)
self:stoptweening();
self:linear(0.125);
self:diffuse(Color("Red"));
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.125);
self:diffuse(Color("White"));
end;
};
LoadFont("Common Normal") .. {
Text=gc:GetName();
InitCommand=cmd(strokecolor,Color("White"));
OnCommand=cmd(diffuse,Color("Black"));
InitCommand=function(self)
self:strokecolor(Color("White"));
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
end;
};
};
@@ -1,43 +1,61 @@
return Def.CourseContentsList {
MaxSongs = 4;
NumItemsToDraw = 8; -- xxx: Doesn't scroll anymore.
--[[ InitCommand=cmd(x,SCREEN_CENTER_X+160;y,SCREEN_CENTER_Y+91);
OnCommand=cmd(zoomy,0;bounceend,0.3;zoom,1);
OffCommand=cmd(zoomy,1;bouncebegin,0.3;zoomy,0); --]]
ShowCommand=cmd(bouncebegin,0.3;zoomy,1);
HideCommand=cmd(linear,0.3;zoomy,0);
ShowCommand=function(self)
self:bouncebegin(0.3);
self:zoomy(1);
end;
HideCommand=function(self)
self:linear(0.3);
self:zoomy(0);
end;
SetCommand=function(self)
self:SetFromGameState();
self:PositionItems();
self:SetTransformFromHeight(44);
self:SetCurrentAndDestinationItem(0);
-- self:SetDestinationItem( self:GetNumItems()-2 );
self:SetLoop(false);
self:SetMask(270,0);
end;
CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
CurrentTrailP1ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
CurrentTrailP2ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
Display = Def.ActorFrame {
InitCommand=cmd(setsize,270,44);
InitCommand=function(self)
self:setsize(270,44);
end;
LoadActor(THEME:GetPathG("CourseEntryDisplay","bar")) .. {
-- InitCommand=cmd(diffusetopedge,Color("Invisible"));
SetSongCommand=function(self, params)
if params.Difficulty then
-- self:diffuse( SONGMAN:GetSongColor(params.Song) );
self:diffuse( CustomDifficultyToColor(params.Difficulty) );
else
self:diffuse( color("#FFFFFF") );
-- self:diffuse( CustomDifficultyToColor(params.Difficulty) );
end
(cmd(finishtweening;diffusealpha,0;sleep,0.125*params.Number;linear,0.125;diffusealpha,1;linear,0.05;glow,color("1,1,1,0.5");decelerate,0.1;glow,color("1,1,1,0")))(self);
self:finishtweening();
self:diffusealpha(0);
self:sleep(0.125 * params.Number);
self:linear(0.125);
self:diffusealpha(1);
self:linear(0.05);
self:glow(color("1,1,1,0.5"));
self:decelerate(0.1);
self:glow(color("1,1,1,0"));
end;
};
Def.TextBanner {
InitCommand=cmd(x,-128;y,1;Load,"TextBanner";SetFromString,"", "", "", "", "", "");
InitCommand=function(self)
self:x(-128);
self:y(1);
self:Load("TextBanner");
self:SetFromString("", "", "", "", "", "");
end;
SetSongCommand=function(self, params)
if params.Song then
if GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() == "Abomination" then
@@ -57,48 +75,45 @@ return Def.CourseContentsList {
self:SetFromSong( params.Song );
end;
self:diffuse( CustomDifficultyToColor(params.Difficulty) );
-- self:glow("1,1,1,0.5");
else
self:SetFromString( "??????????", "??????????", "", "", "", "" );
self:diffuse( color("#FFFFFF") );
-- self:glow("1,1,1,0");
end
(cmd(finishtweening;zoomy,0;sleep,0.125*params.Number;linear,0.125;zoomy,1.1;linear,0.05;zoomx,1.1;decelerate,0.1;zoom,1))(self);
self:finishtweening();
self:zoomy(0);
self:sleep(0.125 * params.Number);
self:linear(0.125);
self:zoomy(1.1);
self:linear(0.05);
self:zoomx(1.1);
self:decelerate(0.1);
self:zoom(1);
end;
};
--[[ LoadFont("CourseEntryDisplay","number") .. {
InitCommand=cmd(x,114+8;y,-12;shadowlength,1);
SetSongCommand=function(self, params)
self:settext(string.format("#%i", params.Number));
(cmd(finishtweening;zoom,0.5;zoomy,0.5*1.5;diffusealpha,0;sleep,0.125*params.Number;linear,0.125;diffusealpha,1;linear,0.05;zoomy,0.5*1;zoomx,0.5*1.1;glow,color("1,1,1,0.5");decelerate,0.1;zoom,0.5;glow,color("1,1,1,0")))(self);
end;
}; --]]
LoadFont("CourseEntryDisplay","difficulty") .. {
Text="0";
InitCommand=cmd(x,114;y,0;zoom,0.75;shadowlength,1);
InitCommand=function(self)
self:x(114);
self:y(0);
self:zoom(0.75);
self:shadowlength(1);
end;
SetSongCommand=function(self, params)
if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end
self:settext( params.Meter );
self:diffuse( CustomDifficultyToColor(params.Difficulty) );
(cmd(finishtweening;zoomy,0;sleep,0.125*params.Number;linear,0.125;zoomy,1.1;linear,0.05;zoomx,1.1;decelerate,0.1;zoom,1))(self);
self:finishtweening();
self:zoomy(0);
self:sleep(0.125 * params.Number);
self:linear(0.125);
self:zoomy(1.1);
self:linear(0.05);
self:zoomx(1.1);
self:decelerate(0.1);
self:zoom(1);
end;
};
--[[ LoadFont("Common","normal") .. {
OnCommand=cmd(x,0;y,-8;zoom,0.7;shadowlength,0);
DifficultyChangedCommand=function(self, params)
if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end
self:settext( params.Meter );
self:diffuse( CourseDifficultyColors[params.Difficulty] );
end;
}; --]]
--[[ LoadFont("Common","normal") .. {
OnCommand=cmd(x,SCREEN_CENTER_X-192;y,SCREEN_CENTER_Y-230;horizalign,right;shadowlength,0);
SetSongCommand=function(self, params) self:settext(params.Modifiers); end;
}; --]]
};
};
@@ -60,20 +60,45 @@ for idx,diff in pairs(Difficulty) do
c.Meter:settext( meter );
self:playcommand( bHasStepsTypeAndDifficulty and "Show" or "Hide" );
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set");
end;
--
LoadActor("_barpeice " .. sDifficulty ) .. {
Name="BarPeice";
ShowCommand=cmd(stoptweening;linear,0.1;diffuse,CustomDifficultyToColor( sDifficulty ));
HideCommand=cmd(stoptweening;decelerate,0.05;diffuse,CustomDifficultyToDarkColor( sDifficulty ));
InitCommand=cmd(diffuse,CustomDifficultyToColor( sDifficulty ));
ShowCommand=function(self)
self:stoptweening();
self:linear(0.1);
self:diffuse(CustomDifficultyToColor( sDifficulty ));
end;
HideCommand=function(self)
self:stoptweening();
self:decelerate(0.05);
self:diffuse(CustomDifficultyToDarkColor( sDifficulty ));
end;
InitCommand=function(self)
self:diffuse(CustomDifficultyToColor( sDifficulty ));
end;
};
LoadFont("StepsDisplay","Meter") .. {
Name="Meter";
Text=(sDifficulty == "Edit") and "0 Edits" or "0";
ShowCommand=cmd(stoptweening;linear,0.1;diffuse,CustomDifficultyToColor( sDifficulty ));
HideCommand=cmd(stoptweening;decelerate,0.05;diffuse,CustomDifficultyToDarkColor( sDifficulty ));
InitCommand=cmd(x,-64-8+tLocation[sDifficulty];shadowlength,1;zoom,0.75;diffuse,CustomDifficultyToColor( sDifficulty ));
ShowCommand=function(self)
self:stoptweening();
self:linear(0.1);
self:diffuse(CustomDifficultyToColor( sDifficulty ));
end;
HideCommand=function(self)
self:stoptweening();
self:decelerate(0.05);
self:diffuse(CustomDifficultyToDarkColor( sDifficulty ));
end;
InitCommand=function(self)
self:x(-64 - 8 + tLocation[sDifficulty]);
self:shadowlength(1);
self:zoom(0.75);
self:diffuse(CustomDifficultyToColor( sDifficulty ));
end;
};
};
end
@@ -2,85 +2,157 @@ return Def.ActorFrame {
CurrentSongChangedMessageCommand=function(self)
local song = GAMESTATE:GetCurrentSong();
if song then
-- self:setaux(0);
self:finishtweening();
self:playcommand("TweenOn");
elseif not song and self:GetZoomX() == 1 then
-- self:setaux(1);
self:finishtweening();
self:playcommand("TweenOff");
end;
end;
Def.Quad {
InitCommand=cmd(y,-14;zoomto,164,2;fadeleft,8/164;faderight,8/164);
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0;linear,0.35;diffusealpha,0.5);
InitCommand=function(self)
self:y(-14);
self:zoomto(164, 2);
self:fadeleft(8 / 164);
self:faderight(8 / 164);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:diffusealpha(0);
self:linear(0.35);
self:diffusealpha(0.5);
end;
};
Def.Quad {
InitCommand=cmd(y,24*(5)-10;zoomto,164,2;fadeleft,8/164;faderight,8/164);
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0;linear,0.35;diffusealpha,0.5);
InitCommand=function(self)
self:y(24 * 5 - 10);
self:zoomto(164, 2);
self:fadeleft(8 / 164);
self:faderight(8 / 164);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:diffusealpha(0);
self:linear(0.35);
self:diffusealpha(0.5);
end;
};
Def.StepsDisplayList {
Name="StepsDisplayListRow";
CursorP1 = Def.ActorFrame {
InitCommand=cmd(x,-128+16;player,PLAYER_1);
InitCommand=function(self)
self:x(-128 + 16);
self:player(PLAYER_1);
end;
PlayerJoinedMessageCommand=function(self, params)
if params.Player == PLAYER_1 then
self:visible(true);
(cmd(zoom,0;bounceend,1;zoom,1))(self);
self:zoom(0);
self:bounceend(1);
self:zoom(1);
end;
end;
PlayerUnjoinedMessageCommand=function(self, params)
if params.Player == PLAYER_1 then
self:visible(true);
(cmd(bouncebegin,1;zoom,0))(self);
self:bouncebegin(1);
self:zoom(0);
end;
end;
LoadActor(THEME:GetPathG("_StepsDisplayListRow","Cursor")) .. {
InitCommand=cmd(diffuse,PlayerColor(PLAYER_1);x,8;zoom,0.75);
InitCommand=function(self)
self:diffuse(PlayerColor(PLAYER_1));
self:x(8);
self:zoom(0.75);
end;
};
LoadActor(THEME:GetPathG("_StepsDisplayListRow","arrow")) .. {
InitCommand=cmd(x,20;diffuse,PlayerColor(PLAYER_1));
OnCommand=cmd(thump,1;effectmagnitude,1,1.25,1;effectclock,'beat';);
InitCommand=function(self)
self:x(20);
self:diffuse(PlayerColor(PLAYER_1));
end;
OnCommand=function(self)
self:thump(1);
self:effectmagnitude(1, 1.25, 1);
self:effectclock('beat');
end;
};
LoadFont("Common Normal") .. {
Text="P1";
InitCommand=cmd(x,2;diffuse,PlayerColor(PLAYER_1);shadowlength,1);
OnCommand=cmd(zoom,0.75);
InitCommand=function(self)
self:x(2);
self:diffuse(PlayerColor(PLAYER_1));
self:shadowlength(1);
end;
OnCommand=function(self)
self:zoom(0.75);
end;
};
};
CursorP2 = Def.ActorFrame {
InitCommand=cmd(x,128-16;player,PLAYER_2);
InitCommand=function(self)
self:x(128 - 16);
self:player(PLAYER_2);
end;
PlayerJoinedMessageCommand=function(self, params)
if params.Player == PLAYER_2 then
self:visible(true);
(cmd(zoom,0;bounceend,1;zoom,1))(self);
self:zoom(0);
self:bounceend(1);
self:zoom(1);
end;
end;
PlayerUnjoinedMessageCommand=function(self, params)
if params.Player == PLAYER_2 then
self:visible(true);
(cmd(bouncebegin,1;zoom,0))(self);
self:bouncebegin(1);
self:zoom(0);
end;
end;
LoadActor(THEME:GetPathG("_StepsDisplayListRow","Cursor")) .. {
InitCommand=cmd(diffuse,PlayerColor(PLAYER_2);x,-8;zoom,0.75;zoomx,-0.75;);
InitCommand=function(self)
self:diffuse(PlayerColor(PLAYER_2));
self:x(-8);
self:zoom(0.75);
self:zoomx(-0.75);
end;
};
LoadActor(THEME:GetPathG("_StepsDisplayListRow","arrow")) .. {
InitCommand=cmd(x,-20;diffuse,PlayerColor(PLAYER_2);zoomx,-1);
OnCommand=cmd(thump,1;effectmagnitude,1,1.25,1;effectclock,'beat';);
InitCommand=function(self)
self:x(-20);
self:diffuse(PlayerColor(PLAYER_2));
self:zoomx(-1);
end;
OnCommand=function(self)
self:thump(1);
self:effectmagnitude(1, 1.25, 1);
self:effectclock('beat');
end;
};
LoadFont("Common Normal") .. {
Text="P2";
InitCommand=cmd(x,-2;diffuse,PlayerColor(PLAYER_2);shadowlength,1);
OnCommand=cmd(zoom,0.75);
InitCommand=function(self)
self:x(-2);
self:diffuse(PlayerColor(PLAYER_2));
self:shadowlength(1);
end;
OnCommand=function(self)
self:zoom(0.75);
end;
};
};
CursorP1Frame = Def.Actor{
ChangeCommand=cmd(stoptweening;decelerate,0.05);
ChangeCommand=function(self)
self:stoptweening();
self:decelerate(0.05);
end;
};
CursorP2Frame = Def.Actor{
ChangeCommand=cmd(stoptweening;decelerate,0.05);
ChangeCommand=function(self)
self:stoptweening();
self:decelerate(0.05);
end;
};
};
};
@@ -3,8 +3,16 @@ local iconPath = "_timingicons"
local leftColX = -144
local rightColX = -leftColX
local showCmd = cmd(stoptweening;accelerate,0.1;diffusealpha,1)
local hideCmd = cmd(stoptweening;accelerate,0.1;diffusealpha,0)
local showCmd = function(self)
self:stoptweening();
self:accelerate(0.1);
self:diffusealpha(1);
end;
local hideCmd = function(self)
self:stoptweening();
self:accelerate(0.1);
self:diffusealpha(0);
end;
local SegmentTypes = {
Stops = { Frame = 0, xPos = leftColX, yPos = 0 },
@@ -17,8 +25,10 @@ local SegmentTypes = {
};
local t = Def.ActorFrame{
BeginCommand=cmd(playcommand,"SetIcons";playcommand,"SetAttacksIconMessage");
--OffCommand=cmd( RunCommandsOnChildren,cmd(playcommand,"Hide") );
BeginCommand=function(self)
self:playcommand("SetIcons");
self:playcommand("SetAttacksIconMessage");
end;
SetIconsCommand=function(self)
local stops = self:GetChild("StopsIcon")
@@ -85,47 +95,91 @@ local t = Def.ActorFrame{
LoadActor(iconPath)..{
Name="WarpsIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Warps.xPos;y,SegmentTypes.Warps.yPos;setstate,SegmentTypes.Warps.Frame;diffusealpha,0);
InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Warps.xPos);
self:y(SegmentTypes.Warps.yPos);
self:setstate(SegmentTypes.Warps.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd;
HideCommand=hideCmd;
};
LoadActor(iconPath)..{
Name="StopsIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Stops.xPos;y,SegmentTypes.Stops.yPos;setstate,SegmentTypes.Stops.Frame;diffusealpha,0);
InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Stops.xPos);
self:y(SegmentTypes.Stops.yPos);
self:setstate(SegmentTypes.Stops.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd;
HideCommand=hideCmd;
};
LoadActor(iconPath)..{
Name="DelaysIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Delays.xPos;y,SegmentTypes.Delays.yPos;setstate,SegmentTypes.Delays.Frame;diffusealpha,0);
InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Delays.xPos);
self:y(SegmentTypes.Delays.yPos);
self:setstate(SegmentTypes.Delays.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd;
HideCommand=hideCmd;
};
LoadActor(iconPath)..{
Name="AttacksIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Attacks.xPos;y,SegmentTypes.Attacks.yPos;setstate,SegmentTypes.Attacks.Frame;diffusealpha,0);
InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Attacks.xPos);
self:y(SegmentTypes.Attacks.yPos);
self:setstate(SegmentTypes.Attacks.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd;
HideCommand=hideCmd;
};
LoadActor(iconPath)..{
Name="ScrollsIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Scrolls.xPos;y,SegmentTypes.Scrolls.yPos;setstate,SegmentTypes.Scrolls.Frame;diffusealpha,0);
InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Scrolls.xPos);
self:y(SegmentTypes.Scrolls.yPos);
self:setstate(SegmentTypes.Scrolls.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd;
HideCommand=hideCmd;
};
LoadActor(iconPath)..{
Name="SpeedsIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Speeds.xPos;y,SegmentTypes.Speeds.yPos;setstate,SegmentTypes.Speeds.Frame;diffusealpha,0);
InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Speeds.xPos);
self:y(SegmentTypes.Speeds.yPos);
self:setstate(SegmentTypes.Speeds.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd;
HideCommand=hideCmd;
};
LoadActor(iconPath)..{
Name="FakesIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Fakes.xPos;y,SegmentTypes.Fakes.yPos;setstate,SegmentTypes.Fakes.Frame;diffusealpha,0);
function(self)
self:animate(false);
self:x(SegmentTypes.Fakes.xPos);
self:y(SegmentTypes.Fakes.yPos);
self:setstate(SegmentTypes.Fales.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd;
HideCommand=hideCmd;
};
CurrentSongChangedMessageCommand=cmd(playcommand,"SetIcons";);
CurrentSongChangedMessageCommand=function(self)
self:playcommand("SetIcons");
end;
CurrentStepsP1ChangedMessageCommand=function(self) MESSAGEMAN:Broadcast("SetAttacksIcon",{Player = PLAYER_1}) end;
CurrentStepsP2ChangedMessageCommand=function(self) MESSAGEMAN:Broadcast("SetAttacksIcon",{Player = PLAYER_2}) end;
};
@@ -1,11 +1,24 @@
local gc = Var("GameCommand");
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
GainFocusCommand=cmd(stoptweening;bob;effectmagnitude,0,6,0;decelerate,0.05;zoom,1);
LoseFocusCommand=cmd(stoptweening;stopeffect;decelerate,0.1;zoom,0.6);
GainFocusCommand=function(self)
self:stoptweening();
self:bob(); -- the heck is this?
self:effectmagnitude(0, 6, 0);
self:decelerate(0.05);
self:zoom(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:stopeffect();
self:decelerate(0.1);
self:zoom(0.6);
end;
LoadActor("_background base")..{
InitCommand=cmd(diffuse,ModeIconColors[gc:GetName()]);
InitCommand=function(self)
self:diffuse(ModeIconColors[gc:GetName()]);
end;
};
LoadActor("_background effect");
LoadActor("_gloss");
@@ -14,24 +27,46 @@ t[#t+1] = Def.ActorFrame {
-- todo: generate a better font for these.
LoadFont("_helveticaneuelt std extblk cn 42px")..{
InitCommand=cmd(y,-12;zoom,1.1;diffuse,color("#000000");uppercase,true;settext,gc:GetText(););
GainFocusCommand=cmd(diffuse,Color.Black;stopeffect);
LoseFocusCommand=cmd(diffuse,Color.Black;stopeffect);
InitCommand=function(self)
self:y(-12);
self:zoom(1.1);
self:diffuse(color("#000000"));
self:uppercase(true);
self:settext(gc:GetText());
end;
GainFocusCommand=function(self)
self:diffuse(Color.Black);
self:stopeffect();
end;
LoseFocusCommand=function(self)
self:diffuse(Color.Black);
self:stopeffect();
end;
};
LoadFont("_helveticaneuelt std extblk cn 42px")..{
InitCommand=cmd(y,27.5;zoom,0.45;maxwidth,320*1.6;uppercase,true;settext,THEME:GetString(Var "LoadingScreen", gc:GetName().."Explanation"));
GainFocusCommand=cmd(diffuse,Color.White;stopeffect);
LoseFocusCommand=cmd(diffuse,Color.White;stopeffect);
InitCommand=function(self)
self:y(27.5);
self:zoom(0.45);
self:maxwidth(320 * 1.6);
self:uppercase(true);
self:settext(THEME:GetString(Var "LoadingScreen", gc:GetName().."Explanation"));
end;
GainFocusCommand=function(self)
self:diffuse(Color.White);
self:stopeffect();
end;
LoseFocusCommand=function(self)
self:diffuse(Color.White);
self:stopeffect();
end;
};
LoadActor("_background base") .. {
DisabledCommand=cmd(diffuse,color("0,0,0,0.5"));
EnabledCommand=cmd(diffuse,color("1,1,1,0"));
DisabledCommand=function(self)
self:diffuse(color("0,0,0,0.5"));
end;
EnabledCommand=function(self)
self:diffuse(color("1,1,1,0"));
end;
};
--[[
LoadActor(THEME:GetPathG("_SelectIcon",gc:GetName() )) .. {
DisabledCommand=cmd(diffuse,color("0.5,0.5,0.5,1"));
EnabledCommand=cmd(diffuse,color("1,1,1,1"));
};
--]]
};
return t
@@ -12,57 +12,213 @@ local t = Def.ActorFrame {};
-- Background!
t[#t+1] = Def.ActorFrame {
LoadActor(THEME:GetPathG("ScreenSelectPlayMode","BackgroundFrame")) .. {
InitCommand=cmd(diffuse,Color("Black");diffusealpha,0.7);
GainFocusCommand=cmd(visible,true);
LoseFocusCommand=cmd(visible,false);
InitCommand=function(self)
self:diffuse(Color("Black"));
self:diffusealpha(0.7);
end;
GainFocusCommand=function(self)
self:visible(true);
end;
LoseFocusCommand=function(self)
self:visible(false);
end;
};
LoadActor("_HighlightFrame") .. {
InitCommand=cmd(diffuse,ModeIconColors[gc:GetName()];diffusealpha,0);
GainFocusCommand=cmd(finishtweening;diffusealpha,1;glow,Color.Alpha(Color.White,1);linear,0.1;glow,Color.Invisible);
LoseFocusCommand=cmd(finishtweening;diffusealpha,0;glow,Color.Invisible);
OffFocusedCommand=cmd(finishtweening;glow,Color("White");decelerate,1;glow,Color("Invisible"));
InitCommand=function(self)
self:diffuse(ModeIconColors[gc:GetName()]);
self:diffusealpha(0);
end;
GainFocusCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:glow(Color.Alpha(Color.White,1));
self:linear(0.1);
self:glow(Color.Invisible);
end;
LoseFocusCommand=function(self)
self:finishtweening();
self:diffusealpha(0);
self:glow(Color.Invisible);
end;
OffFocusedCommand=function(self)
self:finishtweening();
self:glow(Color("White"));
self:decelerate(1);
self:glow(Color("Invisible"));
end;
};
};
-- Emblem Frame
t[#t+1] = Def.ActorFrame {
FOV=90;
InitCommand=cmd(x,-192;zoom,0.9);
InitCommand=function(self)
self:x(-192);
self:zoom(0.9);
end;
-- Main Shadow
LoadActor( gc:GetName() ) .. {
InitCommand=cmd(x,2;y,2;diffuse,Color("Black");diffusealpha,0;zoom,0.75);
GainFocusCommand=cmd(stoptweening;stopeffect;smooth,0.1;diffusealpha,0;zoom,1;decelerate,0.05;diffusealpha,0.5;pulse;effecttiming,0.75,0.125,0.125,0.75;effectmagnitude,0.95,1,1;);
LoseFocusCommand=cmd(stoptweening;stopeffect;smooth,0.2;diffusealpha,0;zoom,0.75;);
OffFocusedCommand=cmd(finishtweening;stopeffect;glow,ModeIconColors[gc:GetName()];decelerate,0.5;rotationy,360;);
InitCommand=function(self)
self:x(2);
self:y(2);
self:diffuse(Color("Black"));
self:diffusealpha(0);
self:zoom(0.75);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:stopeffect();
self:smooth(0.1);
self:diffusealpha(0);
self:zoom(1);
self:decelerate(0.05);
self:diffusealpha(0.5);
self:pulse();
self:effecttiming(0.75, 0.125, 0.125, 0.75);
self:effectmagnitude(0.95, 1, 1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:stopeffect();
self:smooth(0.2);
self:diffusealpha(0);
self:zoom(0.75);
end;
OffFocusedCommand=function(self)
self:finishtweening();
self:stopeffect();
self:glow(ModeIconColors[gc:GetName()]);
self:decelerate(0.5);
self:rotationy(360);
end;
};
-- Main Emblem
LoadActor( gc:GetName() ) .. {
InitCommand=cmd(diffusealpha,0;zoom,0.75);
GainFocusCommand=cmd(stoptweening;stopeffect;smooth,0.1;diffusealpha,1;zoom,1;glow,Color("White");decelerate,0.05;glow,Color("Invisible");pulse;effecttiming,0.75,0.125,0.125,0.75;effectmagnitude,0.95,1,1;);
LoseFocusCommand=cmd(stoptweening;stopeffect;smooth,0.2;diffusealpha,0;zoom,0.75;glow,Color("Invisible"));
OffFocusedCommand=cmd(finishtweening;stopeffect;glow,ModeIconColors[gc:GetName()];decelerate,0.5;rotationy,360;glow,Color("Invisible"));
InitCommand=function(self)
self:diffusealpha(0);
self:zoom(0.75);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:stopeffect();
self:smooth(0.1);
self:diffusealpha(1);
self:zoom(1);
self:glow(Color("White"));
self:decelerate(0.05);
self:glow(Color("Invisible"));
self:pulse();
self:effecttiming(0.75, 0.125, 0.125, 0.75);
self:effectmagnitude(0.95, 1, 1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:stopeffect();
self:smooth(0.2);
self:diffusealpha(0);
self:zoom(0.75);
self:glow(Color("Invisible"));
end;
OffFocusedCommand=function(self)
self:finishtweening();
self:stopeffect();
self:glow(ModeIconColors[gc:GetName()]);
self:decelerate(0.5);
self:rotationy(360);
self:glow(Color("Invisible"));
end;
};
};
-- Text Frame
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,-192/2;y,-10);
InitCommand=function(self)
self:x(-192/2);
self:y(-10);
end;
Def.Quad {
InitCommand=cmd(horizalign,left;y,20;zoomto,320,2;diffuse,ModeIconColors[gc:GetName()];diffusealpha,0;fadeleft,0.35;faderight,0.35);
GainFocusCommand=cmd(stoptweening;linear,0.1;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;linear,0.1;diffusealpha,0);
InitCommand=function(self)
self:horizalign(left);
self:y(20);
self:zoomto(320, 2);
self:diffuse(ModeIconColors[gc:GetName()]);
self:diffusealpha(0);
self:fadeleft(0.35);
self:faderight(0.35);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:linear(0.1);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.1);
self:diffusealpha(0);
end;
};
LoadFont("_helveticaneuelt std extblk cn 42px") .. {
Text=gc:GetText();
InitCommand=cmd(horizalign,left;diffuse,ModeIconColors[gc:GetName()];shadowcolor,ColorDarkTone(ModeIconColors[gc:GetName()]);shadowlength,2;diffusealpha,0;skewx,-0.125);
GainFocusCommand=cmd(stoptweening;x,-32;decelerate,0.1;diffusealpha,1;x,0);
LoseFocusCommand=cmd(stoptweening;x,0;accelerate,0.1;diffusealpha,0;x,32;diffusealpha,0);
InitCommand=function(self)
self:horizalign(left);
self:diffuse(ModeIconColors[gc:GetName()]);
self:shadowcolor(ColorDarkTone(ModeIconColors[gc:GetName()]));
self:shadowlength(2);
self:diffusealpha(0);
self:skewx(-0.125);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:x(-32);
self:decelerate(0.1);
self:diffusealpha(1);
self:x(0);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:x(0);
self:accelerate(0.1);
self:diffusealpha(0);
self:x(32);
self:diffusealpha(0);
end;
};
LoadFont("_helveticaneuelt std extblk cn 42px") .. {
Text=THEME:GetString(Var "LoadingScreen", gc:GetName() .. "Explanation");
InitCommand=cmd(horizalign,right;x,320;y,30;shadowlength,1;diffusealpha,0;skewx,-0.125;zoom,0.5);
GainFocusCommand=cmd(stoptweening;x,320+32;decelerate,0.1;diffusealpha,1;x,320);
LoseFocusCommand=cmd(stoptweening;x,320;accelerate,0.1;diffusealpha,0;x,320-32;diffusealpha,0);
InitCommand=function(self)
self:horizalign(right);
self:x(320);
self:y(30);
self:shadowlength(1);
self:diffusealpha(0);
self:skewx(-0.125);
self:zoom(0.5);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:x(320+32);
self:decelerate(0.1);
self:diffusealpha(1);
self:x(320);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:x(320);
self:accelerate(0.1);
self:diffusealpha(0);
self:x(320-32);
self:diffusealpha(0);
end;
};
};
t.GainFocusCommand=cmd(finishtweening;visible,true;zoom,1.1;decelerate,0.25;zoom,1);
t.LoseFocusCommand=cmd(finishtweening;visible,false;zoom,1);
t.GainFocusCommand=function(self)
self:finishtweening();
self:visible(true);
self:zoom(1.1);
self:decelerate(0.25);
self:zoom(1);
end;
t.LoseFocusCommand=function(self)
self:finishtweening();
self:visible(false);
self:zoom(1);
end;
return t
@@ -1,41 +1,61 @@
local netConnected = IsNetConnected();
local loggedOnSMO = IsNetSMOnline();
local t = Def.ActorFrame{
Def.Quad {
InitCommand=cmd(y,-12;x,160;zoomto,320+32,38;vertalign,top;diffuse,Color.Black;diffusealpha,0.5);
OnCommand=cmd(faderight,0.45);
BeginCommand=function(self)
if netConnected then
self:zoomtoheight( 38 );
else
self:zoomtoheight( 24 );
end
end;
};
LoadFont("Common Normal") .. {
InitCommand=cmd(uppercase,true;zoom,0.75;shadowlength,1;horizalign,left);
BeginCommand=function(self)
-- check network status
if netConnected then
self:diffuse( color("0.95,0.975,1,1") );
self:diffusebottomedge( color("0.72,0.89,1,1") );
self:settext( Screen.String("Network OK") );
else
self:diffuse( color("1,1,1,1") );
self:settext( Screen.String("Offline") );
end;
end;
};
};
if netConnected then
t[#t+1] = LoadFont("Common Normal") .. {
InitCommand=cmd(y,16;horizalign,left;zoom,0.5875;shadowlength,1;diffuse,color("0.72,0.89,1,1"));
BeginCommand=function(self)
self:settext( string.format(Screen.String("Connected to %s"), GetServerName()) );
end;
};
end;
local netConnected = IsNetConnected();
local loggedOnSMO = IsNetSMOnline();
local t = Def.ActorFrame{
Def.Quad {
InitCommand=function(self)
self:y(-12);
self:x(160);
self:zoomto(320 + 32, 38);
self:vertalign(top);
self:diffuse(Color.Black);
self:diffusealpha(0.5);
end;
OnCommand=function(self)
self:faderight(0.45);
end;
BeginCommand=function(self)
if netConnected then
self:zoomtoheight( 38 );
else
self:zoomtoheight( 24 );
end
end;
};
LoadFont("Common Normal") .. {
InitCommand=function(self)
self:uppercase(true);
self:zoom(0.75);
self:shadowlength(1);
self:horizalign(left);
end;
BeginCommand=function(self)
-- check network status
if netConnected then
self:diffuse( color("0.95,0.975,1,1") );
self:diffusebottomedge( color("0.72,0.89,1,1") );
self:settext( Screen.String("Network OK") );
else
self:diffuse( color("1,1,1,1") );
self:settext( Screen.String("Offline") );
end;
end;
};
};
if netConnected then
t[#t+1] = LoadFont("Common Normal") .. {
InitCommand=function(self)
self:y(16);
self:horizalign(left);
self:zoom(0.5875);
self:shadowlength(1);
self:diffuse(color("0.72,0.89,1,1"));
end;
BeginCommand=function(self)
self:settext( string.format(Screen.String("Connected to %s"), GetServerName()) );
end;
};
end;
return t;
@@ -8,12 +8,24 @@ local fSpacingX = 72;
local function MakeDisplayBar( fZoomX, fZoomY )
return Def.ActorFrame {
Def.Quad {
InitCommand=cmd(vertalign,bottom;y,1;zoomto,fZoomX+2,fZoomY+2);
OnCommand=cmd(diffuse,Color("Black"));
InitCommand=function(self)
self:vertalign(bottom);
self:y(1);
self:zoomto(fZoomX+2,fZoomY+2);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
end;
};
Def.Quad {
InitCommand=cmd(vertalign,bottom;zoomto,fZoomX,fZoomY);
OnCommand=cmd(diffuse,Color("Orange");diffusetopedge,Color("Yellow"));
InitCommand=function(self)
self:vertalign(bottom);
self:zoomto(fZoomX,fZoomY);
end;
OnCommand=function(self)
self:diffuse(Color("Orange"));
self:diffusetopedge(Color("Yellow"));
end;
};
};
end
@@ -22,13 +34,19 @@ local function MakeIcon( sTarget )
LoadActor(THEME:GetPathG("MenuTimer","Frame"));
LoadFont("Common Normal") .. {
Text=sTarget[2];
InitCommand=cmd(y,24+2;zoom,0.5;shadowlength,1);
InitCommand=function(self)
self:y(24+2);
self:zoom(0.5);
self:shadowlength(1);
end;
};
--
LoadFont("Common Normal") .. {
Text="0";
OnCommand=cmd(settext,
( PREFSMAN:GetPreference("EventMode") ) and "" or PREFSMAN:GetPreference("SongsPerPlay")
OnCommand=function(self)
self:settext(( PREFSMAN:GetPreference("EventMode") )
and "" or PREFSMAN:GetPreference("SongsPerPlay"));
end;
);
Condition=sTarget[1] == "EventMode";
};
@@ -2,8 +2,13 @@ return Def.ActorFrame {
LoadFont("Common Normal") .. {
Text=GetTimingDifficulty();
AltText="";
InitCommand=cmd(horizalign,left;zoom,0.675);
OnCommand=cmd(shadowlength,1);
InitCommand=function(self)
self:horizalign(left);
self:zoom(0.675);
end;
OnCommand=function(self)
self:shadowlength(1);
end;
BeginCommand=function(self)
self:settextf( Screen.String("TimingDifficulty"), "" );
end
@@ -11,12 +16,18 @@ return Def.ActorFrame {
LoadFont("Common Normal") .. {
Text=GetTimingDifficulty();
AltText="";
InitCommand=cmd(x,136;zoom,0.675;halign,0);
InitCommand=function(self)
self:x(136);
self:zoom(0.675);
self:halign(0);
end;
OnCommand=function(self)
(cmd(shadowlength,1;skewx,-0.125))(self);
self:shadowlength(1);
self:skewx(-0.125);
if GetTimingDifficulty() == 9 then
self:settext("Justice");
(cmd(zoom,0.5;diffuse,ColorLightTone( Color("Orange")) ))(self);
self:zoom(0.5);
self:diffuse(ColorLightTone( Color("Orange")) );
else
self:settext( GetTimingDifficulty() );
end
@@ -2,15 +2,45 @@ local gc = Var("GameCommand");
return Def.ActorFrame {
Def.Quad{
InitCommand=cmd(zoomto,256,26;fadeleft,0.45;faderight,0.45);
OnCommand=cmd(diffuseshift;effectcolor1,color("0,0,0,0.5");effectcolor2,color("0,0,0,0.5"));
GainFocusCommand=cmd(stoptweening;decelerate,0.1;zoomto,256,26;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.1;zoomto,SCREEN_WIDTH,0;diffusealpha,0);
InitCommand=function(self)
self:zoomto(256, 26);
self:fadeleft(0.45);
self:faderight(0.45);
end;
OnCommand=function(self)
self:diffuseshift();
self:effectcolor1(color("0,0,0,0.5"));
self:effectcolor2(color("0,0,0,0.5"));
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.1);
self:zoomto(256,26);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.1);
self:zoomto(SCREEN_WIDTH,0);
self:diffusealpha(0);
end;
};
LoadFont("Common Normal") .. {
Text=THEME:GetString("ScreenTitleMenu",gc:GetText());
OnCommand=cmd(shadowlength,1);
GainFocusCommand=cmd(stoptweening;linear,0.1;zoom,1;diffuse,color("1,1,1,1"));
LoseFocusCommand=cmd(stoptweening;linear,0.1;zoom,0.75;diffuse,color("0.5,0.5,0.5,1"));
OnCommand=function(self)
self:shadowlength(1);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:linear(0.1);
self:zoom(1);
self:diffuse(color("1,1,1,1"));
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.1);
self:zoom(0.75);
self:diffuse(color("0.5,0.5,0.5,1"));
end;
};
};
@@ -1,20 +1,28 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.Quad {
InitCommand=cmd(vertalign,top;zoomto,SCREEN_WIDTH+1,50;diffuse,Color.Black);
InitCommand=function(self)
self:vertalign(top);
self:zoomto(SCREEN_WIDTH+1,50);
self:diffuse(Color.Black);
end;
}
--[[ t[#t+1] = LoadActor("Header") .. {
InitCommand=cmd(vertalign,top;zoomtowidth,SCREEN_WIDTH+1;diffuse,color("#ffd400"));
}; ]]
--[[ t[#t+1] = LoadActor("_texture stripe") .. {
InitCommand=cmd(vertalign,top;zoomto,SCREEN_WIDTH+64,44;customtexturerect,0,0,SCREEN_WIDTH+64/8,44/32);
OnCommand=cmd(fadebottom,0.8;texcoordvelocity,1,0;skewx,-0.0025;diffuse,Color("Black");diffusealpha,0.235);
}; --]]
t[#t+1] = LoadFont("Common Bold") .. {
Name="HeaderText";
Text=Screen.String("HeaderText");
InitCommand=cmd(x,-SCREEN_CENTER_X+24;y,24;zoom,1;horizalign,left;shadowlength,0;maxwidth,200);
OnCommand=cmd(strokecolor,Color.Invisible;diffusebottomedge,color("0.75,0.75,0.75"));
InitCommand=function(self)
self:x(-SCREEN_CENTER_X+24);
self:y(24);
self:zoom(1);
self:horizalign(left);
self:shadowlength(0);
self:maxwidth(200);
end;
OnCommand=function(self)
self:strokecolor(Color.Invisible);
self:diffusebottomedge(color("0.75,0.75,0.75"));
end;
UpdateScreenHeaderMessageCommand=function(self,param)
self:settext(param.Header);
end;
@@ -1,19 +1,39 @@
local jl = Var "JudgmentLine";
return Def.ActorFrame {
Def.Quad {
InitCommand=cmd(horizalign,right;zoomto,256,18);
OnCommand=cmd(diffuse,Color("Black");fadeleft,1);
};
Def.Quad {
InitCommand=cmd(horizalign,left;zoomto,256,18);
OnCommand=cmd(diffuse,Color("Black");faderight,1);
};
LoadActor("_frame") .. {
InitCommand=cmd(diffuse,JudgmentLineToColor(jl));
};
LoadFont("Common Normal") .. {
InitCommand=cmd(zoom,0.675;settext,string.upper(JudgmentLineToLocalizedString(jl));diffuse,JudgmentLineToColor(jl);shadowlength,1;maxwidth,180);
};
local jl = Var "JudgmentLine";
return Def.ActorFrame {
Def.Quad {
InitCommand=function(self)
self:horizalign(right);
self:zoomto(256,18);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:fadeleft(1);
end;
};
Def.Quad {
InitCommand=function(self)
self:horizalign(left);
self:zoomto(256,18);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:faderight(1);
end;
};
LoadActor("_frame") .. {
InitCommand=function(self)
self:diffuse(JudgmentLineToColor(jl));
end;
};
LoadFont("Common Normal") .. {
InitCommand=function(self)
self:zoom(0.675);
self:settext(string.upper(JudgmentLineToLocalizedString(jl)));
self:diffuse(JudgmentLineToColor(jl));
self:shadowlength(1);
self:maxwidth(180);
end;
};
};