Pause Menu and navigation
This commit is contained in:
@ -10,8 +10,8 @@ const enemies = [FORKMAN, COBOLD, ORK]
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
get_node("SidePanel").Update_Lifes(20)
|
||||
get_node("SidePanel").Update_Coins(2000)
|
||||
get_node("CanvasLayer/SidePanel").Update_Lifes(20)
|
||||
get_node("CanvasLayer/SidePanel").Update_Coins(2000)
|
||||
|
||||
|
||||
func _on_timer_timeout() -> void:
|
||||
@ -25,8 +25,8 @@ func spawnMonster():
|
||||
path_2d.add_child(path)
|
||||
|
||||
func decrease_life(damage) -> void:
|
||||
get_node("SidePanel").Update_Lifes(-damage)
|
||||
if get_node("SidePanel").get_Lifes() <= 0:
|
||||
get_node("CanvasLayer/SidePanel").Update_Lifes(-damage)
|
||||
if get_node("CanvasLayer/SidePanel").get_Lifes() <= 0:
|
||||
game_over()
|
||||
|
||||
func game_over()-> void:
|
||||
|
@ -508,12 +508,6 @@ curve = SubResource("Curve2D_6abe5")
|
||||
wait_time = 1.5
|
||||
autostart = true
|
||||
|
||||
[node name="SidePanel" parent="." instance=ExtResource("67_rec5e")]
|
||||
offset_left = -2.0
|
||||
offset_top = 583.0
|
||||
offset_right = 1152.0
|
||||
offset_bottom = 647.0
|
||||
|
||||
[node name="TrapArea" type="Area2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="TrapArea"]
|
||||
@ -553,4 +547,9 @@ shape = SubResource("RectangleShape2D_4tlg5")
|
||||
position = Vector2(1072.5, 230)
|
||||
shape = SubResource("RectangleShape2D_sglle")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="SidePanel" parent="CanvasLayer" instance=ExtResource("67_rec5e")]
|
||||
size_flags_horizontal = 6
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
||||
|
@ -123,7 +123,7 @@ func enemy_hurt(amount) -> void:
|
||||
current_health -= amount
|
||||
|
||||
if current_health <= 0:
|
||||
get_parent().get_parent().get_parent().get_node("SidePanel").Update_Coins(value)
|
||||
get_parent().get_parent().get_parent().get_node("CanvasLayer/SidePanel").Update_Coins(value)
|
||||
var coin = COIN.instantiate()
|
||||
coin.position = self.global_position
|
||||
get_parent().get_parent().add_child(coin)
|
||||
|
@ -25,12 +25,12 @@ func _process(delta: float) -> void:
|
||||
if follower:
|
||||
position = get_viewport().get_mouse_position()
|
||||
if not name.contains("MortarTower"):
|
||||
if get_node("Area2D").get_overlapping_bodies().size() > 1 or (self.get_node("CharacterBody2D") not in get_parent().get_node("TowerArea").get_overlapping_bodies() or self.get_node("CharacterBody2D") in get_parent().get_node("TrapArea").get_overlapping_bodies()):
|
||||
if get_node("Area2D").get_overlapping_bodies().size() > 1 or (self.get_node("CharacterBody2D") not in get_parent().get_node("../TowerArea").get_overlapping_bodies() or self.get_node("CharacterBody2D") in get_parent().get_node("../TrapArea").get_overlapping_bodies()):
|
||||
get_node("CharacterBody2D/AnimatedSprite2D").modulate = Color(255, 0, 0, 0.3)
|
||||
else:
|
||||
get_node("CharacterBody2D/AnimatedSprite2D").modulate = Color(1, 1, 1, 1)
|
||||
else:
|
||||
if get_node("Area2D").get_overlapping_bodies().size() > 1 or self.get_node("CharacterBody2D") not in get_parent().get_node("TowerArea").get_overlapping_bodies() or self.get_node("CharacterBody2D") in get_parent().get_node("TrapArea").get_overlapping_bodies():
|
||||
if get_node("Area2D").get_overlapping_bodies().size() > 1 or self.get_node("CharacterBody2D") not in get_parent().get_node("../TowerArea").get_overlapping_bodies() or self.get_node("CharacterBody2D") in get_parent().get_node("../TrapArea").get_overlapping_bodies():
|
||||
get_node("CharacterBody2D/lifter - 1").modulate = Color(255, 0, 0, 0.3)
|
||||
get_node("CharacterBody2D/lifter - 2").modulate = Color(255, 0, 0, 0.3)
|
||||
get_node("CharacterBody2D/MortarPart(2)").modulate = Color(255, 0, 0, 0.3)
|
||||
@ -74,7 +74,7 @@ func get_if_moving_state():
|
||||
func _input(event):
|
||||
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
|
||||
if abs(position) <= get_viewport().get_mouse_position():
|
||||
if get_node("Area2D").get_overlapping_bodies().size() <= 1 and self.get_node("CharacterBody2D") in get_parent().get_node("TowerArea").get_overlapping_bodies() and not self.get_node("CharacterBody2D") in get_parent().get_node("TrapArea").get_overlapping_bodies():
|
||||
if get_node("Area2D").get_overlapping_bodies().size() <= 1 and self.get_node("CharacterBody2D") in get_parent().get_node("../TowerArea").get_overlapping_bodies() and not self.get_node("CharacterBody2D") in get_parent().get_node("../TrapArea").get_overlapping_bodies():
|
||||
follower = false
|
||||
|
||||
func choose_target(body : Node2D) -> void:
|
||||
|
@ -17,12 +17,12 @@ func _process(delta: float) -> void:
|
||||
if follower:
|
||||
position = get_viewport().get_mouse_position()
|
||||
if name.contains("Mine"):
|
||||
if get_node("Area2D").get_overlapping_bodies().size() > 1 or self.get_node("CharacterBody2D") not in get_parent().get_node("TrapArea").get_overlapping_bodies() or self.get_node("CharacterBody2D") in get_parent().get_node("TowerArea").get_overlapping_bodies():
|
||||
if get_node("Area2D").get_overlapping_bodies().size() > 1 or self.get_node("CharacterBody2D") not in get_parent().get_node("../TrapArea").get_overlapping_bodies() or self.get_node("CharacterBody2D") in get_parent().get_node("../TowerArea").get_overlapping_bodies():
|
||||
get_node("CharacterBody2D/AnimatedSprite2D").modulate = Color(255, 0, 0, 0.3)
|
||||
else:
|
||||
get_node("CharacterBody2D/AnimatedSprite2D").modulate = Color(1, 1, 1, 1)
|
||||
if name.contains("StickTrap") or name.contains("Wall"):
|
||||
if get_node("Area2D").get_overlapping_bodies().size() > 1 or self.get_node("CharacterBody2D") not in get_parent().get_node("TrapArea").get_overlapping_bodies() or self.get_node("CharacterBody2D") in get_parent().get_node("TowerArea").get_overlapping_bodies():
|
||||
if get_node("Area2D").get_overlapping_bodies().size() > 1 or self.get_node("CharacterBody2D") not in get_parent().get_node("../TrapArea").get_overlapping_bodies() or self.get_node("CharacterBody2D") in get_parent().get_node("../TowerArea").get_overlapping_bodies():
|
||||
get_node("CharacterBody2D/Sprite2D").modulate = Color(255, 0, 0, 0.3)
|
||||
get_node("CharacterBody2D/Sprite2D2").modulate = Color(255, 0, 0, 0.3)
|
||||
else:
|
||||
@ -35,7 +35,7 @@ func get_if_moving_state():
|
||||
func _input(event):
|
||||
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
|
||||
if abs(position) <= get_viewport().get_mouse_position():
|
||||
if get_node("Area2D").get_overlapping_bodies().size() <= 1 and self.get_node("CharacterBody2D") in get_parent().get_node("TrapArea").get_overlapping_bodies() and self.get_node("CharacterBody2D") not in get_parent().get_node("TowerArea").get_overlapping_bodies():
|
||||
if get_node("Area2D").get_overlapping_bodies().size() <= 1 and self.get_node("CharacterBody2D") in get_parent().get_node("../TrapArea").get_overlapping_bodies() and self.get_node("CharacterBody2D") not in get_parent().get_node("../TowerArea").get_overlapping_bodies():
|
||||
follower = false
|
||||
|
||||
func Explode_Mine() -> void:
|
||||
|
@ -1,33 +1,39 @@
|
||||
extends Panel
|
||||
extends Control
|
||||
|
||||
@onready var livelabel: Label = $HBoxContainer4/HBoxContainer3/Label
|
||||
@onready var coinlabel: Label = $HBoxContainer4/HBoxContainer/Label
|
||||
@onready var livelabel: Label = $Panel/HBoxContainer4/HBoxContainer3/Label
|
||||
@onready var coinlabel: Label = $Panel/HBoxContainer4/HBoxContainer/Label
|
||||
|
||||
@onready var stickspawner: Button = $HBoxContainer4/HBoxContainer4/Button2
|
||||
|
||||
@onready var stickspawner: Button = $Panel/HBoxContainer4/HBoxContainer4/Button2
|
||||
const STICK_TRAP = preload("res://Game/Traps/stick_trap.tscn")
|
||||
|
||||
@onready var minespawner: Button = $HBoxContainer4/HBoxContainer4/Button3
|
||||
@onready var minespawner: Button = $Panel/HBoxContainer4/HBoxContainer4/Button3
|
||||
const MINE = preload("res://Game/Traps/mine.tscn")
|
||||
|
||||
@onready var wallspawner: Button = $HBoxContainer4/HBoxContainer4/Button4
|
||||
@onready var wallspawner: Button = $Panel/HBoxContainer4/HBoxContainer4/Button4
|
||||
const WALL = preload("res://Game/Traps/wall.tscn")
|
||||
|
||||
@onready var archertowerspawn: Button = $HBoxContainer4/HBoxContainer2/Button2
|
||||
@onready var archertowerspawn: Button = $Panel/HBoxContainer4/HBoxContainer2/Button2
|
||||
const ARCHER_TOWER = preload("res://Game/Towers/archer_tower.tscn")
|
||||
|
||||
@onready var wizardtowerspawn: Button = $HBoxContainer4/HBoxContainer2/Button3
|
||||
@onready var wizardtowerspawn: Button = $Panel/HBoxContainer4/HBoxContainer2/Button3
|
||||
const WIZARD_TOWER = preload("res://Game/Towers/wizard_tower.tscn")
|
||||
|
||||
@onready var mortartowerspawn: Button = $HBoxContainer4/HBoxContainer2/Button4
|
||||
@onready var mortartowerspawn: Button = $Panel/HBoxContainer4/HBoxContainer2/Button4
|
||||
const MORTAR_TOWER = preload("res://Game/Towers/mortar_tower.tscn")
|
||||
|
||||
@onready var delete_tower_button: Button = $HBoxContainer4/HBoxContainer5/Button4
|
||||
@onready var delete_tower_button: Button = $Panel/HBoxContainer4/HBoxContainer5/Button4
|
||||
const DELETER = preload("res://Game/Accesories/deleter.tscn")
|
||||
|
||||
var lives = 0
|
||||
var coins = 0
|
||||
|
||||
func _ready() -> void:
|
||||
get_node("pausemenu").hide()
|
||||
get_node("pausemenu").z_index = 5
|
||||
get_node("Panel").show()
|
||||
get_node("Panel").z_index = 5
|
||||
|
||||
stickspawner.connect("button_up", Spawn_Stick)
|
||||
stickspawner.tooltip_text = "Cost: 10\nReturn: 5"
|
||||
|
||||
@ -109,3 +115,47 @@ func Spawn_Mortar() -> void:
|
||||
func Spawn_Deleter() -> void:
|
||||
var deleter = DELETER.instantiate()
|
||||
get_parent().add_child(deleter)
|
||||
|
||||
|
||||
func _unhandled_input(event):
|
||||
if event is InputEventKey:
|
||||
if event.pressed and event.keycode == KEY_ESCAPE:
|
||||
get_node("pausemenu").show()
|
||||
get_node("Panel").hide()
|
||||
for i in get_node("../../Path2D").get_children():
|
||||
i.get_children()[0].set_process(false)
|
||||
|
||||
for i in get_parent().get_children():
|
||||
if i.name != "sidepanel":
|
||||
i.set_process(false)
|
||||
var timer_node = i.get_node("Timer") if i.has_node("Timer") else null
|
||||
if timer_node:
|
||||
timer_node.stop()
|
||||
|
||||
|
||||
get_parent().get_parent().get_node("Timer").stop()
|
||||
|
||||
|
||||
|
||||
func _on_button_3_pressed() -> void:
|
||||
get_node("pausemenu").hide()
|
||||
get_node("Panel").show()
|
||||
for i in get_node("../../Path2D").get_children():
|
||||
i.get_children()[0].set_process(true)
|
||||
|
||||
for i in get_parent().get_children():
|
||||
if i.name != "sidepanel":
|
||||
i.set_process(true)
|
||||
var timer_node = i.get_node("Timer") if i.has_node("Timer") else null
|
||||
if timer_node:
|
||||
timer_node.start()
|
||||
|
||||
get_parent().get_parent().get_node("Timer").start()
|
||||
|
||||
|
||||
func _on_button_2_pressed() -> void:
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
|
||||
func _on_button_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://Game/Menu/main.tscn")
|
||||
|
@ -1,9 +1,56 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://ddn64i6logtw0"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://ddn64i6logtw0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c6sh5em844tx2" path="res://Game/sidepanel.gd" id="1_klyhg"]
|
||||
[ext_resource type="FontFile" uid="uid://bu44ne346ymoe" path="res://Assets/Others/Canterbury.ttf" id="2_4l4p2"]
|
||||
|
||||
[node name="SidePanel" type="Panel"]
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s7jra"]
|
||||
bg_color = Color(0.6, 0.6, 0.6, 0.392157)
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_qvqxt"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_f5es8"]
|
||||
bg_color = Color(0.485703, 0.485704, 0.485703, 0.447059)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
shadow_size = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dgw1d"]
|
||||
bg_color = Color(0.117647, 0.117647, 0.117647, 0.682353)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
shadow_size = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nctfw"]
|
||||
bg_color = Color(1, 1, 1, 0.447059)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
shadow_size = 5
|
||||
|
||||
[node name="SidePanel" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("1_klyhg")
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
custom_minimum_size = Vector2(0, 60)
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
@ -12,9 +59,8 @@ grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 8
|
||||
script = ExtResource("1_klyhg")
|
||||
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="."]
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="Panel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@ -24,21 +70,21 @@ grow_vertical = 2
|
||||
theme_override_constants/separation = 60
|
||||
alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer4"]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 120
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer4/HBoxContainer"]
|
||||
[node name="Label" type="Label" parent="Panel/HBoxContainer4/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Coins: "
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="HBoxContainer4"]
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="Panel/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 30
|
||||
alignment = 1
|
||||
|
||||
[node name="Button2" type="Button" parent="HBoxContainer4/HBoxContainer2"]
|
||||
[node name="Button2" type="Button" parent="Panel/HBoxContainer4/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -46,7 +92,7 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Archer"
|
||||
|
||||
[node name="Button3" type="Button" parent="HBoxContainer4/HBoxContainer2"]
|
||||
[node name="Button3" type="Button" parent="Panel/HBoxContainer4/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -54,7 +100,7 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Wizard"
|
||||
|
||||
[node name="Button4" type="Button" parent="HBoxContainer4/HBoxContainer2"]
|
||||
[node name="Button4" type="Button" parent="Panel/HBoxContainer4/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -62,12 +108,12 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Mortar"
|
||||
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="HBoxContainer4"]
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="Panel/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 30
|
||||
alignment = 1
|
||||
|
||||
[node name="Button2" type="Button" parent="HBoxContainer4/HBoxContainer4"]
|
||||
[node name="Button2" type="Button" parent="Panel/HBoxContainer4/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -75,7 +121,7 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Sticks"
|
||||
|
||||
[node name="Button3" type="Button" parent="HBoxContainer4/HBoxContainer4"]
|
||||
[node name="Button3" type="Button" parent="Panel/HBoxContainer4/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -83,7 +129,7 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Mine"
|
||||
|
||||
[node name="Button4" type="Button" parent="HBoxContainer4/HBoxContainer4"]
|
||||
[node name="Button4" type="Button" parent="Panel/HBoxContainer4/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -91,12 +137,12 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Wall"
|
||||
|
||||
[node name="HBoxContainer5" type="HBoxContainer" parent="HBoxContainer4"]
|
||||
[node name="HBoxContainer5" type="HBoxContainer" parent="Panel/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 120
|
||||
alignment = 1
|
||||
|
||||
[node name="Button4" type="Button" parent="HBoxContainer4/HBoxContainer5"]
|
||||
[node name="Button4" type="Button" parent="Panel/HBoxContainer4/HBoxContainer5"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -104,11 +150,82 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Sell"
|
||||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="HBoxContainer4"]
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="Panel/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 120
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer4/HBoxContainer3"]
|
||||
[node name="Label" type="Label" parent="Panel/HBoxContainer4/HBoxContainer3"]
|
||||
layout_mode = 2
|
||||
text = "Lives: "
|
||||
|
||||
[node name="pausemenu" type="PanelContainer" parent="."]
|
||||
custom_minimum_size = Vector2(250, 0)
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -306.0
|
||||
offset_top = -227.5
|
||||
offset_right = 306.0
|
||||
offset_bottom = 227.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_s7jra")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="pausemenu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 30
|
||||
alignment = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="pausemenu/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = ExtResource("2_4l4p2")
|
||||
theme_override_font_sizes/font_size = 64
|
||||
text = "Game Paused"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Button" type="Button" parent="pausemenu/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(250, 60)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 30
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_qvqxt")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
|
||||
text = "Main Menu"
|
||||
|
||||
[node name="Button2" type="Button" parent="pausemenu/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(250, 60)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 30
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_qvqxt")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
|
||||
text = "Restart"
|
||||
|
||||
[node name="Button3" type="Button" parent="pausemenu/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(250, 60)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 30
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_qvqxt")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
|
||||
text = "Continue"
|
||||
|
||||
[connection signal="pressed" from="pausemenu/VBoxContainer/Button" to="." method="_on_button_pressed"]
|
||||
[connection signal="pressed" from="pausemenu/VBoxContainer/Button2" to="." method="_on_button_2_pressed"]
|
||||
[connection signal="pressed" from="pausemenu/VBoxContainer/Button3" to="." method="_on_button_3_pressed"]
|
||||
|
Reference in New Issue
Block a user