Revert "Some of default. Better break this up."

This reverts commit 8833ab5bc6.
This commit is contained in:
Jason Felds
2013-07-18 17:43:31 -04:00
parent 6120a8a5e4
commit dc5d6a932d
59 changed files with 970 additions and 1548 deletions
@@ -1,6 +1,3 @@
return LoadActor(THEME:GetPathG("_combined","life frame"))..{
InitCommand=function(self)
self:diffuse(PlayerColor(PLAYER_1));
self:diffuserightedge(PlayerColor(PLAYER_2));
end;
InitCommand=cmd(diffuse,PlayerColor(PLAYER_1);diffuserightedge,PlayerColor(PLAYER_2));
};
@@ -1,9 +1,3 @@
return LoadFont("Combo Numbers") .. {
InitCommand=function(self)
self:zoom(12/54);
self:y(-1);
self:shadowlengthx(0);
self:shadowlengthy(1);
self:strokecolor(color("#00000077"));
end;
return LoadFont("Combo Numbers") .. {
InitCommand=cmd(zoom,12/54;y,-1;shadowlengthx,0;shadowlengthy,1;strokecolor,color("#00000077"););
};
+1 -3
View File
@@ -1,8 +1,6 @@
local t = Def.ActorFrame{
LoadActor("EditMenu Left")..{
BeginCommand=function(self)
self:zoomx(-1);
end;
BeginCommand=cmd(zoomx,-1);
};
};
@@ -1,14 +1,8 @@
return Def.ActorFrame {
LoadActor(THEME:GetPathG("MusicWheelItem","Course NormalPart")) .. {
InitCommand=function(self)
self:glow(color('1,1,1,0.25'));
end;
};
LoadActor(THEME:GetPathG("MusicWheelItem","Course NormalPart")) .. {
InitCommand=function(self)
self:blend(Blend.Add);
self:rainbow();
self:diffusealpha(0.325);
end;
};
return Def.ActorFrame {
LoadActor(THEME:GetPathG("MusicWheelItem","Course NormalPart")) .. {
InitCommand=cmd(glow,color('1,1,1,0.25'));
};
LoadActor(THEME:GetPathG("MusicWheelItem","Course NormalPart")) .. {
InitCommand=cmd(blend,Blend.Add;rainbow;diffusealpha,0.325);
};
};
@@ -1,21 +1,14 @@
local Player = ...
assert(Player,"MachineRecord needs Player")
local stats = STATSMAN:GetCurStageStats():GetPlayerStageStats(Player);
local record = stats:GetMachineHighScoreIndex()
local hasMachineRecord = record ~= -1
return LoadFont("Common normal")..{
InitCommand=function(self)
self:zoom(0.55);
self:shadowlength(1);
self:NoStroke();
self:glowshift();
self:effectcolor1(color("1,1,1,0"));
self:effectcolor2(color("1,1,1,0.25"));
end;
BeginCommand=function(self)
self:visible(hasMachineRecord);
local text = string.format(THEME:GetString("ScreenEvaluation", "MachineRecord"), record+1)
self:settext(text);
end;
local Player = ...
assert(Player,"MachineRecord needs Player")
local stats = STATSMAN:GetCurStageStats():GetPlayerStageStats(Player);
local record = stats:GetMachineHighScoreIndex()
local hasMachineRecord = record ~= -1
return LoadFont("Common normal")..{
InitCommand=cmd(zoom,0.55;shadowlength,1;NoStroke;glowshift;effectcolor1,color("1,1,1,0");effectcolor2,color("1,1,1,0.25"));
BeginCommand=function(self)
self:visible(hasMachineRecord);
local text = string.format(THEME:GetString("ScreenEvaluation", "MachineRecord"), record+1)
self:settext(text);
end;
};
@@ -1,21 +1,14 @@
local Player = ...
assert(Player,"PersonalRecord needs Player")
local stats = STATSMAN:GetCurStageStats():GetPlayerStageStats(Player);
local record = stats:GetPersonalHighScoreIndex()
local hasPersonalRecord = record ~= -1
return LoadFont("Common normal")..{
InitCommand=function(self)
self:zoom(0.55);
self:shadowlength(1);
self:NoStroke();
self:glowshift();
self:effectcolor1(color("1,1,1,0"));
self:effectcolor2(color("1,1,1,0.25"));
end;
BeginCommand=function(self)
self:visible(hasPersonalRecord);
local text = string.format(THEME:GetString("ScreenEvaluation", "PersonalRecord"), record+1)
self:settext(text)
end
local Player = ...
assert(Player,"PersonalRecord needs Player")
local stats = STATSMAN:GetCurStageStats():GetPlayerStageStats(Player);
local record = stats:GetPersonalHighScoreIndex()
local hasPersonalRecord = record ~= -1
return LoadFont("Common normal")..{
InitCommand=cmd(zoom,0.55;shadowlength,1;NoStroke;glowshift;effectcolor1,color("1,1,1,0");effectcolor2,color("1,1,1,0.25"));
BeginCommand=function(self)
self:visible(hasPersonalRecord);
local text = string.format(THEME:GetString("ScreenEvaluation", "PersonalRecord"), record+1)
self:settext(text)
end
};
@@ -1,7 +1,5 @@
return LoadFont("ScreenGameplay","SongTitle") .. {
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Refresh");
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Refresh");
RefreshCommand=function(self)
local vSong = GAMESTATE:GetCurrentSong();
local vCourse = GAMESTATE:GetCurrentCourse();
@@ -1,44 +1,40 @@
local curScreen = Var "LoadingScreen";
local curStage = GAMESTATE:GetCurrentStage();
local curStageIndex = GAMESTATE:GetCurrentStageIndex();
local tRemap = {
Stage_1st = 1,
Stage_2nd = 2,
Stage_3rd = 3,
Stage_4th = 4,
Stage_5th = 5,
Stage_6th = 6,
};
if tRemap[curStage] == PREFSMAN:GetPreference("SongsPerPlay") then
curStage = "Stage_Final";
end
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black",64,16);
LoadFont("Common Normal") .. {
InitCommand=function(self)
self:y(-1);
self:shadowlength(1);
self:playcommand("Set");
end;
SetCommand=function(self)
if GAMESTATE:GetCurrentCourse() then
self:settext( GAMESTATE:GetCurrentStageIndex()+1 .. " / " .. GAMESTATE:GetCurrentCourse():GetEstimatedNumStages() );
elseif GAMESTATE:IsEventMode() then
self:settextf("Stage %s", curStageIndex+1);
else
if THEME:GetMetric(curScreen,"StageDisplayUseShortString") then
self:settextf("%s", ToEnumShortString(curStage));
else
self:settextf("%s Stage", ToEnumShortString(curStage));
end;
end;
self:zoom(0.675);
self:diffuse(StageToColor(curStage));
self:diffusetopedge(ColorLightTone(StageToColor(curStage)));
end;
};
};
local curScreen = Var "LoadingScreen";
local curStage = GAMESTATE:GetCurrentStage();
local curStageIndex = GAMESTATE:GetCurrentStageIndex();
local tRemap = {
Stage_1st = 1,
Stage_2nd = 2,
Stage_3rd = 3,
Stage_4th = 4,
Stage_5th = 5,
Stage_6th = 6,
};
if tRemap[curStage] == PREFSMAN:GetPreference("SongsPerPlay") then
curStage = "Stage_Final";
end
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black",64,16);
LoadFont("Common Normal") .. {
InitCommand=cmd(y,-1;shadowlength,1;playcommand,"Set");
SetCommand=function(self)
if GAMESTATE:GetCurrentCourse() then
self:settext( GAMESTATE:GetCurrentStageIndex()+1 .. " / " .. GAMESTATE:GetCurrentCourse():GetEstimatedNumStages() );
elseif GAMESTATE:IsEventMode() then
self:settextf("Stage %s", curStageIndex+1);
else
if THEME:GetMetric(curScreen,"StageDisplayUseShortString") then
self:settextf("%s", ToEnumShortString(curStage));
else
self:settextf("%s Stage", ToEnumShortString(curStage));
end;
end;
self:zoom(0.675);
self:diffuse(StageToColor(curStage));
self:diffusetopedge(ColorLightTone(StageToColor(curStage)));
end;
};
};
return t
@@ -1,8 +1,5 @@
return Def.ActorFrame{
Def.Quad{
InitCommand=function(self)
self:zoomto(THEME:GetMetric(Var "LoadingScreen","ChatInputBoxWidth"), THEME:GetMetric(Var "LoadingScreen","ChatInputBoxHeight"));
self:diffuse(color("0,0,0,0.25"));
end;
InitCommand=cmd(zoomto,THEME:GetMetric(Var "LoadingScreen","ChatInputBoxWidth"),THEME:GetMetric(Var "LoadingScreen","ChatInputBoxHeight");diffuse,color("0,0,0,0.25"));
};
};
@@ -1,8 +1,5 @@
return Def.ActorFrame{
Def.Quad{
InitCommand=function(self)
self:zoomto(THEME:GetMetric(Var "LoadingScreen","ChatOutputBoxWidth"), THEME:GetMetric(Var "LoadingScreen","ChatOutputBoxHeight"));
self:diffuse(color("0,0,0,0.25"));
end;
InitCommand=cmd(zoomto,THEME:GetMetric(Var "LoadingScreen","ChatOutputBoxWidth"),THEME:GetMetric(Var "LoadingScreen","ChatOutputBoxHeight");diffuse,color("0,0,0,0.25"));
};
};
@@ -2,10 +2,6 @@ return Def.BPMDisplay {
File=THEME:GetPathF("BPMDisplay", "bpm");
Name="BPMDisplay";
SetCommand=function(self) self:SetFromGameState() end;
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set");
end;
CurrentCourseChangedMessageCommand=function(self)
self:playcommand("Set");
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
};
@@ -1,10 +1,6 @@
return Def.ActorFrame {
LoadFont("Common Normal") .. {
Text="BPM";
InitCommand=function(self)
self:horizalign(right);
self:zoom(0.75);
self:strokecolor(Color("Outline"));
end;
};
return Def.ActorFrame {
LoadFont("Common Normal") .. {
Text="BPM";
InitCommand=cmd(horizalign,right;zoom,0.75;strokecolor,Color("Outline"));
};
};
@@ -1,5 +1,3 @@
return Def.Quad {
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH,64);
end;
InitCommand=cmd(zoomto,SCREEN_WIDTH,64);
};
@@ -1,15 +1,8 @@
return Def.ActorFrame {
LoadActor(THEME:GetPathG("OptionRowExit","frame")) .. {
InitCommand=function(self)
self:diffusebottomedge(Color("Orange"));
end;
InitCommand=cmd(diffusebottomedge,Color("Orange"));
};
LoadActor(THEME:GetPathG("_icon","Sort")) .. {
InitCommand=function(self)
self:x(-60);
self:shadowlength(1);
self:diffuse(Color("Orange"));
self:diffusetopedge(Color("Yellow"));
end;
InitCommand=cmd(x,-60;shadowlength,1;diffuse,Color("Orange");diffusetopedge,Color("Yellow"));
};
};
@@ -4,12 +4,8 @@ t[#t+1] = Def.ActorFrame {
GainFocusCommand=THEME:GetMetric(Var "LoadingScreen","IconGainFocusCommand");
LoseFocusCommand=THEME:GetMetric(Var "LoadingScreen","IconLoseFocusCommand");
LoadActor(THEME:GetPathG("_SelectIcon",gc:GetName() )) .. {
DisabledCommand=function(self)
self:diffuse(color("0.5,0.5,0.5,1"));
end;
EnabledCommand=function(self)
self:diffuse(color("1,1,1,1"));
end;
DisabledCommand=cmd(diffuse,color("0.5,0.5,0.5,1"));
EnabledCommand=cmd(diffuse,color("1,1,1,1"));
};
};
return t
@@ -1,29 +1,17 @@
return Def.ActorFrame {
LoadFont("Common Normal") .. {
Text=GetLifeDifficulty();
AltText="";
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("LifeDifficulty"), "" );
end
};
LoadFont("Common Normal") .. {
Text=GetLifeDifficulty();
AltText="";
InitCommand=function(self)
self:x(136);
self:zoom(0.675);
self:halign(0);
end;
OnCommand=function(self)
self:shadowlength(1);
self:skewx(-0.125);
end;
};
return Def.ActorFrame {
LoadFont("Common Normal") .. {
Text=GetLifeDifficulty();
AltText="";
InitCommand=cmd(horizalign,left;zoom,0.675);
OnCommand=cmd(shadowlength,1);
BeginCommand=function(self)
self:settextf( Screen.String("LifeDifficulty"), "" );
end
};
LoadFont("Common Normal") .. {
Text=GetLifeDifficulty();
AltText="";
InitCommand=cmd(x,136;zoom,0.675;halign,0);
OnCommand=cmd(shadowlength,1;skewx,-0.125);
};
};
@@ -1,25 +1,14 @@
return Def.ActorFrame {
LoadFont("Common Normal") .. {
Text=string.format("%s %s", ProductFamily(), ProductVersion());
AltText="StepMania";
InitCommand=function(self)
self:zoom(0.675);
end;
OnCommand=function(self)
self:horizalign(right);
self:shadowlength(1);
end;
};
LoadFont("Common Normal") .. {
Text=string.format("%s", VersionDate());
AltText="Unknown Version";
InitCommand=function(self)
self:y(16);
self:zoom(0.5);
end;
OnCommand=function(self)
self:horizalign(right);
self:shadowlength(1);
end;
};
return Def.ActorFrame {
LoadFont("Common Normal") .. {
Text=string.format("%s %s", ProductFamily(), ProductVersion());
AltText="StepMania";
InitCommand=cmd(zoom,0.675);
OnCommand=cmd(horizalign,right;shadowlength,1);
};
LoadFont("Common Normal") .. {
Text=string.format("%s", VersionDate());
AltText="Unknown Version";
InitCommand=cmd(y,16;zoom,0.5);
OnCommand=cmd(horizalign,right;shadowlength,1);
};
};
@@ -1,11 +1,7 @@
local t = Def.ActorFrame {
Def.Quad {
InitCommand=function(self)
self:zoomto(32, 32);
end;
OnCommand=function(self)
self:spin();
end;
InitCommand=cmd(zoomto,32,32);
OnCommand=cmd(spin);
};
};
@@ -1,31 +1,15 @@
local t = Def.ActorFrame{
InitCommand=function(self)
self:fov(70);
end;
LoadActor("_arrow")..{
InitCommand=function(self)
self:x(225);
end;
OnCommand=function(self)
self:wag();
self:effectmagnitude(0, 0, 16);
self:effectperiod(2.5);
end;
};
LoadActor("_text");
LoadActor("_text")..{
Name="TextGlow";
InitCommand=function(self)
self:blend(Blend.Add);
self:diffusealpha(0.05);
end;
OnCommand=function(self)
self:glowshift();
self:effectperiod(2.5);
self:effectcolor1(color("1,1,1,0.25"));
self:effectcolor2(color("1,1,1,1"));
end;
};
};
return t;
local t = Def.ActorFrame{
InitCommand=cmd(fov,70);
LoadActor("_arrow")..{
InitCommand=cmd(x,225;);
OnCommand=cmd(wag;effectmagnitude,0,0,16;effectperiod,2.5;);
};
LoadActor("_text");
LoadActor("_text")..{
Name="TextGlow";
InitCommand=cmd(blend,Blend.Add;diffusealpha,0.05;);
OnCommand=cmd(glowshift;effectperiod,2.5;effectcolor1,color("1,1,1,0.25");effectcolor2,color("1,1,1,1"););
};
};
return t;
@@ -1,11 +1,7 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.Quad {
InitCommand=function(self)
self:vertalign(bottom);
self:zoomto(SCREEN_WIDTH + 1, 34);
self:diffuse(Color.Black);
end;
InitCommand=cmd(vertalign,bottom;zoomto,SCREEN_WIDTH+1,34;diffuse,Color.Black);
};
return t;
@@ -1,42 +1,39 @@
local curScreen = Var "LoadingScreen";
local curStage = GAMESTATE:GetCurrentStage();
local curStageIndex = GAMESTATE:GetCurrentStageIndex();
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black",64,12);
LoadFont("Common Normal") .. {
InitCommand=function(self)
self:y(-1);
self:shadowlength(1);
end;
BeginCommand=function(self)
local top = SCREENMAN:GetTopScreen()
if top then
if not string.find(top:GetName(),"ScreenEvaluation") then
curStageIndex = curStageIndex + 1
end
end
self:playcommand("Set")
end;
SetCommand=function(self)
if GAMESTATE:GetCurrentCourse() then
self:settext( curStageIndex+1 .. " / " .. GAMESTATE:GetCurrentCourse():GetEstimatedNumStages() );
elseif GAMESTATE:IsEventMode() then
self:settextf("Stage %s", curStageIndex);
else
if THEME:GetMetric(curScreen,"StageDisplayUseShortString") then
self:settextf("%s", ToEnumShortString(curStage));
self:zoom(0.75);
else
self:settextf("%s Stage", ToEnumShortString(curStage));
self:zoom(1);
end;
end;
-- StepMania is being stupid so we have to do this here;
self:diffuse(StageToColor(curStage));
self:diffusetopedge(ColorLightTone(StageToColor(curStage)));
end;
};
};
local curScreen = Var "LoadingScreen";
local curStage = GAMESTATE:GetCurrentStage();
local curStageIndex = GAMESTATE:GetCurrentStageIndex();
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black",64,12);
LoadFont("Common Normal") .. {
InitCommand=cmd(y,-1;shadowlength,1;);
BeginCommand=function(self)
local top = SCREENMAN:GetTopScreen()
if top then
if not string.find(top:GetName(),"ScreenEvaluation") then
curStageIndex = curStageIndex + 1
end
end
self:playcommand("Set")
end;
SetCommand=function(self)
if GAMESTATE:GetCurrentCourse() then
self:settext( curStageIndex+1 .. " / " .. GAMESTATE:GetCurrentCourse():GetEstimatedNumStages() );
elseif GAMESTATE:IsEventMode() then
self:settextf("Stage %s", curStageIndex);
else
if THEME:GetMetric(curScreen,"StageDisplayUseShortString") then
self:settextf("%s", ToEnumShortString(curStage));
self:zoom(0.75);
else
self:settextf("%s Stage", ToEnumShortString(curStage));
self:zoom(1);
end;
end;
-- StepMania is being stupid so we have to do this here;
self:diffuse(StageToColor(curStage));
self:diffusetopedge(ColorLightTone(StageToColor(curStage)));
end;
};
};
return t
@@ -2,9 +2,7 @@ local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
Def.Quad {
InitCommand=function(self)
self:zoomto(32,32);
end;
InitCommand=cmd(zoomto,32,32);
};
};
@@ -2,9 +2,7 @@ local sString;
local t = Def.ActorFrame{
LoadFont("Common normal")..{
InitCommand=function(self)
self:shadowlength(1);
end;
InitCommand=cmd(shadowlength,1);
SetMessageCommand=function(self,param)
if param.StepsType then
sString = THEME:GetString("StepsDisplay StepsType",ToEnumShortString(param.StepsType));
@@ -17,6 +15,15 @@ local t = Def.ActorFrame{
end;
end;
};
-- argh this isn't working as nicely as I would've hoped...
--[[
Def.Sprite{
SetMessageCommand=function(self,param)
self:Load( THEME:GetPathG("","_StepsType/"..ToEnumShortString(param.StepsType)) );
self:diffusealpha(0.5);
end;
};
--]]
};
return t;
@@ -1,31 +1,16 @@
local t = Def.ActorFrame{};
t[#t+1] = LoadActor("_badge") .. {
InitCommand=function(self)
self:shadowlength(1);
self:diffuse(Color.Green);
self:pulse();
self:effectmagnitude(0.875, 1, 1);
self:effecttiming(0, 0, 1, 0);
self:effectclock('beatnooffset');
self:effectperiod(2);
end;
InitCommand=cmd(shadowlength,1;diffuse,Color.Green;pulse;effectmagnitude,0.875,1,1;effecttiming,0,0,1,0
effectclock,'beatnooffset';effectperiod,2);
};
t[#t+1] = Def.Quad {
InitCommand=function(self)
self:zoomto(40, 20);
self:diffuse(Color.Black);
self:diffusealpha(0.5);
self:fadeleft(0.25);
self:faderight(0.25);
end;
InitCommand=cmd(zoomto,40,20;diffuse,Color.Black;
diffusealpha,0.5;fadeleft,0.25;faderight,0.25);
};
t[#t+1] = LoadFont("Common","Normal") .. {
Text="AG";
InitCommand=function(self)
self:shadowlength(1);
self:zoom(0.875);
end;
InitCommand=cmd(shadowlength,1;zoom,0.875);
};
return t;
@@ -1,12 +1,10 @@
local sString;
local t = Def.ActorFrame{
--[[ LoadActor("TestStep") .. {
InitCommand=cmd(zoomto,20,20);
}; --]]
LoadFont("Common normal")..{
InitCommand=function(self)
self:shadowlength(1);
self:horizalign(left);
self:zoom(0.45);
self:skewx(-0.125);
end;
InitCommand=cmd(shadowlength,1;horizalign,left;zoom,0.45;skewx,-0.125);
SetMessageCommand=function(self,param)
sString = THEME:GetString("StepsListDisplayRow StepsType",ToEnumShortString(param.StepsType));
if param.Steps and param.Steps:IsAutogen() then
@@ -17,6 +15,15 @@ local t = Def.ActorFrame{
self:settext( sString );
end;
};
-- argh this isn't working as nicely as I would've hoped...
--[[
Def.Sprite{
SetMessageCommand=function(self,param)
self:Load( THEME:GetPathG("","_StepsType/"..ToEnumShortString(param.StepsType)) );
self:diffusealpha(0.5);
end;
};
--]]
};
return t;