Skip to content

Commit

Permalink
Allow rate change & pausing in practice; add RestartGameplayPressed bool
Browse files Browse the repository at this point in the history
pausing in gameplay wow
also fixed a cryptic function name
and made sure rate changes get reset
as a side effect if you somehow change other mods in gameplay they reset too
  • Loading branch information
poco0317 committed Feb 10, 2019
1 parent 7939f48 commit 9748144
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,10 @@ local function duminput(event)
if bookmarkPosition ~= nil then
SCREENMAN:GetTopScreen():SetPreviewNoteFieldMusicPosition( bookmarkPosition )
end
elseif event.button == "EffectUp" and event.type == "InputEventType_FirstPress" then
SCREENMAN:GetTopScreen():AddToPracticeRate(0.05)
elseif event.button == "EffectDown" and event.type == "InputEventType_FirstPress" then
SCREENMAN:GetTopScreen():AddToPracticeRate(-0.05)
end
return false
end
Expand Down Expand Up @@ -955,6 +959,10 @@ pm[#pm + 1] = Def.Quad {
if isOver(self) then
bookmarkPosition = self:GetX() * musicratio
self:GetParent():GetChild("BookmarkPos"):queuecommand("Set")
else
if not (allowedCustomization) then
SCREENMAN:GetTopScreen():TogglePracticePause()
end
end
end
}
Expand Down
1 change: 1 addition & 0 deletions src/GameManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1737,6 +1737,7 @@ GameManager::GameManager()
m_sModsToReset;
m_vTurnsToReset;
m_iPreviousFail;
m_bRestartedGameplay;
// Register with Lua.
{
Lua* L = LUA->Get();
Expand Down
1 change: 1 addition & 0 deletions src/GameManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class GameManager
RString m_sModsToReset;
vector<RString> m_vTurnsToReset;
FailType m_iPreviousFail;
bool m_bRestartedGameplay;

// Lua
void PushSelf(lua_State* L);
Expand Down
Loading

0 comments on commit 9748144

Please sign in to comment.