Hi,
I am very new to using Godot and have encountered a problem. My tree structure consists of a level node, background, UI, and an inventory node. My thought process is that the level node works as a state machine that increments the level when it receives a level increment signal. This is working fine, in the signal handler I have the following
func _on_Player_level_completed():
current_level += 1
current_level = min(current_level, FINISHED)
var current_level_node = $CurrentLevel
remove_child(current_level_node)
if current_level == SEARCHING:
var next_level_resource = load("res://scenes/level/levels/ExploreLevel.tscn")
var next_level = next_level_resource.instance()
add_child(next_level)
This loads the level successfully but my problem is that buttons on the scene are not clickable. I have tried menu buttons, buttons and the button I am hoping to use, texture button. The texture button hover does not trigger and the buttons pressed signal cannot be triggered. My levels tree is below.
Another strange behavior I have observed is that sometimes it works when the game runs full screen. Making me think this is more of a project settings problem. I run i3 window manager on arch linux and I make the game's window float when testing as then it resizes to the screen size i want (480x320), as this game will be running on a specific target screen. When the game starts it starts in a full sized windows (see second image below), with stretch disabled and resizable checked.
I have put the game's code here. The button in question will appear about 15 seconds into the game.
level tree
non-floating game
floating game