#checking if game window is focused
1 messages · Page 1 of 1 (latest)
https://docs.godotengine.org/en/stable/classes/class_window.html#class-window-method-has-focus
Hello, 🙂
If I am reading the docs right, get_tree().get_root().has_focus() should work for you.
Hope this helps 🙂
Inherits: Viewport< Node< Object Inherited By: AcceptDialog, Popup Base class for all windows, dialogs, and popups. Description: A node that creates a window. The window can either be a native syst...
You can also use https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-get-window
get_window() in Node to get the Window that that node is in
Inherits: Object Inherited By: AnimationMixer, AudioStreamPlayer, CanvasItem, CanvasLayer, EditorFileSystem, EditorPlugin, EditorResourcePreview, HTTPRequest, InstancePlaceholder, MissingNode, Mult...
This seems good. I tried to find something like this earlier but didn’t have a ton of time to search the docs. I will try this when I make it back to my pc. Thanks!