tweak lifebar, scrollbar thumb, cdtitle

This commit is contained in:
ListenerJubatus
2018-02-20 23:24:35 -06:00
parent 6a27a192b3
commit e7cc45a2e0
4 changed files with 36 additions and 31 deletions
@@ -419,6 +419,39 @@ t[#t+1] = StandardDecorationFromTable("PercentScore"..ToEnumShortString(PLAYER_2
end; end;
if not GAMESTATE:IsCourseMode() then
-- CD title
local function CDTitleUpdate(self)
local song = GAMESTATE:GetCurrentSong();
local cdtitle = self:GetChild("CDTitle");
local height = cdtitle:GetHeight();
if song then
if song:HasCDTitle() then
cdtitle:visible(true);
cdtitle:Load(song:GetCDTitlePath());
else
cdtitle:visible(false);
end;
else
cdtitle:visible(false);
end;
self:zoom(scale(height,64,480,1,64/480))
end;
t[#t+1] = Def.ActorFrame {
OnCommand=cmd(draworder,46;x,SCREEN_CENTER_X-420;y,SCREEN_CENTER_Y-147;zoom,0;sleep,0.5;decelerate,0.25;zoom,1;SetUpdateFunction,CDTitleUpdate);
OffCommand=cmd(decelerate,0.3;zoomy,0);
Def.Sprite {
Name="CDTitle";
OnCommand=cmd(draworder,46;zoom,0.75;diffusealpha,1;zoom,0;bounceend,0.35;zoom,0.75;);
BackCullCommand=cmd(diffuse,color("0.5,0.5,0.5,1"));
OffCommand=cmd(decelerate,0.3;zoomy,0);
};
};
end;
-- BPMDisplay -- BPMDisplay
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
InitCommand=cmd(draworder,126;visible,not GAMESTATE:IsCourseMode();); InitCommand=cmd(draworder,126;visible,not GAMESTATE:IsCourseMode(););
@@ -42,32 +42,4 @@ t[#t+1] = Def.ActorFrame {
}; };
}; };
if not GAMESTATE:IsCourseMode() then
-- CD title
t[#t+1] = Def.ActorFrame {
Def.Sprite {
name="CDTitle";
InitCommand=cmd(x,SCREEN_CENTER_X-40;y,SCREEN_CENTER_Y-140;zoom,0.75;);
OnCommand=cmd(zoomy,0.3;diffusealpha,0;decelerate,0.3;zoomy,0.75;diffusealpha,1);
OffCommand=cmd(decelerate,0.3;zoomy,0.3;diffusealpha,0;);
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
SetCommand=function(self)
local song = GAMESTATE:GetCurrentSong();
if song then
if song:HasCDTitle() then
self:Load(song:GetCDTitlePath())
self:visible(true)
else
self:Load(nil)
self:visible(false)
end
else
self:Load(nil)
self:visible(false)
end
end;
};
};
end;
return t return t
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 472 B

@@ -1,7 +1,7 @@
local pn = ... local pn = ...
local life_meter_width = 400 local life_meter_width = 400
local life_meter_num_segments = 46 local life_meter_num_segments = 80
local life_meter_height = 20 local life_meter_height = 20
local life_meter_tip_width = 2 local life_meter_tip_width = 2
local life_meter_tip_gap = 64 local life_meter_tip_gap = 64
@@ -94,9 +94,9 @@ t[#t+1] = Def.ActorFrame {
Def.Quad { Def.Quad {
Name="Fill", Name="Fill",
InitCommand=cmd(x,-life_meter_width/2;zoomto,life_meter_width,life_meter_height;horizalign,left), InitCommand=cmd(x,-life_meter_width/2;zoomto,life_meter_width,life_meter_height;horizalign,left),
OnCommand=cmd(diffuse,PlayerColor(pn);), OnCommand=cmd(diffuse,PlayerColor(pn);diffuse,PlayerColor(pn);),
-- --
HotCommand=cmd(diffuse,color("#FFB45E");glowshift;effectclock,'beat'), HotCommand=cmd(diffuse,color("#ff9232");diffuseshift;effectclock,'beat';effectcolor1,color("#ff9232");effectcolor2,color("#ffe263");),
AliveCommand=cmd(diffuse,PlayerColor(pn);stopeffect), AliveCommand=cmd(diffuse,PlayerColor(pn);stopeffect),
DangerCommand=cmd(diffuse,Color.Red;diffuseshift;effectclock,'beat';effectcolor1,Color.Red;effectcolor2,color("#FF797C");), DangerCommand=cmd(diffuse,Color.Red;diffuseshift;effectclock,'beat';effectcolor1,Color.Red;effectcolor2,color("#FF797C");),
DeadCommand=cmd(diffuse,Color.Red;stopeffect) DeadCommand=cmd(diffuse,Color.Red;stopeffect)