Skip to content

Commit

Permalink
Merge pull request #3 from Nickito12/etternalmemestatus
Browse files Browse the repository at this point in the history
Couple of fixes for NetSelectMusic
  • Loading branch information
martensm authored Jun 25, 2017
2 parents 7be1b36 + 7d0a25d commit 9ff708f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,20 @@ g[#g+1] = Def.Banner{
InitCommand=cmd(x,10;y,60;halign,0;valign,0);
SetMessageCommand=function(self)
local top = SCREENMAN:GetTopScreen()
if top:GetName() == "ScreenSelectMusic" then
if top:GetName() == "ScreenSelectMusic" or top:GetName() == "ScreenNetSelectMusic" then
local song = GAMESTATE:GetCurrentSong()
local course = GAMESTATE:GetCurrentCourse()
local group = top:GetMusicWheel():GetSelectedSection()
if song then
self:LoadFromSong(song)
elseif course then
self:LoadFromCourse(song)
elseif group then
self:LoadFromSongGroup(group)
end;
elseif top:GetName() == "ScreenNetSelectMusic" then
local song = GAMESTATE:GetCurrentSong()
local course = GAMESTATE:GetCurrentCourse()
local group = top:GetChild("MusicWheel"):GetSelectedSection()
if song then
self:LoadFromSong(song)
elseif course then
self:LoadFromCourse(song)
elseif group then
self:LoadFromSongGroup(group)
end;
end;
end
end
self:scaletoclipped(capWideScale(get43size(384),384),capWideScale(get43size(120),120))
end;
CurrentSongChangedMessageCommand=cmd(queuecommand,"Set"),
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set");
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set");
};
g[#g+1] = Def.Quad{
InitCommand=cmd(xy,10,60+capWideScale(get43size(120),120)-capWideScale(get43size(10),10);zoomto,capWideScale(get43size(384),384),capWideScale(get43size(20),20);halign,0;diffuse,color("#000000");diffusealpha,0.7);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ t[#t+1] = Def.Actor{
}

local function GetBestScoreByFilter(perc,CurRate)
local rtTable = getRateTable(PROFILEMAN:GetProfile(PLAYER_1):GetHighScoresByKey(getCurKey()))
local rtTable = getRateTable()
if not rtTable then return nil end

local rates = tableKeys(rtTable)
local scores, score

Expand All @@ -86,7 +88,7 @@ local function GetBestScoreByFilter(perc,CurRate)

for ii=1,#scores do
score = scores[ii]
if score:ConvertDpToWife() > bestscore and getClearTypeFromScore(PLAYER_1,score,0) ~= "Invalid" then
if score:ConvertDpToWife() > bestscore then
index = ii
bestscore = score:ConvertDpToWife()
end
Expand Down Expand Up @@ -313,6 +315,9 @@ t[#t+1] = Def.ActorFrame{
end,
RefreshChartInfoMessageCommand=cmd(queuecommand,"Set"),
CurrentRateChangedMessageCommand=cmd(queuecommand,"Set"),
CurrentSongChangedMessageCommand=cmd(queuecommand,"Set");
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set");
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set");
},

-- Primary ScoreType
Expand All @@ -332,6 +337,9 @@ t[#t+1] = Def.ActorFrame{
end,
CurrentRateChangedMessageCommand=cmd(queuecommand,"Set"),
RefreshChartInfoMessageCommand=cmd(queuecommand,"Set"),
CurrentSongChangedMessageCommand=cmd(queuecommand,"Set");
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set");
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set");
},

-- Secondary percent score
Expand Down Expand Up @@ -449,6 +457,9 @@ t[#t+1] = LoadFont("Common Large") .. {
end,
RefreshChartInfoMessageCommand=cmd(queuecommand,"Set"),
CurrentRateChangedMessageCommand=cmd(queuecommand,"Set"),
CurrentSongChangedMessageCommand=cmd(queuecommand,"Set");
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set");
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set");
}

--Tier Label revamped. -Misterkister
Expand Down

0 comments on commit 9ff708f

Please sign in to comment.