M assets/ui/ui.tres => assets/ui/ui.tres +0 -4
@@ 9,10 9,6 @@
[sub_resource type="StyleBoxEmpty" id=3]
[sub_resource type="StyleBoxEmpty" id=4]
-content_margin_left = 4.0
-content_margin_right = 4.0
-content_margin_top = 1.0
-content_margin_bottom = 1.0
[sub_resource type="StyleBoxEmpty" id=5]
M src/Game.tscn => src/Game.tscn +24 -22
@@ 30,36 30,38 @@ script = ExtResource( 1 )
pause_mode = 2
layer = 2
+[node name="Background" type="TextureRect" parent="MainScreen"]
+anchor_right = 1.0
+anchor_bottom = 1.0
+texture = ExtResource( 8 )
+
[node name="MainMenuContainer" type="MarginContainer" parent="MainScreen"]
anchor_right = 1.0
anchor_bottom = 1.0
+margin_left = 4.0
+margin_bottom = -4.0
__meta__ = {
"_edit_use_anchors_": false
}
-[node name="Background" type="TextureRect" parent="MainScreen/MainMenuContainer"]
-margin_right = 64.0
-margin_bottom = 64.0
-texture = ExtResource( 8 )
-
[node name="HBoxContainer" type="HBoxContainer" parent="MainScreen/MainMenuContainer"]
-margin_right = 64.0
-margin_bottom = 64.0
+margin_right = 60.0
+margin_bottom = 60.0
[node name="VBoxContainer" type="VBoxContainer" parent="MainScreen/MainMenuContainer/HBoxContainer"]
-margin_right = 18.0
-margin_bottom = 64.0
+margin_right = 10.0
+margin_bottom = 60.0
alignment = 2
[node name="StartButton" parent="MainScreen/MainMenuContainer/HBoxContainer/VBoxContainer" instance=ExtResource( 5 )]
margin_top = 52.0
-margin_right = 18.0
-margin_bottom = 56.0
+margin_right = 10.0
+margin_bottom = 54.0
[node name="QuitButton" parent="MainScreen/MainMenuContainer/HBoxContainer/VBoxContainer" instance=ExtResource( 6 )]
-margin_top = 60.0
-margin_right = 18.0
-margin_bottom = 64.0
+margin_top = 58.0
+margin_right = 10.0
+margin_bottom = 60.0
[node name="EndScreen" type="CanvasLayer" parent="."]
layer = 2
@@ 146,20 148,20 @@ __meta__ = {
[node name="HBoxContainer" type="HBoxContainer" parent="GUI/TextContainer"]
margin_right = 59.0
-margin_bottom = 12.0
+margin_bottom = 13.0
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 1
[node name="VBoxContainer" type="VBoxContainer" parent="GUI/TextContainer/HBoxContainer"]
margin_right = 59.0
-margin_bottom = 12.0
+margin_bottom = 13.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Text" type="Label" parent="GUI/TextContainer/HBoxContainer/VBoxContainer"]
margin_right = 59.0
-margin_bottom = 12.0
+margin_bottom = 13.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "testing testing autooooooowrrapppp"
@@ 171,21 173,21 @@ autowrap = true
visible = false
margin_top = 11.0
margin_right = 59.0
-margin_bottom = 15.0
+margin_bottom = 13.0
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 1
[node name="Button" type="Button" parent="GUI/TextContainer/HBoxContainer/VBoxContainer/Options"]
-margin_left = 9.0
+margin_left = 17.0
margin_right = 27.0
-margin_bottom = 4.0
+margin_bottom = 2.0
text = "test1"
[node name="Button2" type="Button" parent="GUI/TextContainer/HBoxContainer/VBoxContainer/Options"]
margin_left = 31.0
-margin_right = 49.0
-margin_bottom = 4.0
+margin_right = 41.0
+margin_bottom = 2.0
text = "test2"
[node name="ItemsContainer" type="MarginContainer" parent="GUI"]
M src/UI/Buttons/StartButton.gd => src/UI/Buttons/StartButton.gd +1 -0
@@ 6,6 6,7 @@ onready var game_music = ResourceLoader.load("res://assets/music/game.ogg")
func _on_StartButton_pressed():
main_menu.hide()
+ main_menu.get_parent().get_node("Background").hide()
music_player.stream = game_music
music_player.play()
get_tree().paused = false