54 lines
1.5 KiB
Text
54 lines
1.5 KiB
Text
[gd_scene format=3 uid="uid://881tkl7idnnj"]
|
|
|
|
[sub_resource type="GDScript" id="GDScript_08qk3"]
|
|
script/source = "extends Control
|
|
|
|
func _ready():
|
|
visible = false
|
|
|
|
func _unhandled_input(event: InputEvent) -> void:
|
|
if visible != get_tree().paused:
|
|
return
|
|
if event is InputEventKey and (event as InputEventKey).is_pressed() and (event as InputEventKey).keycode == KEY_ESCAPE:
|
|
get_tree().paused = !get_tree().paused
|
|
visible = get_tree().paused
|
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE if visible else Input.MOUSE_MODE_CAPTURED
|
|
"
|
|
|
|
[node name="PauseMenu" type="Control" unique_id=973328140]
|
|
process_mode = 3
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
script = SubResource("GDScript_08qk3")
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=2082924246]
|
|
layout_mode = 1
|
|
anchors_preset = 8
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
offset_left = -39.5
|
|
offset_top = -20.0
|
|
offset_right = 39.5
|
|
offset_bottom = 20.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
|
|
[node name="RichTextLabel" type="RichTextLabel" parent="VBoxContainer" unique_id=1997982412]
|
|
layout_mode = 2
|
|
theme_override_font_sizes/italics_font_size = 32
|
|
bbcode_enabled = true
|
|
text = "[i]-= Paused =-[/i]"
|
|
fit_content = true
|
|
autowrap_mode = 0
|
|
|
|
[node name="Button" type="Button" parent="VBoxContainer" unique_id=313196666]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
size_flags_vertical = 4
|
|
text = "Continue"
|