Skip to content

Commit

Permalink
Merge pull request #1 from xwidghet/master
Browse files Browse the repository at this point in the history
update to master
  • Loading branch information
nico-abram authored Jan 17, 2017
2 parents 43fddfb + 30c0d5f commit e9f6ab6
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 969 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ t[#t+1] = LoadActor("../_chatbox")
--t[#t+1] = LoadActor("kappa")
--t[#t+1] = LoadActor("msd stuff")
--t[#t+1] = LoadActor("matra")
t[#t+1] = LoadActor("profile")
t[#t+1] = LoadActor("msd")
t[#t+1] = LoadActor("songsearch")
t[#t+1] = LoadActor("../ScreenSelectMusic decorations/profile")
t[#t+1] = LoadActor("../ScreenSelectMusic decorations/msd")
t[#t+1] = LoadActor("../ScreenSelectMusic decorations/songsearch")
t[#t+1] = LoadActor("tabs")
t[#t+1] = LoadActor("score")
t[#t+1] = LoadActor("../ScreenSelectMusic decorations/score")
t[#t+1] = LoadActor("dumbrate")
t[#t+1] = LoadActor("../ScreenSelectMusic decorations/filters")

local g = Def.ActorFrame{
TabChangedMessageCommand=function(self)
Expand All @@ -28,10 +30,6 @@ local g = Def.ActorFrame{
end,
}





g[#g+1] = Def.Banner{
InitCommand=cmd(x,10;y,60;halign,0;valign,0);
SetMessageCommand=function(self)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--A dumb way of getting the rate to update online. -Misterkister

--Local vars
local update = false
local steps
Expand All @@ -14,16 +16,25 @@ local pn = GAMESTATE:GetEnabledPlayers()[1]
local greatest = 0
local steps
local meter = {}
local curateX = frameX+frameWidth+5
local curateY = frameY+offsetY+140
meter[1] = 0.00

--4:3 ratio. -Misterkister
if not IsUsingWideScreen() == true then
curateX = frameX+frameWidth-40
curateY = frameY+offsetY-20

end

--Actor Frame
local t = Def.ActorFrame{
BeginCommand=cmd(queuecommand,"Set";visible,false),
OffCommand=cmd(bouncebegin,0.2;xy,-500,0;diffusealpha,0),
OnCommand=cmd(bouncebegin,0.2;xy,0,0;diffusealpha,1),
SetCommand=function(self)
self:finishtweening()
if getTabIndex() == 1 then
if getTabIndex() == 0 then
self:queuecommand("On")
self:visible(true)
song = GAMESTATE:GetCurrentSong()
Expand Down Expand Up @@ -53,9 +64,6 @@ local t = Def.ActorFrame{
PlayerJoinedMessageCommand=cmd(queuecommand,"Set"),
}

--BG quad
t[#t+1] = Def.Quad{InitCommand=cmd(xy,frameX,frameY;zoomto,frameWidth,frameHeight;halign,0;valign,0;diffuse,color("#333333CC"))}

--Skillset label function
local function littlebits(i)
local t = Def.ActorFrame{
Expand Down Expand Up @@ -96,78 +104,13 @@ local function littlebits(i)
return t
end

--Song Title
t[#t+1] = Def.Quad{InitCommand=cmd(xy,frameX,frameY;zoomto,frameWidth,offsetY;halign,0;valign,0;diffuse,getMainColor('frames');diffusealpha,0.5)}
t[#t+1] = LoadFont("Common Normal")..{InitCommand=cmd(xy,frameX+5,frameY+offsetY-9;zoom,0.6;halign,0;diffuse,getMainColor('positive');settext,"MSD Breakdown (Wip)")}
t[#t+1] = LoadFont("Common Large")..{
InitCommand=cmd(xy,frameX+5,frameY+35;zoom,0.6;halign,0;diffuse,getMainColor('positive');maxwidth,SCREEN_CENTER_X/0.7),
SetCommand=function(self)
if song then
self:settext(song:GetDisplayMainTitle())
else
self:settext("")
end
end,
UpdateMSDInfoCommand=cmd(queuecommand,"Set"),
}


-- Music Rate Display
t[#t+1] = LoadFont("Common Large") .. {
InitCommand=cmd(xy,frameX+frameWidth-100,frameY+offsetY+65;visible,true;halign,0;zoom,0.4;maxwidth,capWideScale(get43size(360),360)/capWideScale(get43size(0.45),0.45)),
InitCommand=cmd(xy,curateX,curateY;visible,true;halign,0;zoom,0.35;maxwidth,capWideScale(get43size(360),360)/capWideScale(get43size(0.45),0.45)),
SetCommand=function(self)
self:settext(getCurRateDisplayString())
end,
CurrentRateChangedCommand=cmd(queuecommand,"set")
}

--Difficulty
t[#t+1] = LoadFont("Common Normal")..{
Name="StepsAndMeter",
InitCommand=cmd(xy,frameX+frameWidth-offsetX,frameY+offsetY+50;zoom,0.5;halign,1),
SetCommand=function(self)
steps = GAMESTATE:GetCurrentSteps(pn)
if steps ~= nil then
local diff = getDifficulty(steps:GetDifficulty())
local stype = ToEnumShortString(steps:GetStepsType()):gsub("%_"," ")
local meter = steps:GetMeter()
if update then
self:settext(stype.." "..diff.." "..meter)
self:diffuse(getDifficultyColor(GetCustomDifficulty(steps:GetStepsType(),steps:GetDifficulty())))
end
end
end,
ScoreUpdateMessageCommand=cmd(queuecommand,"Set")
}


--NPS
t[#t+1] = LoadFont("Common Normal")..{
Name="NPS";
InitCommand=cmd(xy,frameX+frameWidth-15,frameY+60;zoom,0.4;halign,1;);
SetCommand=function(self)
steps = GAMESTATE:GetCurrentSteps(pn)
--local song = GAMESTATE:GetCurrentSong()
local notecount = 0
local length = 1
if steps ~= nil and song ~= nil and update then
length = song:GetStepsSeconds()
notecount = steps:GetRadarValues(pn):GetValue("RadarCategory_Notes")
self:settext(string.format("%0.2f Average NPS",notecount/length))
self:diffuse(Saturation(getDifficultyColor(GetCustomDifficulty(steps:GetStepsType(),steps:GetDifficulty())),0.3))
else
self:settext("0.00 Average NPS")
end
end;
CurrentSongChangedMessageCommand=cmd(queuecommand,"Set");
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set");
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set");
};


--Skillset labels
for i=1,#ms.SkillSets do
t[#t+1] = littlebits(i)
end

return t
Loading

0 comments on commit e9f6ab6

Please sign in to comment.