[0.16.19] Middle Mouse click not detected in on_gui_click

Bugs that are actually features.
Post Reply
Peppe
Fast Inserter
Fast Inserter
Posts: 223
Joined: Fri Nov 28, 2014 6:48 pm
Contact:

[0.16.19] Middle Mouse click not detected in on_gui_click

Post by Peppe »

Middle Mouse click not detected in on_gui_click event

Works in .15 does not work in .16.


script.on_event(defines.events.on_gui_click, function(event)
local button = event.button

-- Print button to player chat

)

Left click prints 2
Right click prints 4
Middle click no output, not captured ?


Full mod: https://mods.factorio.com/mod/production-monitor

Rseding91
Factorio Staff
Factorio Staff
Posts: 13198
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.19] Middle Mouse click not detected in on_gui_click

Post by Rseding91 »

Thanks for the report. By default buttons only respond to left/right click. If you want them to respond to other buttons you need to set the mouse button filter to include the ones you want. http://lua-api.factorio.com/latest/LuaG ... ton_filter
If you want to get ahold of me I'm almost always on Discord.

Peppe
Fast Inserter
Fast Inserter
Posts: 223
Joined: Fri Nov 28, 2014 6:48 pm
Contact:

Re: [0.16.19] Middle Mouse click not detected in on_gui_click

Post by Peppe »

Rseding91 wrote:Thanks for the report. By default buttons only respond to left/right click. If you want them to respond to other buttons you need to set the mouse button filter to include the ones you want. http://lua-api.factorio.com/latest/LuaG ... ton_filter
That would do it.

Resolved Thanks,
Peppe

Post Reply

Return to “Not a bug”