[2.0.72] Reading LuaGuiElement.style.width does not work

Bugs that are actually features.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 420
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

[2.0.72] Reading LuaGuiElement.style.width does not work

Post by protocol_1903 »

First, yes I know .width is not a valid parameter for read but it makes more sense in the title (imo it should be readable as the current width/height but thats a feature request). I have attempted to read natural_width, minimum_width, and maximum_width of a newly created frame and button element and all of them return nil. I assume the same goes for height(s variants) but I haven't tested to be sure.
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
Rseding91
Factorio Staff
Factorio Staff
Posts: 16411
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.72] Reading LuaGuiElement.style.width does not work

Post by Rseding91 »

Thanks for the report however this is not a bug. If those values have not been set on the style being used then that’s what you get back.
If you want to get ahold of me I'm almost always on Discord.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 420
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: [2.0.72] Reading LuaGuiElement.style.width does not work

Post by protocol_1903 »

Shouldn't it report back whatever the style default is for natural_width, minimum_width, and maximum_width?
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
Rseding91
Factorio Staff
Factorio Staff
Posts: 16411
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.72] Reading LuaGuiElement.style.width does not work

Post by Rseding91 »

It does. The default is "unset".
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”