DONE! All lua is future-proofed.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user