-
Notifications
You must be signed in to change notification settings - Fork 0
/
SoftwareKeyboardTest.tscn
177 lines (151 loc) · 4.96 KB
/
SoftwareKeyboardTest.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
[gd_scene load_steps=7 format=2]
[ext_resource path="res://QuitButton.gd" type="Script" id=1]
[ext_resource path="res://MainMenuButton.gd" type="Script" id=2]
[ext_resource path="res://Background.tscn" type="PackedScene" id=3]
[sub_resource type="GDScript" id=3]
resource_name = "NumPadKeyboard"
script/source = "extends Button
func _pressed():
NintendoSwitch.show_virtual_keyboard(\"123456789\", NintendoSwitch.NUMPAD_KEYBOARD)
"
[sub_resource type="GDScript" id=2]
resource_name = "AllLangKeyboard"
script/source = "extends Button
func _pressed():
NintendoSwitch.show_virtual_keyboard(\"Lorem Ipsum Dolor Sit Amet\", NintendoSwitch.ALL_LANGUAGES_KEYBOARD)
"
[sub_resource type="GDScript" id=4]
resource_name = "KeyboardPadding"
script/source = "extends Panel
func _process(delta):
var height = OS.get_virtual_keyboard_height()
self.rect_min_size.y = height
self.rect_size.y = height
"
[node name="CenterContainer" type="CenterContainer"]
margin_right = 1280.0
margin_bottom = 720.0
[node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_left = 453.0
margin_top = 115.0
margin_right = 827.0
margin_bottom = 605.0
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"]
margin_right = 374.0
margin_bottom = 486.0
[node name="SoftwareKeyboardTest" type="VBoxContainer" parent="VBoxContainer/PanelContainer"]
margin_left = 7.0
margin_top = 7.0
margin_right = 367.0
margin_bottom = 479.0
rect_min_size = Vector2( 360, 0 )
size_flags_horizontal = 5
size_flags_vertical = 5
alignment = 1
[node name="Label" type="Label" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_right = 360.0
margin_bottom = 14.0
text = "Software Keyboard Test"
align = 1
valign = 1
[node name="Padding1" type="Panel" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_left = 180.0
margin_top = 18.0
margin_right = 180.0
margin_bottom = 48.0
rect_min_size = Vector2( 0, 30 )
size_flags_horizontal = 4
size_flags_vertical = 4
[node name="Instruction1" type="Label" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_top = 52.0
margin_right = 360.0
margin_bottom = 100.0
text = "On non-desktop devices,
the TextEdit below should
open the default software keyboard."
align = 1
valign = 1
[node name="Normal" type="TextEdit" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_top = 104.0
margin_right = 360.0
margin_bottom = 168.0
grow_horizontal = 2
grow_vertical = 2
rect_min_size = Vector2( 0, 64 )
text = "The quick brown fox jumps over the lazy dog"
[node name="Instruction2" type="Label" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_top = 172.0
margin_right = 360.0
margin_bottom = 237.0
text = "The text in the keyboard window should
match the text already in the box.
The viewport menu should adjust to ensure
the TextEdit fits in the visible area."
align = 1
valign = 1
[node name="Padding2" type="Panel" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_left = 180.0
margin_top = 241.0
margin_right = 180.0
margin_bottom = 271.0
rect_min_size = Vector2( 0, 30 )
size_flags_horizontal = 4
size_flags_vertical = 4
[node name="Instruction3" type="Label" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_top = 275.0
margin_right = 360.0
margin_bottom = 323.0
text = "The buttons below should
open the corresponding keyboard
with some example text."
align = 1
valign = 1
[node name="Numpad" type="Button" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_top = 327.0
margin_right = 360.0
margin_bottom = 347.0
text = "Open Number Pad Keyboard"
script = SubResource( 3 )
[node name="Padding3" type="Panel" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_left = 180.0
margin_top = 351.0
margin_right = 180.0
margin_bottom = 366.0
rect_min_size = Vector2( 0, 15 )
size_flags_horizontal = 4
size_flags_vertical = 4
[node name="AllLanguages" type="Button" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_top = 370.0
margin_right = 360.0
margin_bottom = 390.0
text = "Open All Languages Keyboard"
script = SubResource( 2 )
[node name="Padding4" type="Panel" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_left = 180.0
margin_top = 394.0
margin_right = 180.0
margin_bottom = 424.0
rect_min_size = Vector2( 0, 30 )
size_flags_horizontal = 4
size_flags_vertical = 4
[node name="MainMenuButton" type="Button" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_top = 428.0
margin_right = 360.0
margin_bottom = 448.0
text = "Main Menu"
script = ExtResource( 2 )
[node name="QuitButton" type="Button" parent="VBoxContainer/PanelContainer/SoftwareKeyboardTest"]
margin_top = 452.0
margin_right = 360.0
margin_bottom = 472.0
text = "Exit"
script = ExtResource( 1 )
[node name="KeyboardPadding" type="Panel" parent="VBoxContainer"]
margin_left = 187.0
margin_top = 490.0
margin_right = 187.0
margin_bottom = 490.0
size_flags_horizontal = 4
size_flags_vertical = 4
script = SubResource( 4 )
[node name="Camera" parent="." instance=ExtResource( 3 )]