Files
itgmania212121/Themes/default/Graphics/ScreenSelectMusic DifficultyList.lua
T

90 lines
2.6 KiB
Lua
Raw Normal View History

2018-05-10 17:19:15 -07:00
local function arrow_bounce(self, x, y)
self:bounce()
self:effectmagnitude(x,y,0)
self:effecttiming(0,0,0.75,0.25)
self:effectclock('bgm')
end
2011-03-17 01:47:30 -04:00
return Def.ActorFrame {
CurrentSongChangedMessageCommand=function(self)
2018-05-10 17:19:15 -07:00
local song = GAMESTATE:GetCurrentSong();
2011-03-17 01:47:30 -04:00
if song then
2013-07-18 18:02:01 -04:00
-- self:setaux(0);
2011-03-17 01:47:30 -04:00
self:finishtweening();
2017-08-08 01:07:34 -06:00
self:decelerate(0.3):zoomx(1):diffusealpha(1)
2011-03-17 01:47:30 -04:00
elseif not song and self:GetZoomX() == 1 then
2013-07-18 18:02:01 -04:00
-- self:setaux(1);
2011-03-17 01:47:30 -04:00
self:finishtweening();
2017-08-08 01:07:34 -06:00
self:decelerate(0.3):zoomx(0):diffusealpha(0)
2011-03-17 01:47:30 -04:00
end;
end;
Def.StepsDisplayList {
Name="StepsDisplayListRow";
2017-08-08 01:07:34 -06:00
OnCommand=function(self)
self:diffusealpha(0):zoomx(0):decelerate(0.4):zoomx(1):diffusealpha(1)
end;
OffCommand=function(self)
self:decelerate(0.3):zoomx(0):diffusealpha(0)
end;
2011-03-17 01:47:30 -04:00
CursorP1 = Def.ActorFrame {
2018-05-10 17:19:15 -07:00
InitCommand=function(self)
self:x(-174)
self:player(PLAYER_1)
arrow_bounce(self, 5, 0)
end,
2011-03-17 01:47:30 -04:00
PlayerJoinedMessageCommand=function(self, params)
if params.Player == PLAYER_1 then
self:visible(true);
2013-07-18 18:02:01 -04:00
(cmd(zoom,0;bounceend,1;zoom,1))(self);
2011-03-17 01:47:30 -04:00
end;
end;
PlayerUnjoinedMessageCommand=function(self, params)
if params.Player == PLAYER_1 then
self:visible(true);
2013-07-18 18:02:01 -04:00
(cmd(bouncebegin,1;zoom,0))(self);
2011-03-17 01:47:30 -04:00
end;
end;
LoadActor(THEME:GetPathG("_StepsDisplayListRow","Cursor")) .. {
2017-08-08 01:07:34 -06:00
InitCommand=cmd(diffuse,ColorLightTone(PlayerColor(PLAYER_1));x,8;zoom,0.75);
2011-03-17 01:47:30 -04:00
};
2017-12-30 11:35:22 -06:00
LoadFont("_roboto condensed Bold 48px") .. {
Text="P1";
2018-08-14 14:19:02 -06:00
InitCommand=cmd(horizalign,center;x,8;diffuse,ColorDarkTone(PlayerColor(PLAYER_1)));
2017-12-30 11:35:22 -06:00
OnCommand=cmd(zoom,0.5);
};
2011-03-17 01:47:30 -04:00
};
CursorP2 = Def.ActorFrame {
2018-05-10 17:19:15 -07:00
InitCommand=function(self)
self:x(174)
self:player(PLAYER_2)
arrow_bounce(self, -5, 0)
end,
2011-03-17 01:47:30 -04:00
PlayerJoinedMessageCommand=function(self, params)
if params.Player == PLAYER_2 then
self:visible(true);
2013-07-18 18:02:01 -04:00
(cmd(zoom,0;bounceend,1;zoom,1))(self);
2011-03-17 01:47:30 -04:00
end;
end;
PlayerUnjoinedMessageCommand=function(self, params)
if params.Player == PLAYER_2 then
self:visible(true);
2013-07-18 18:02:01 -04:00
(cmd(bouncebegin,1;zoom,0))(self);
2011-03-17 01:47:30 -04:00
end;
end;
LoadActor(THEME:GetPathG("_StepsDisplayListRow","Cursor")) .. {
2018-08-14 14:19:02 -06:00
InitCommand=cmd(diffuse,ColorLightTone(PlayerColor(PLAYER_2));x,-8;zoom,0.75;zoomx,-0.75);
2011-03-17 01:47:30 -04:00
};
2017-12-30 11:35:22 -06:00
LoadFont("_roboto condensed Bold 48px") .. {
Text="P2";
2018-08-14 14:19:02 -06:00
InitCommand=cmd(horizalign,center;x,-8;diffuse,ColorDarkTone(PlayerColor(PLAYER_2)));
2017-12-30 11:35:22 -06:00
OnCommand=cmd(zoom,0.5);
};
2011-03-17 01:47:30 -04:00
};
CursorP1Frame = Def.Actor{
2013-07-18 18:02:01 -04:00
ChangeCommand=cmd(stoptweening;decelerate,0.05);
2011-03-17 01:47:30 -04:00
};
CursorP2Frame = Def.Actor{
2013-07-18 18:02:01 -04:00
ChangeCommand=cmd(stoptweening;decelerate,0.05);
2011-03-17 01:47:30 -04:00
};
};
2018-08-14 14:19:02 -06:00
};