Skip to content

Commit

Permalink
Patched a wheel scrolling a list while a replay is chosen.
Browse files Browse the repository at this point in the history
Also added a text notif. about disabled scrolling on the top of the window.
  • Loading branch information
Tetro48 committed Mar 14, 2023
1 parent 73c2900 commit 8dc8715
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scene/replay_select.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ function ReplaySelectScene:render()
end
end
elseif self.chosen_replay then
love.graphics.setFont(font_3x5_2)
love.graphics.setColor(1, 1, 0)
love.graphics.printf("Scrolling a list of replays is disabled.", 0, 10, 640, "center")
love.graphics.setColor(1, 1, 1)
local pointer = replay_tree[self.menu_state.submenu][self.menu_state.replay]
local replay = replays[pointer]
if replay then
Expand Down Expand Up @@ -433,7 +437,7 @@ function ReplaySelectScene:onInputPress(e)
end
elseif not loaded_replays then
--does nothing.
elseif e.type == "wheel" then
elseif e.type == "wheel" and not self.chosen_replay then
if e.y ~= 0 then
self:changeOption(-e.y)
end
Expand Down

0 comments on commit 8dc8715

Please sign in to comment.