Tooltips do not render when tree is paused

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wildboar

Yeah so I narrowed down the reason why tool tips do not render, it is because I set get_tree().paused = true. I already have set the parent node Pause Mode to Process.

Is there a way to fix this (get tool tips to show while tree is paused) ? I really do not want to write pause functionality myself since above works great otherwise.

:bust_in_silhouette: Reply From: exuin

Tooltips simply can’t show when paused since the nodes aren’t processing input. Or anything else. If you want tooltips to show, then don’t pause them. I don’t see anything wrong with setting Pause Mode to process.

I already have set the parent node Pause Mode to Process.

What do you mean ?

Edit oh you mean that its a glitch or something, and pause mode process should work ?

wildboar | 2021-02-24 17:49

Okay, after some experimenting, it looks like the scene tree is the one that handles tooltips. So if you pause the scene tree, tooltips won’t work. Try pausing a node lower in the hierarchy (pausing the node with the tooltip won’t disable tooltips as long as the scene tree isn’t paused).

exuin | 2021-02-24 21:34

Hmm, hopefully later version of Godot adds option for project settings to keep tool tips processing even when paused.

I do not think there is pause function for nodes, and settings parent nodes process to false does not seem to affect its childrens…

Therefore I wrote this ugly pause function:

for i in Game.scene.get_node("YSort").get_children():
	i.set_process(!pause)
	i.set_process_input(!pause)
	i.set_physics_process(!pause)
	i.set_process_internal(!pause)
	i.set_process_unhandled_input(!pause)
	i.set_process_unhandled_key_input(!pause)

This solved the tool tips issue atleast ! Thanks

wildboar | 2021-02-25 07:43

You can just set a node’s pause mode to stop to pause it.

exuin | 2021-02-25 14:28

I’ve found a pull request that solves this, but it was never merged. Show tooltips even when paused or time_scale is 0 by KoBeWi · Pull Request #43693 · godotengine/godot · GitHub

exuin | 2021-02-25 14:47