diff options
author | Hop311 <Hop3114@gmail.com> | 2023-03-22 17:56:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-22 17:56:24 +0100 |
commit | eb87e2af53bd693e04739aaee84fde408e72f3a9 (patch) | |
tree | df2d5211157f9222c3c7fc21888bea08411c8c9b /game/src/OptionMenu/GeneralTab.gd | |
parent | 540dddf46e80a91c77e465cbf6fdb81dd9977057 (diff) |
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
Diffstat (limited to 'game/src/OptionMenu/GeneralTab.gd')
-rw-r--r-- | game/src/OptionMenu/GeneralTab.gd | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/game/src/OptionMenu/GeneralTab.gd b/game/src/OptionMenu/GeneralTab.gd index 8aed783..3d98678 100644 --- a/game/src/OptionMenu/GeneralTab.gd +++ b/game/src/OptionMenu/GeneralTab.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() |