The prototype explorer GUI works by pressing a hotkey when hovering over something in the GUI or on the map - entities, items, recipes, technologies, etc. Would it be possible to provide this same functionality to a custom-input? For example, hovering over a recipe in the crafting menu, and pressing a custom input, will provide an object in the event providing that info (e.g. e.hovered_object = {type = "recipe", name = "iron-plate"}).
This would allow me to support opening Recipe Book when someone uses its hotkey while hovering an object. The advantage of this is that they wouldn't have to open the GUI and search for the same thing they were already looking at.
Thank you!
Provide "currently hovered prototype" on a custom-input
Provide "currently hovered prototype" on a custom-input
Don't forget, you're here forever.
-
- Filter Inserter
- Posts: 665
- Joined: Wed Sep 16, 2020 12:45 pm
- Contact:
Re: Provide "currently hovered prototype" on a custom-input
Supported in map mode and other views as well would be great. Very surprised there is no API already for this.
OptimaUPS Mod, pm for info.
Re: Provide "currently hovered prototype" on a custom-input
Ok, I added include_selected_prototype as a new custom input property. When true and something is hovered that applies the following gets included in the event:
Code: Select all
selected_prototype = {base_type=, derived_type=, name=}
If you want to get ahold of me I'm almost always on Discord.