Circuit HUD

by feupeu

Allows you to track circuit signals on the player HUD

Content
3 years ago
1.0
13
Circuit network

i [implemented] Tootip for signal names

3 years ago

Would be cool to be able to move the mouse over the signals and have a tooltip indicating the name of the signal.

On heavy modded games, tehre are a lot of items and we dont always remember the name of everything

3 years ago

Hey - Thanks for trying out the mod.

I think this is a great idea, which I'll be looking more into in a future version.

3 years ago

Yeah... I did a quick hack in your render_network and added this to the signals loop:

local tooltip = ""
if signal.signal.type == "item" then
tooltip = {"", game.item_prototypes[signal.signal.name].localised_name }
elseif signal.signal.type == "fluid" then
tooltip = {"", game.fluid_prototypes[signal.signal.name].localised_name }
end
table.add {
type = "sprite-button",
sprite = SIGNAL_TYPE_MAP[signal.signal.type] .. "/" .. signal.signal.name,
number = signal.count,
style = signal_style,
tooltip = tooltip
}

I just can understand how to make nice tooltips... I looked at FNEI and Helmod and... there is some black magic in these tooltips that I am failing to understand :)

3 years ago

Hey again.

Thanks a lot for your response. It's awesome that you included some code. I've included the tooltip-feature in version 0.5.0, which I just released.

New response