Skip to content

Commit

Permalink
Update Gameplay Lua according to song reload from inside Practice Mode
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Nov 7, 2019
1 parent aedd490 commit bb978df
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ local t =
end,
CurrentRateChangedMessageCommand = function(self)
self:queuecommand("Set")
end,
PracticeModeReloadMessageCommand = function(self)
self:queuecommand("Set")
end
},
LoadFont("Common Normal") ..
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,9 @@ local p =
end,
DoneLoadingNextSongMessageCommand = function(self)
self:settext(GAMESTATE:GetCurrentSong():GetDisplayMainTitle())
end,
PracticeModeReloadMessageCommand = function(self)
self:playcommand("Begin")
end
},
LoadFont("Common Normal") ..
Expand All @@ -766,6 +769,9 @@ local p =
local ttime = GetPlayableTime()
settext(self, SecondsToMMSS(ttime))
diffuse(self, byMusicLength(ttime))
end,
PracticeModeReloadMessageCommand = function(self)
self:playcommand("CurrentRateChanged")
end
},
MovableBorder(width, height, 1, 0, 0)
Expand Down Expand Up @@ -892,6 +898,9 @@ t[#t + 1] =
else
BPM:settextf("%5.2f", GetBPS(a) * r)
end
end,
PracticeModeReloadMessageCommand = function(self)
self:playcommand("CurrentRateChanged")
end
}

Expand Down Expand Up @@ -1080,6 +1089,9 @@ local pm =
self:SortByDrawOrder()
self:queuecommand("GraphUpdate")
end,
PracticeModeReloadMessageCommand = function(self)
musicratio = GAMESTATE:GetCurrentSong():GetLastSecond() / wodth
end,
Def.Quad {
Name = "BG",
InitCommand = function(self)
Expand Down Expand Up @@ -1185,6 +1197,9 @@ pm[#pm + 1] =
elseif loopEndPos and loopStartPos then
self:playcommand("RegionSet", {loopLength = (loopEndPos - loopStartPos)})
end
end,
PracticeModeReloadMessageCommand = function(self)
self:playcommand("CurrentRateChanged")
end
}

Expand Down
3 changes: 3 additions & 0 deletions Themes/Til Death/BGAnimations/_chorddensitygraph.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ local t = Def.ActorFrame {
ChartPreviewOnMessageCommand = function(self)
self:queuecommand("GraphUpdate")
end,
PracticeModeReloadMessageCommand = function(self)
self:queuecommand("GraphUpdate")
end,
Def.Quad {
Name = "cdbg",
InitCommand = function(self)
Expand Down

0 comments on commit bb978df

Please sign in to comment.