mouse_button_filter doesn't work?

Place to get help with not working mods / modding interface.
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Dec 21, 2017 8:02 am
Contact:

mouse_button_filter doesn't work?

Post 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..
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
Rseding91
Factorio Staff
Factorio Staff
Posts: 15999
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: mouse_button_filter doesn't work?

Post by Rseding91 »

This sounds like you simply don't know how the feature works. I'm going to move this to modding help.
If you want to get ahold of me I'm almost always on Discord.
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: mouse_button_filter doesn't work?

Post by eduran »

Code: Select all

my_button.mouse_button_filter = {"left-and-right", "middle", "button-4"}
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: mouse_button_filter doesn't work?

Post 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.
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
Bilka
Factorio Staff
Factorio Staff
Posts: 3464
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: mouse_button_filter doesn't work?

Post 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
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: mouse_button_filter doesn't work?

Post 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 ;)?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: mouse_button_filter doesn't work?

Post by ownlyme »

dictionary string → boolean sounds to me like there are boolean values, indexed by strings...
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: mouse_button_filter doesn't work?

Post 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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Post Reply

Return to “Modding help”