From 1398f3d92c1f76ab498fad5d2ebb55a1e78221b1 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Thu, 21 Jul 2022 00:14:14 -0400 Subject: [PATCH 1/2] GUI should not be visible until ready --- godot/monitor/Monitor.gd | 2 ++ godot/monitor/Monitor.tscn | 1 + 2 files changed, 3 insertions(+) diff --git a/godot/monitor/Monitor.gd b/godot/monitor/Monitor.gd index b9628a1..0c96cc7 100644 --- a/godot/monitor/Monitor.gd +++ b/godot/monitor/Monitor.gd @@ -99,6 +99,8 @@ func _ready() -> void: func _physics_process(_delta: float) -> void: if monitor_enabled: + if not $MonitorGUI.visible: + $MonitorGUI.visible = true if started and not get_tree().paused: var frame = empty_frame.duplicate(true) frame["coins"] = coins diff --git a/godot/monitor/Monitor.tscn b/godot/monitor/Monitor.tscn index 46070db..977db82 100644 --- a/godot/monitor/Monitor.tscn +++ b/godot/monitor/Monitor.tscn @@ -10,5 +10,6 @@ monitor_enabled = true use_development_url = true [node name="MonitorGUI" parent="." instance=ExtResource( 3 )] +visible = false [node name="HTTPRequest" type="HTTPRequest" parent="."] -- 2.30.2 From 71bf91fd2fded796a3d3a5d858c4116ecc9cbe22 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Fri, 22 Jul 2022 00:14:25 -0400 Subject: [PATCH 2/2] make ui_accept press the button --- godot/monitor/GUI.tscn | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/godot/monitor/GUI.tscn b/godot/monitor/GUI.tscn index 2fb72ed..d5f25e7 100644 --- a/godot/monitor/GUI.tscn +++ b/godot/monitor/GUI.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=14 format=2] [ext_resource path="res://assets/fonts/data/PixelOperator.tres" type="DynamicFontData" id=1] [ext_resource path="res://assets/fonts/data/PixelOperator-Bold.tres" type="DynamicFontData" id=2] @@ -42,6 +42,13 @@ corner_radius_top_right = 5 corner_radius_bottom_right = 5 corner_radius_bottom_left = 5 +[sub_resource type="InputEventAction" id=17] +action = "ui_accept" +pressed = true + +[sub_resource type="ShortCut" id=18] +shortcut = SubResource( 17 ) + [sub_resource type="StyleBoxFlat" id=15] bg_color = Color( 0.239216, 0.239216, 0.239216, 1 ) corner_radius_top_left = 5 @@ -160,7 +167,9 @@ margin_bottom = 61.0 focus_mode = 0 custom_fonts/font = SubResource( 11 ) custom_styles/normal = SubResource( 12 ) +shortcut_in_tooltip = false enabled_focus_mode = 0 +shortcut = SubResource( 18 ) text = "Ingresar" script = ExtResource( 5 ) -- 2.30.2