The Gui.on_click and similar events do not seem to be functional
To Reproduce
Steps to reproduce the behavior:
--Gui.on_click("ii-close-button", function(e) window.close(e.player_index) end) Event.register(defines.events.on_gui_click, function(e) window.close(e.player_index) end, function(e) return e.element.name == "ii-close-button" end)
These two functions are expected to show the same behaviour, calling window.close when the button is clicked, but using the first handler is not working, while manually registering the event works.
Describe the Bug
The Gui.on_click and similar events do not seem to be functional
To Reproduce
Steps to reproduce the behavior:
--Gui.on_click("ii-close-button", function(e) window.close(e.player_index) end) Event.register(defines.events.on_gui_click, function(e) window.close(e.player_index) end, function(e) return e.element.name == "ii-close-button" end)
These two functions are expected to show the same behaviour, calling window.close when the button is clicked, but using the first handler is not working, while manually registering the event works.