From c982ef46ae408401d514d9e5ffd8ded928ebcda5 Mon Sep 17 00:00:00 2001 From: Melon Bread Date: Mon, 13 May 2024 17:34:22 -0400 Subject: [PATCH] Cleaned up GameOver screen --- scenes/game_over_screen.tscn | 18 +++++++++++++++++- scripts/game_over_screen.gd | 3 --- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/scenes/game_over_screen.tscn b/scenes/game_over_screen.tscn index 5b82ae5..9d9ae37 100644 --- a/scenes/game_over_screen.tscn +++ b/scenes/game_over_screen.tscn @@ -1,8 +1,23 @@ -[gd_scene load_steps=3 format=3 uid="uid://0yktrbyp6cr3"] +[gd_scene load_steps=4 format=3 uid="uid://0yktrbyp6cr3"] [ext_resource type="FontFile" uid="uid://bkcxbtx1vcj8w" path="res://assets/fonts/Color Basic.otf" id="1_lbk85"] [ext_resource type="Script" path="res://scripts/game_over_screen.gd" id="1_o2tyf"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_73wxv"] +bg_color = Color(0, 0, 0, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(1, 1, 1, 1) +border_blend = true +corner_radius_top_left = 8 +corner_radius_top_right = 8 +corner_radius_bottom_right = 8 +corner_radius_bottom_left = 8 +shadow_color = Color(1, 1, 1, 0.6) +shadow_size = 8 + [node name="GameOverScreen" type="Control"] layout_mode = 3 anchors_preset = 15 @@ -34,6 +49,7 @@ offset_right = 192.0 offset_bottom = 124.0 grow_horizontal = 2 grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_73wxv") [node name="GameOverLabel" type="Label" parent="Panel"] layout_mode = 1 diff --git a/scripts/game_over_screen.gd b/scripts/game_over_screen.gd index ca8ffe8..ce8582f 100644 --- a/scripts/game_over_screen.gd +++ b/scripts/game_over_screen.gd @@ -1,11 +1,8 @@ extends Control - func _on_retry_button_pressed() -> void: - # TODO: Reload main game scene from level 1 get_tree().change_scene_to_file("res://scenes/game.tscn") - func _on_quit_button_pressed() -> void: # TODO: Go to title screen instead of killing the game get_tree().quit()