From 6087d5b73e96506e2dca8b731d9b092c0f9f7e66 Mon Sep 17 00:00:00 2001 From: Techwizz Date: Thu, 11 May 2023 11:51:16 -0600 Subject: [PATCH] Playtesters credits --- scenes/credits.tscn | 9 +++++++++ scenes/playtesters.tscn | 38 ++++++++++++++++++++++++++++++++++++++ scripts/credits.gd | 6 ++++++ scripts/playtesters.gd | 19 +++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 scenes/playtesters.tscn create mode 100644 scripts/playtesters.gd diff --git a/scenes/credits.tscn b/scenes/credits.tscn index 313f631..f2e6e1c 100644 --- a/scenes/credits.tscn +++ b/scenes/credits.tscn @@ -116,4 +116,13 @@ position = Vector2(363, 260) scale = Vector2(0.239125, 0.239125) texture = ExtResource("5_y641b") +[node name="playtesterButton" type="Button" parent="."] +layout_mode = 0 +offset_left = 538.0 +offset_top = 501.0 +offset_right = 636.0 +offset_bottom = 538.0 +text = "Playtesters" + [connection signal="pressed" from="Button" to="." method="_on_button_pressed"] +[connection signal="pressed" from="playtesterButton" to="." method="_on_playtester_button_pressed"] diff --git a/scenes/playtesters.tscn b/scenes/playtesters.tscn new file mode 100644 index 0000000..2506095 --- /dev/null +++ b/scenes/playtesters.tscn @@ -0,0 +1,38 @@ +[gd_scene load_steps=2 format=3 uid="uid://ddrl583g2xdm1"] + +[ext_resource type="Script" path="res://scripts/playtesters.gd" id="1_icfks"] + +[node name="playtesters" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_icfks") + +[node name="TextEdit" type="TextEdit" parent="."] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -90.5 +offset_top = -134.0 +offset_right = 90.5 +offset_bottom = 134.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_colors/background_color = Color(0.156863, 0.156863, 0.156863, 1) +editable = false + +[node name="closeButton" type="Button" parent="."] +layout_mode = 0 +offset_left = 633.0 +offset_top = 195.0 +offset_right = 662.0 +offset_bottom = 226.0 +text = "X" + +[connection signal="pressed" from="closeButton" to="." method="_on_close_button_pressed"] diff --git a/scripts/credits.gd b/scripts/credits.gd index 0f34f88..06fe1c3 100644 --- a/scripts/credits.gd +++ b/scripts/credits.gd @@ -13,3 +13,9 @@ func _process(delta): func _on_button_pressed(): self.queue_free() + + +func _on_playtester_button_pressed(): + var scene_trs =load("res://scenes/playtesters.tscn") + var scene=scene_trs.instantiate() + add_child(scene) diff --git a/scripts/playtesters.gd b/scripts/playtesters.gd new file mode 100644 index 0000000..adb63f3 --- /dev/null +++ b/scripts/playtesters.gd @@ -0,0 +1,19 @@ +extends Control + +var playTesters = ["Aquamelemele", "Bladen", "BlueDragon", "Borscht", "Deathorous", "Happyday47", "Maximiliano", "Valcuda", "Verhexen"] + +# Called when the node enters the scene tree for the first time. +func _ready(): + var text = "" + for string in playTesters: + text += string + "\n" + $TextEdit.set_text(text) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + + +func _on_close_button_pressed(): + self.queue_free()