From fbadc76d4fb8cbff779997bcf404d28911c1c1ca Mon Sep 17 00:00:00 2001 From: ValliantStorme Date: Tue, 19 Oct 2021 00:10:13 -0500 Subject: [PATCH] Pushing what I have of the debug menu so I don't forget. TODO: Pulldown keypress, command processing. --- godot_ship/main.tres | 4 ++++ godot_ship/scenes/Debug Menu.tscn | 29 ++++++++++++++++++++++++++- godot_ship/script/debug/debug_menu.gd | 16 +++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 godot_ship/main.tres create mode 100644 godot_ship/script/debug/debug_menu.gd diff --git a/godot_ship/main.tres b/godot_ship/main.tres new file mode 100644 index 0000000..51effda --- /dev/null +++ b/godot_ship/main.tres @@ -0,0 +1,4 @@ +[gd_resource type="Theme" format=2] + +[resource] +resource_name = "Main Theme" diff --git a/godot_ship/scenes/Debug Menu.tscn b/godot_ship/scenes/Debug Menu.tscn index 2ee2025..3076839 100644 --- a/godot_ship/scenes/Debug Menu.tscn +++ b/godot_ship/scenes/Debug Menu.tscn @@ -1,8 +1,35 @@ -[gd_scene format=2] +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://main.tres" type="Theme" id=1] +[ext_resource path="res://script/debug/debug_menu.gd" type="Script" id=2] [node name="Debug" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 +theme = ExtResource( 1 ) +script = ExtResource( 2 ) __meta__ = { "_edit_use_anchors_": false } + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +custom_constants/separation = 2 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="TextEdit" type="TextEdit" parent="VBoxContainer"] +margin_right = 640.0 +margin_bottom = 144.0 +rect_min_size = Vector2( 0, 144 ) +text = "Turn 0 +Player 1: 0 ships, 0 hits, 0 misses" + +[node name="LineEdit" type="LineEdit" parent="VBoxContainer"] +margin_top = 146.0 +margin_right = 640.0 +margin_bottom = 170.0 +text = ">" +caret_blink = true diff --git a/godot_ship/script/debug/debug_menu.gd b/godot_ship/script/debug/debug_menu.gd new file mode 100644 index 0000000..bb9bd06 --- /dev/null +++ b/godot_ship/script/debug/debug_menu.gd @@ -0,0 +1,16 @@ +extends Control + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass