.type property on gui elements
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
.type property on gui elements
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.
Re: .type property on gui elements
Done.
If you want to get ahold of me I'm almost always on Discord.