Skip to content

Commit

Permalink
rebirth prevent right clicking main menu buttons
Browse files Browse the repository at this point in the history
caused a race condition crash, not needed
  • Loading branch information
poco0317 committed Mar 4, 2022
1 parent ababa3f commit 651b6cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Themes/Rebirth/Graphics/ScreenTitleMenu scroller.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ return Def.ActorFrame {
local ind = findChoiceIndex(self:GetParent():GetName())
screen:SetSelectionIndex(ind)
end,
MouseDownCommand = function(self)
MouseDownCommand = function(self, params)
-- if not focused on the scroller, don't allow controlling it
if not TITLE:GetFocus() then return end

-- left click buttons only
if params.event ~= "DeviceButton_left mouse button" then return end

-- this should make clicking work the same as pressing enter
screen:PlaySelectSound()
screen:playcommand("MadeChoiceP1")
Expand Down

0 comments on commit 651b6cb

Please sign in to comment.