Allow setting locked field of choose-elem-button as an argument to .add()

jagoly
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Dec 23, 2024 11:48 am
Contact:

Allow setting locked field of choose-elem-button as an argument to .add()

Post by jagoly »

LuaGuiElement has a handy boolean option that prevents the user from modifying the value of a choose-elem-button. However, for some reason this can only be set after the element is created by doing element.locked = true. It would be much more convenient if this field could be set by adding locked = true to the argument table passed to parent.add().
Rseding91
Factorio Staff
Factorio Staff
Posts: 15879
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow setting locked field of choose-elem-button as an argument to .add()

Post by Rseding91 »

Ok. Added for the next release.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Implemented mod requests”