Space Exploration's Universe Explorer GUI has clickable rows (buttons) each containing a flow containing labels. The labels in some of the columns (Zone type and Primary resource) have implemented tooltips but they aren't visible.
If I modify zonelist.lua and remove the `row` buttons, so that it is just a list of flows then the label tooltips work correctly.
[1.1.57] Tooltips on labels inside of buttons aren't displayed
[1.1.57] Tooltips on labels inside of buttons aren't displayed
My mods
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: [1.1.57] Tooltips on labels inside of buttons aren't displayed
Can you please provide some minimal mod that shows the issue?
If you want to get ahold of me I'm almost always on Discord.
Re: [1.1.57] Tooltips on labels inside of buttons aren't displayed
Here it is. Place an entity to trigger the GUI to pop up.
The issue isn't quite as conclusive as I thought. The tooltips work when ignored_by_interaction = false, but in that case the button hover highlighting doesn't work. I'd like both to work simultaneously, but I understand that this may be impossible.
Thanks for your time.
Code: Select all
script.on_event(defines.events.on_built_entity,
function(event)
local player = game.get_player(event.player_index)
local frame = player.gui.screen.add{type = "frame", name = "tooltip-gui", caption = "Tooltip demo"}
frame.add{type = "label", caption = "ignored_by_interaction:"}
local button = frame.add{type = "button"}
local flow = button.add{type = "flow", direction = "horizontal", ignored_by_interaction = true}
flow.add{type = "label", caption = "true", tooltip = "Tooltip1"}
flow.add{type = "label", caption = "label1", tooltip = "Tooltip2"}
local button2 = frame.add{type = "button"}
local flow2 = button2.add{type = "flow", direction = "horizontal"}
flow2.add{type = "label", caption = "false", tooltip = "Tooltip1"}
flow2.add{type = "label", caption = "label2", tooltip = "Tooltip2"}
frame.force_auto_center()
player.opened = frame
end
)
-- Close GUI on E
script.on_event(defines.events.on_gui_closed,
function(event)
if event.element and event.element.name == "tooltip-gui" then
event.element.destroy()
end
end
)
- Attachments
-
- missing-tooltips_1.0.0.zip
- (1.1 KiB) Downloaded 51 times
My mods
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: [1.1.57] Tooltips on labels inside of buttons aren't displayed
Why don't you just use 'caption' on the botton and set the tooltip on the button itself? It would replicate the behavior exactly as you are describing you want. It's also the intended way to use buttons.
If you want to get ahold of me I'm almost always on Discord.
Re: [1.1.57] Tooltips on labels inside of buttons aren't displayed
Because there needs to be several labels inside the button each with their own tooltip. I don't think what you are suggesting would work for that?
My mods
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: [1.1.57] Tooltips on labels inside of buttons aren't displayed
Mostly; I don't think this is as bug. When setting "ignored_by_interaction = true" the inner-widget-logic is disabled. Only the parent tooltip functions.
So, if you wanted to keep doing that you'd just need to use multiple buttons.
So, if you wanted to keep doing that you'd just need to use multiple buttons.
If you want to get ahold of me I'm almost always on Discord.