I would like to request a new feature related to the "selected_prototype" field on custom-inputs. Currently, it will only return the thing "contained" in whatever you use the custom-input on. However, it does not tell you what the user actually had selected.
For example, there is no way for me to tell that they used the custom-input on a gun slot:
I wish to be able to move the information contained in the tooltips into a scrollable GUI, and remove the tooltips. This would allow the user to easily click on each thing to view more information, and search the list if it is too long. If I can detect that they used the hotkey on a gun slot, I could retrieve that information from my mod's database and present it in a nice GUI.
Ideally, this property would be available even if there is no prototype "contained" in the thing. So if they use it on an empty gun slot, I would still want to know that they used it on a gun slot. To this end, a new field on the custom-input "selected_context" might be appropriate.
"Context" for selected_prototype in custom-inputs
"Context" for selected_prototype in custom-inputs
Don't forget, you're here forever.
Re: "Context" for selected_prototype in custom-inputs
Unfortunately that information simply isn't known and I can't see any viable way to get it with how the logic works now.
If you want to get ahold of me I'm almost always on Discord.
Re: "Context" for selected_prototype in custom-inputs
Is this still true in Factorio 2.0? I was considering making a suggestion for SelectedSlotData which would accompany SelectedPrototypeData in CustomInput events, to let the event know which slot in a GUI (if any) was being hovered during an event.Rseding91 wrote: Thu Apr 08, 2021 11:48 pm Unfortunately that information simply isn't known and I can't see any viable way to get it with how the logic works now.
SelectedSlotData would have at least two fields:
- inventory_type: is a value from defines.inventory
- index: would be the index of the slot from that inventory.
Re: "Context" for selected_prototype in custom-inputs
Nothing about this has changed since its inception.
If you want to get ahold of me I'm almost always on Discord.

