From 8b1fe0a9be77a529c991792d7e4a98cc6ba59403 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Mon, 18 Dec 2023 23:03:56 +0100 Subject: [PATCH] repair button press --- flake.nix | 2 ++ godot/main.gd | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 628ed9a..0f15fd7 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,8 @@ devShells.default = with pkgs; mkShell { LD_LIBRARY_PATH = lib.makeLibraryPath [ stdenv.cc.cc ]; # For libstdc++.so.6 + ANDROID_HOME = "foo/bar"; + nativeBuildInputs = [ clang just android-tools godot_4 ]; buildInputs = [ sqlite ]; }; diff --git a/godot/main.gd b/godot/main.gd index 04bde40..fcd7cba 100644 --- a/godot/main.gd +++ b/godot/main.gd @@ -6,6 +6,8 @@ func _ready(): $FileDialog.access = FileDialog.ACCESS_FILESYSTEM $FileDialog.use_native_dialog = true + $MarginContainer/Unloaded/Button.pressed.connect(_on_button_pressed) + Global.state_changed.connect(_update_state) if Global.current_state == Global.State.UNLOADED: pass @@ -14,7 +16,6 @@ func _ready(): var s = ResourceLoader.load("res://loaded.tscn") var current_scene = s.instantiate() $MarginContainer.add_child(current_scene) - pass # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta):