Using UIMenu:MouseControlsEnabled to disable the mouse input for a UIMenu instance doesn't stop mouse clicks from activating the currently highlighted item.
Steps to Reproduce
Create a menu with at least 1 item in it.
local menu = UIMenu.New('Menu', 'Subtitle')
local testButton = UIMenuItem.New('Test', 'Description')
testButton.Activated = function(menu, item)
print('boom!')
end
menu:AddItem(testButton)
menu:MouseControlsEnabled(false)
menu:Visible(true)
Once the menu is on screen and the option is highlighted, click the left mouse button.
Observe boom! being printed in the F8 console.
Expected Behavior
UIMenu:MouseControlsEnabled should prevent mouse buttons from interacting with the menu.
Additional Notes
With mouse controls enabled, clicking menu items with the mouse might occasionally crash the game. This is best reproduced with at least 3 menu items to click between.
Issue
Using
UIMenu:MouseControlsEnabled
to disable the mouse input for a UIMenu instance doesn't stop mouse clicks from activating the currently highlighted item.Steps to Reproduce
Create a menu with at least 1 item in it.
Once the menu is on screen and the option is highlighted, click the left mouse button.
Observe
boom!
being printed in the F8 console.Expected Behavior
UIMenu:MouseControlsEnabled
should prevent mouse buttons from interacting with the menu.Additional Notes
With mouse controls enabled, clicking menu items with the mouse might occasionally crash the game. This is best reproduced with at least 3 menu items to click between.