mouse_button_filter doesn't work?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
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..
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Rseding91
Factorio Staff
Factorio Staff
Posts: 13254
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: 400
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.
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Bilka
Factorio Staff
Factorio Staff
Posts: 3170
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: 5206
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: 400
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...
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
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”