Expose rendering of specialized tooltips

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 471
Joined: Sun May 21, 2017 6:28 pm
Contact:

Expose rendering of specialized tooltips

Post by Therax »

Proposed behavior:

If a LuaGuiElement's tooltip consists only of a rich tag string, i.e. "[entity=assembling-machine-1]", "[item=iron-plate]", display the tooltip as used when hovering over such a tag string in chat.

Current behavior:

Setting these special strings shows only the icon of the entity, item, or recipe, as if the tooltip were "[img = item/iron-plate]", etc.

Motivation:

Item and recipe browsing mods such as FNEI would strongly benefit from having a consistent tooltip experience with vanilla GUI elements.
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 265
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: Expose rendering of specialized tooltips

Post by Therenas »

Yes I always wanted this too, but for now you can fake it by building the tooltips yourself I guess (Example). But that is not as nice and not consistent with the base game tooltip, so there should be a way to get the normal tooltip.
vibes81
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Mar 13, 2019 5:05 pm
Contact:

Re: Expose rendering of specialized tooltips

Post by vibes81 »

+1 I've been looking for a way to do this for my mod (https://mods.factorio.com/mod/qsMenu) it just doesn't feel right without that little tooltip on rollover
Rseding91
Factorio Staff
Factorio Staff
Posts: 15059
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Expose rendering of specialized tooltips

Post by Rseding91 »

You just want to use the elem-button type and it will have the correct tooltip automatically.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 265
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: Expose rendering of specialized tooltips

Post by Therenas »

Rseding91 wrote: Fri Mar 15, 2019 6:49 pm You just want to use the elem-button type and it will have the correct tooltip automatically.
Oh yeah I guess that is a solution.
Post Reply

Return to “Modding interface requests”