From eb87e2af53bd693e04739aaee84fde408e72f3a9 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Wed, 22 Mar 2023 16:56:24 +0000 Subject: Basic Game Session skeleton (#67) * Fixed grab_focus error on not is_inside_tree * Moved SampleGame to GameSession/GameSession * Basic GameSession and GameSessionMenu/Escape Menu * Map Control Panel skeleton * Added requirement comments * Removed unnecessary CenterContainer --- game/src/OptionMenu/VideoTab.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'game/src/OptionMenu/VideoTab.gd') diff --git a/game/src/OptionMenu/VideoTab.gd b/game/src/OptionMenu/VideoTab.gd index 8aed783..3d98678 100644 --- a/game/src/OptionMenu/VideoTab.gd +++ b/game/src/OptionMenu/VideoTab.gd @@ -1,8 +1,9 @@ extends HBoxContainer -@export var initial_focus: Button +@export var initial_focus: Control func _notification(what : int) -> void: match(what): NOTIFICATION_VISIBILITY_CHANGED: - if visible: initial_focus.grab_focus() + if visible and is_inside_tree(): + initial_focus.grab_focus() -- cgit v1.2.3-56-ga3b1