Skip to content

Commit

Permalink
Merge remote-tracking branch 'etterna/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Nov 24, 2018
2 parents 400e429 + cfc8edc commit 2c0e2b3
Show file tree
Hide file tree
Showing 36 changed files with 871 additions and 1,218 deletions.
4 changes: 2 additions & 2 deletions CMake/SMDefs.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Set up version numbers according to the new scheme.
set(SM_VERSION_MAJOR 0)
set(SM_VERSION_MINOR 62)
set(SM_VERSION_PATCH 1)
set(SM_VERSION_MINOR 63)
set(SM_VERSION_PATCH 0)
set(SM_VERSION_TRADITIONAL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")

execute_process(COMMAND git rev-parse --short HEAD
Expand Down
Binary file modified Data/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ local t =
CurrentRateChangedMessageCommand = function(self)
self:queuecommand("Set")
end,
RefreshChartInfoMessageCommand = function(self)
self:queuecommand("Set")
end,
TabChangedMessageCommand = function(self)
self:queuecommand("Set")
end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ local t =
end
end

MESSAGEMAN:Broadcast("UpdateMSDInfo")
if song and steps then
cd:visible(true)
else
Expand All @@ -69,7 +68,7 @@ local t =
CurrentRateChangedMessageCommand = function(self)
self:queuecommand("Set")
end,
RefreshChartInfoMessageCommand = function(self)
CurrentStepsP1ChangedMessageCommand = function(self)
self:queuecommand("Set")
end,
TabChangedMessageCommand = function(self)
Expand All @@ -94,9 +93,6 @@ local function littlebits(i)
InitCommand = function(self)
self:xy(frameX + offsetX, frameY + 120 + 22 * i):halign(0):valign(0):zoom(0.5):maxwidth(160 / 0.6)
end,
BeginCommand = function(self)
self:queuecommand("Set")
end,
SetCommand = function(self)
--skillset name
if song and steps then
Expand All @@ -114,19 +110,13 @@ local function littlebits(i)
if steps and steps:GetTimingData():HasWarps() then
self:settext("")
end
end,
UpdateMSDInfoCommand = function(self)
self:queuecommand("Set")
end
},
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(frameX + 225, frameY + 120 + 22 * i):halign(1):valign(0):zoom(0.5):maxwidth(110 / 0.6)
end,
BeginCommand = function(self)
self:queuecommand("Set")
end,
SetCommand = function(self)
if song and steps then
self:settextf("%05.2f", meter[i + 1])
Expand All @@ -138,12 +128,6 @@ local function littlebits(i)
if steps and steps:GetTimingData():HasWarps() then
self:settext("")
end
end,
CurrentRateChangedMessageCommand = function(self)
self:queuecommand("Set")
end,
UpdateMSDInfoCommand = function(self)
self:queuecommand("Set")
end
}
}
Expand All @@ -160,17 +144,15 @@ t[#t + 1] =
end
}
t[#t + 1] =
LoadFont("Common Normal") ..
{
LoadFont("Common Normal") .. {
InitCommand = function(self)
self:xy(frameX + 5, frameY + offsetY - 9):zoom(0.6):halign(0):diffuse(getMainColor("positive")):settext(
"MSD Breakdown (Wip)"
)
end
}
t[#t + 1] =
LoadFont("Common Large") ..
{
LoadFont("Common Large") .. {
InitCommand = function(self)
self:xy(frameX + 5, frameY + 35):zoom(0.6):halign(0):diffuse(getMainColor("positive")):maxwidth(
SCREEN_CENTER_X / 0.7
Expand All @@ -182,9 +164,6 @@ t[#t + 1] =
else
self:settext("")
end
end,
UpdateMSDInfoCommand = function(self)
self:queuecommand("Set")
end
}

Expand All @@ -199,16 +178,12 @@ t[#t + 1] =
end,
SetCommand = function(self)
self:settext(getCurRateDisplayString())
end,
CurrentRateChangedCommand = function(self)
self:queuecommand("set")
end
}

--Difficulty
t[#t + 1] =
LoadFont("Common Normal") ..
{
LoadFont("Common Normal") .. {
Name = "StepsAndMeter",
InitCommand = function(self)
self:xy(frameX + offsetX, frameY + offsetY + 50):zoom(0.5):halign(0)
Expand All @@ -224,16 +199,12 @@ t[#t + 1] =
self:diffuse(getDifficultyColor(GetCustomDifficulty(steps:GetStepsType(), steps:GetDifficulty())))
end
end
end,
ScoreUpdateMessageCommand = function(self)
self:queuecommand("Set")
end
}

--NPS
t[#t + 1] =
LoadFont("Common Normal") ..
{
LoadFont("Common Normal") .. {
Name = "NPS",
InitCommand = function(self)
self:xy(frameX + offsetX, frameY + 60):zoom(0.4):halign(0)
Expand All @@ -251,22 +222,12 @@ t[#t + 1] =
else
self:settext("0.00 Average NPS")
end
end,
CurrentSongChangedMessageCommand = function(self)
self:queuecommand("Set")
end,
CurrentStepsP1ChangedMessageCommand = function(self)
self:queuecommand("Set")
end,
CurrentStepsP2ChangedMessageCommand = function(self)
self:queuecommand("Set")
end
}

--Negative BPMs label
t[#t + 1] =
LoadFont("Common Normal") ..
{
LoadFont("Common Normal") .. {
InitCommand = function(self)
self:xy(frameX + 45, frameY + 135):zoom(0.8):halign(0):diffuse(getMainColor("negative")):settext("Negative Bpms")
end,
Expand All @@ -276,9 +237,6 @@ t[#t + 1] =
else
self:settext("")
end
end,
UpdateMSDInfoCommand = function(self)
self:queuecommand("Set")
end
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ end

-- should maybe make some of these generic
local function highlight(self)
self:queuecommand("Highlight")
if self:GetVisible() then
self:queuecommand("Highlight")
end
end

-- note: will use the local isover functionality
Expand All @@ -84,20 +86,26 @@ local function highlightIfOver(self)
self:diffusealpha(1)
end
end

local moped
-- Only works if ... it should work
-- You know, if we can see the place where the scores should be.
local function updateLeaderBoardForCurrentChart()
local top = SCREENMAN:GetTopScreen()
if top:GetMusicWheel():IsSettled() and ((getTabIndex() == 2 and nestedTab == 2) or collapsed) then
local chartkey = GAMESTATE:GetCurrentSteps(PLAYER_1):GetChartKey()
DLMAN:RequestChartLeaderBoardFromOnline(chartkey)
local steps = GAMESTATE:GetCurrentSteps(PLAYER_1)
if steps then
DLMAN:RequestChartLeaderBoardFromOnline(steps:GetChartKey())
moped:queuecommand("ChartLeaderboardUpdate")
else
moped:queuecommand("Bort")
end
end
end

local ret =
Def.ActorFrame {
BeginCommand = function(self)
moped = self:GetChild("ScoreDisplay")
self:queuecommand("Set"):visible(false)
self:GetChild("LocalScores"):xy(frameX, frameY):visible(false)
self:GetChild("ScoreDisplay"):xy(frameX, frameY):visible(false)
Expand All @@ -111,11 +119,14 @@ local ret =
end,
OffCommand = function(self)
self:bouncebegin(0.2):xy(-500, 0):diffusealpha(0) -- visible(false)
self:GetChild("LocalScores"):visible(false)
end,
OnCommand = function(self)
self:bouncebegin(0.2):xy(0, 0):diffusealpha(1)
if nestedTab == 1 then
if getTabIndex() == 2 and nestedTab == 1 then
self:GetChild("LocalScores"):visible(true)
else
self:GetChild("LocalScores"):visible(false)
end
end,
SetCommand = function(self)
Expand Down Expand Up @@ -143,9 +154,6 @@ local ret =
self:queuecommand("Set")
updateLeaderBoardForCurrentChart()
end,
UpdateChartMessageCommand = function(self)
self:queuecommand("Set")
end,
CollapseCommand = function(self)
collapsed = true
resetTabIndex()
Expand All @@ -169,11 +177,12 @@ local ret =
updateLeaderBoardForCurrentChart()
end,
CurrentStepsP1ChangedMessageCommand = function(self)
self:queuecommand("Set")
updateLeaderBoardForCurrentChart()
end,
CurrentRateChangedMessageCommand = function(self)
if ((getTabIndex() == 2 and nestedTab == 2) or collapsed) and DLMAN:GetCurrentRateFilter() then
MESSAGEMAN:Broadcast("ChartLeaderboardUpdate")
moped:queuecommand("ChartLeaderboardUpdate")
end
end
}
Expand Down Expand Up @@ -334,7 +343,7 @@ local l = Def.ActorFrame{ -- stuff inside the frame.. so we can move it all at o
{
Name = "Score",
InitCommand = function(self)
self:xy(55, 33):zoom(0.6):halign(0):settext("")
self:xy(55, 30):zoom(0.6):halign(0):settext("")
end,
DisplayCommand = function(self)
if score:GetWifeScore() == 0 then
Expand All @@ -346,11 +355,26 @@ local l = Def.ActorFrame{ -- stuff inside the frame.. so we can move it all at o
end
},

LoadFont("Common Normal") ..
{
Name = "Score",
InitCommand = function(self)
self:xy(55, 43):zoom(0.5):halign(0):settext("")
end,
DisplayCommand = function(self)
if score:GetWifeScore() == 0 then
self:settext("")
else
self:settext(GAMESTATE:GetCurrentSteps(PLAYER_1):GetRelevantSkillsetsByMSDRank(getCurRateValue(), 1))
end
end
},

LoadFont("Common Normal") ..
{
Name = "ClearType",
InitCommand = function(self)
self:y(41):zoom(0.5):halign(0):halign(0):settext("No Play"):diffuse(
self:y(43):zoom(0.5):halign(0):settext("No Play"):diffuse(
color(colorConfig:get_data().clearType["NoPlay"])
)
end,
Expand Down Expand Up @@ -656,9 +680,6 @@ t[#t+1] = Def.Quad {
InitCommand = function(self)
self:x(frameWidth):zoomto(4, 0):halign(1):valign(1):diffuse(getMainColor("highlight")):diffusealpha(0.75)
end,
ScoreUpdateMessageCommand = function(self)
self:queuecommand("Set")
end,
DisplayCommand = function(self)
self:finishtweening()
self:smooth(0.2)
Expand Down Expand Up @@ -702,7 +723,6 @@ function nestedTabButton(i)
if isOver(self) then
nestedTab = i
MESSAGEMAN:Broadcast("NestedTabChanged")
MESSAGEMAN:Broadcast("ChartLeaderboardUpdate")
if nestedTab == 1 then
self:GetParent():GetParent():GetChild("ScoreDisplay"):visible(false)
self:GetParent():GetParent():GetParent():GetChild("StepsDisplay"):visible(true)
Expand All @@ -711,9 +731,6 @@ function nestedTabButton(i)
self:GetParent():GetParent():GetParent():GetChild("StepsDisplay"):visible(false)
end
end
end,
NestedTabChangedMessageCommand = function(self)
self:queuecommand("Set")
end
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,62 +0,0 @@
local update = false
local t =
Def.ActorFrame {
BeginCommand = function(self)
self:queuecommand("Set")
end,
OffCommand = function(self)
self:bouncebegin(0.2):xy(-500, 0) -- visible(false)
end,
OnCommand = function(self)
self:bouncebegin(0.2):xy(0, 0)
end,
SetCommand = function(self)
self:finishtweening()
if getTabIndex() == 0 then
self:queuecommand("On")
update = true
else
self:queuecommand("Off")
update = false
end
end,
TabChangedMessageCommand = function(self)
self:queuecommand("Set")
end,
ChartPreviewOnMessageCommand = function(self)
self:visible(false)
end,
ChartPreviewOffMessageCommand = function(self)
self:visible(true)
end,
}

t[#t + 1] =
Def.Banner {
InitCommand = function(self)
self:x(10):y(61):halign(0):valign(0):scaletoclipped(
capWideScale(get43size(384), 384),
capWideScale(get43size(120), 120)
)
end,
SetMessageCommand = function(self)
if update then
local top = SCREENMAN:GetTopScreen()
if top:GetName() == "ScreenSelectMusic" or top:GetName() == "ScreenNetSelectMusic" then
local song = GAMESTATE:GetCurrentSong()
local group = top:GetMusicWheel():GetSelectedSection()
if song then
self:LoadFromSong(song)
elseif group then
self:LoadFromSongGroup(group)
end
end
end
self:scaletoclipped(capWideScale(get43size(384), 384), capWideScale(get43size(120), 120))
end,
CurrentSongChangedMessageCommand = function(self)
self:queuecommand("Set")
end
}

return t
Loading

0 comments on commit 2c0e2b3

Please sign in to comment.