Create press any key to continue screen
This commit is contained in:
@@ -1,3 +1,14 @@
|
|||||||
[gd_scene format=3 uid="uid://ci2gk11211n0d"]
|
[gd_scene load_steps=2 format=3 uid="uid://ci2gk11211n0d"]
|
||||||
|
|
||||||
[node name="main" type="Node2D"]
|
[ext_resource type="PackedScene" uid="uid://gbe1jarrwqsi" path="res://ui/PressAnyKeyScreen.tscn" id="1_o5qli"]
|
||||||
|
|
||||||
|
[node name="main" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="PressAnyKeyScreen" parent="." instance=ExtResource("1_o5qli")]
|
||||||
|
layout_mode = 1
|
||||||
|
|||||||
12
scripts/PressAAnyKeyScreen.gd
Normal file
12
scripts/PressAAnyKeyScreen.gd
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
extends Control
|
||||||
|
|
||||||
|
signal any_key_pressed
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
print("PressAnyKeyScreen ready")
|
||||||
|
|
||||||
|
func _input(event):
|
||||||
|
if event.is_action_pressed("any_key") or event is InputEventScreenTouch:
|
||||||
|
print("Any key pressed: ", event)
|
||||||
|
any_key_pressed.emit()
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
1
scripts/PressAAnyKeyScreen.gd.uid
Normal file
1
scripts/PressAAnyKeyScreen.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://buak21ajgvevl
|
||||||
45
ui/PressAnyKeyScreen.tscn
Normal file
45
ui/PressAnyKeyScreen.tscn
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://gbe1jarrwqsi"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://buak21ajgvevl" path="res://scripts/PressAAnyKeyScreen.gd" id="1_0a4p2"]
|
||||||
|
|
||||||
|
[node name="PressAnyKeyScreen" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_0a4p2")
|
||||||
|
|
||||||
|
[node name="Background" type="ColorRect" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0.18, 0.18, 0.18, 1)
|
||||||
|
|
||||||
|
[node name="PressKeyContainer" type="VBoxContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -80.5
|
||||||
|
offset_top = -25.0
|
||||||
|
offset_right = 80.5
|
||||||
|
offset_bottom = 25.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
|
[node name="TitleLabel" type="Label" parent="PressKeyContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Skelly"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="PressKeyLabel" type="Label" parent="PressKeyContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Press Ok to continue"
|
||||||
Reference in New Issue
Block a user