From 802ac79ecdec47b27d78b1596b21b594d201d0e5 Mon Sep 17 00:00:00 2001
From: Frederic Aust <frederic.aust@hs-bochum.de>
Date: Tue, 2 Feb 2021 17:10:26 +0100
Subject: [PATCH] MainMenu: * Grobe Erstellung des Hauptmenues mit Buttons zum
 starten verschiedener Spielmodi

---
 Battle Pong/MainMenu.gd   | 38 ++++++++++++++++
 Battle Pong/MainMenu.tscn | 94 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 132 insertions(+)
 create mode 100644 Battle Pong/MainMenu.gd
 create mode 100644 Battle Pong/MainMenu.tscn

diff --git a/Battle Pong/MainMenu.gd b/Battle Pong/MainMenu.gd
new file mode 100644
index 0000000..184f2ce
--- /dev/null
+++ b/Battle Pong/MainMenu.gd	
@@ -0,0 +1,38 @@
+extends Control
+
+var rendering_enabled = false
+
+# 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
+
+
+func _on_but_local_two_player_pressed():
+    pass # Replace with function body.
+
+
+func _on_but_two_re_with_images_pressed():
+    pass # Replace with function body.
+
+
+func _on_but_two_re_with_position_pressed():
+    pass # Replace with function body.
+
+
+func _on_cb_rendering_enabled_pressed():
+    rendering_enabled = not rendering_enabled
+    print(rendering_enabled)
+    pass # Replace with function body.
+
+
+func _on_but_trainer_with_images_pressed():
+    pass # Replace with function body.
+
+
+func _on_but_trainer_with_position_pressed():
+    pass # Replace with function body.
diff --git a/Battle Pong/MainMenu.tscn b/Battle Pong/MainMenu.tscn
new file mode 100644
index 0000000..7ad9340
--- /dev/null
+++ b/Battle Pong/MainMenu.tscn	
@@ -0,0 +1,94 @@
+[gd_scene load_steps=2 format=2]
+
+[ext_resource path="res://MainMenu.gd" type="Script" id=1]
+
+[node name="MainMenu" type="Control"]
+anchor_right = 1.0
+anchor_bottom = 1.0
+script = ExtResource( 1 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="lbl_title" type="Label" parent="."]
+anchor_left = 0.5
+anchor_right = 0.5
+margin_left = -75.5
+margin_right = 75.5
+margin_bottom = 14.0
+text = "Battle Pong"
+align = 1
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="vbox_two_learner" type="VBoxContainer" parent="."]
+anchor_left = 0.5
+anchor_top = 0.5
+anchor_right = 0.5
+anchor_bottom = 0.5
+margin_left = -132.5
+margin_top = -92.0
+margin_right = 132.5
+margin_bottom = 92.0
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="but_local_two_player" type="Button" parent="vbox_two_learner"]
+margin_right = 265.0
+margin_bottom = 20.0
+text = "Local 2 Player"
+
+[node name="HSeparator2" type="HSeparator" parent="vbox_two_learner"]
+margin_top = 24.0
+margin_right = 265.0
+margin_bottom = 28.0
+
+[node name="but_two_re_with_images" type="Button" parent="vbox_two_learner"]
+margin_top = 32.0
+margin_right = 265.0
+margin_bottom = 52.0
+text = "2 RE with Images"
+
+[node name="HBoxContainer" type="HBoxContainer" parent="vbox_two_learner"]
+margin_top = 56.0
+margin_right = 265.0
+margin_bottom = 80.0
+
+[node name="but_two_re_with_position" type="Button" parent="vbox_two_learner/HBoxContainer"]
+margin_right = 126.0
+margin_bottom = 24.0
+text = "2 RE with Position"
+
+[node name="cb_rendering_enabled" type="CheckBox" parent="vbox_two_learner/HBoxContainer"]
+margin_left = 130.0
+margin_right = 265.0
+margin_bottom = 24.0
+text = "Enable rendering"
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="HSeparator" type="HSeparator" parent="vbox_two_learner"]
+margin_top = 84.0
+margin_right = 265.0
+margin_bottom = 88.0
+
+[node name="but_trainer_with_images" type="Button" parent="vbox_two_learner"]
+margin_top = 92.0
+margin_right = 265.0
+margin_bottom = 112.0
+text = "RE Trainer with Images"
+
+[node name="but_trainer_with_position" type="Button" parent="vbox_two_learner"]
+margin_top = 116.0
+margin_right = 265.0
+margin_bottom = 136.0
+text = "RE Trainer with Position"
+[connection signal="pressed" from="vbox_two_learner/but_local_two_player" to="." method="_on_but_local_two_player_pressed"]
+[connection signal="pressed" from="vbox_two_learner/but_two_re_with_images" to="." method="_on_but_two_re_with_images_pressed"]
+[connection signal="pressed" from="vbox_two_learner/HBoxContainer/but_two_re_with_position" to="." method="_on_but_two_re_with_position_pressed"]
+[connection signal="pressed" from="vbox_two_learner/HBoxContainer/cb_rendering_enabled" to="." method="_on_cb_rendering_enabled_pressed"]
+[connection signal="pressed" from="vbox_two_learner/but_trainer_with_images" to="." method="_on_but_trainer_with_images_pressed"]
+[connection signal="pressed" from="vbox_two_learner/but_trainer_with_position" to="." method="_on_but_trainer_with_position_pressed"]
-- 
GitLab