[GUI] Add custom details to hover inspector

Place to get help with not working mods / modding interface.
biscuitWizard
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Jan 02, 2018 7:26 am
Contact:

[GUI] Add custom details to hover inspector

Post by biscuitWizard »

On the panel that shows details about an item (like liquid amount in a pipe), I'd like to add GUI elements/info for some of my custom prototypes.

I cannot find a play to really start on that, though I see LuaGuiElement, and I could probably iterate down the GUI tree to find the parent I want, I'd rather not do anomalous functionality and outright abuse the system. Are there any examples on how I might do that or places I can start to tinker with to figure that out?

Thanks, guys!
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [GUI] Add custom details to hover inspector

Post by darkfrei »

Any vanilla GUI can't be changed with mods. I am waiting for 0.17 :)
biscuitWizard
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Jan 02, 2018 7:26 am
Contact:

Re: [GUI] Add custom details to hover inspector

Post by biscuitWizard »

Shoot!
So my best option would be to make my own GUI element from scratch that "looks"/mimicks the on hover inspector to add my own elements.

Is it possible to show/hide a GUI element on the player hovering over a specific prototype?
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [GUI] Add custom details to hover inspector

Post by eradicator »

You'll still be limited to gui.left/top/center though. And for left/right you don't really know what other mods have already added stuff there so the position will be somewhat random,

It might be worth a try to make a modding request for a "selected tooltip" gui position. i.e gui.tooltip. that's displayed above/below the normal tooltip.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Post Reply

Return to “Modding help”