.type property on gui elements

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

.type property on gui elements

Post by aubergine18 »

Currently, without maintaining a separate lookup table, there's no way to determine what type a gui element is. This is particularly troublesome if the elements are added by another mod (eg. I'm working on a patch to EvoGUI to allow external mods to have a bit more control over things like settings and sensor displays; there are some situations where I will need to determine what type an element is in order to determine it's "value" - eg. text for a textbox, or state for a checkbox, etc). I'm trying to avoid having a big nested if-elseif statement trying to deduce type by checking multiple properties across a large number of elements.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15985
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: .type property on gui elements

Post by Rseding91 »

Done.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Implemented mod requests”