Page 1 of 1
mouse_button_filter doesn't work?
Posted: Tue Jun 04, 2019 10:57 pm
by ownlyme
It doesn't look like mouse_button_filter works..
i tried setting it to an array (just crashes) or setting different buttons (indexes) to true or false, but it has no effect... - neither gets the click-animation disabled, nor does the click-event get prevented..
Re: mouse_button_filter doesn't work?
Posted: Wed Jun 05, 2019 6:52 am
by Rseding91
This sounds like you simply don't know how the feature works. I'm going to move this to modding help.
Re: mouse_button_filter doesn't work?
Posted: Wed Jun 05, 2019 7:09 am
by eduran
Code: Select all
my_button.mouse_button_filter = {"left-and-right", "middle", "button-4"}
Re: mouse_button_filter doesn't work?
Posted: Wed Jun 05, 2019 3:52 pm
by ownlyme
Ah okay.. i guess i misunderstood the Description in the documentation where you wrote
dictionary string → boolean [Read-Write]
The code by eduran does work.
Re: mouse_button_filter doesn't work?
Posted: Wed Jun 05, 2019 4:06 pm
by Bilka
ownlyme wrote: Wed Jun 05, 2019 3:52 pm
Ah okay.. i guess i misunderstood the Description in the documentation where you wrote
dictionary string → boolean [Read-Write]
That's a documentation problem, thanks for pointing it out. Fixed for the next version. This is what it should link to:
https://lua-api.factorio.com/latest/Con ... uttonFlags
Re: mouse_button_filter doesn't work?
Posted: Wed Jun 05, 2019 5:15 pm
by eradicator
Bilka wrote: Wed Jun 05, 2019 4:06 pm
ownlyme wrote: Wed Jun 05, 2019 3:52 pm
Ah okay.. i guess i misunderstood the Description in the documentation where you wrote
dictionary string → boolean [Read-Write]
That's a documentation problem, thanks for pointing it out. Fixed for the next version. This is what it should link to:
https://lua-api.factorio.com/latest/Con ... uttonFlags
Different read/write formats are kinda rare. Maybe the "To
write to this..." deserves to be bold ;)?
Re: mouse_button_filter doesn't work?
Posted: Wed Jun 05, 2019 5:21 pm
by ownlyme
dictionary string → boolean sounds to me like there are boolean values, indexed by strings...
Re: mouse_button_filter doesn't work?
Posted: Wed Jun 05, 2019 7:05 pm
by eradicator
ownlyme wrote: Wed Jun 05, 2019 5:21 pm
dictionary string → boolean sounds to me like there are boolean values, indexed by strings...
When you *read* it.