Port to v4.2.1.stable.official [b09f793f5]
This commit is contained in:
parent
4f6deaa443
commit
a9da1e6f3f
13 changed files with 603 additions and 679 deletions
|
@ -1,7 +0,0 @@
|
|||
[gd_resource type="FontFile" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://fonts/Louis George Cafe Bold.ttf" type="FontFile" id=1]
|
||||
|
||||
[resource]
|
||||
size = 36
|
||||
font_data = ExtResource( 1 )
|
|
@ -1,5 +1,5 @@
|
|||
This is a Sans serif basic font. It's a professional version which was complicated hand-made
|
||||
This is a Sans serif basic font. It's a professional version which was complicated hand-made
|
||||
and computer-generated graphics, and various revisions. After installing on the computer,
|
||||
you can create posters, web graphics, game graphics, t-shirts, videos, signs, logos and more.
|
||||
These fonts are 100% FREE for both personal and business usages. If you have any question,
|
||||
you can create posters, web graphics, game graphics, t-shirts, videos, signs, logos and more.
|
||||
These fonts are 100% FREE for both personal and business usages. If you have any question,
|
||||
please feel free to contact me. yiningchen23@gmail.com
|
|
@ -11,13 +11,13 @@ config_version=5
|
|||
[application]
|
||||
|
||||
config/name="gordle"
|
||||
run/main_scene="res://src/Menu.tscn"
|
||||
run/main_scene="res://src/menu.tscn"
|
||||
config/features=PackedStringArray("4.2")
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
Global="*res://src/Global.gd"
|
||||
Global="*res://src/global.gd"
|
||||
|
||||
[display]
|
||||
|
||||
|
@ -28,7 +28,7 @@ window/handheld/orientation="portrait"
|
|||
|
||||
[gui]
|
||||
|
||||
theme/custom_font="res://fonts/DefaultFont.tres"
|
||||
theme/custom="res://resources/default_theme.tres"
|
||||
|
||||
[physics]
|
||||
|
||||
|
|
7
resources/default_theme.tres
Normal file
7
resources/default_theme.tres
Normal file
|
@ -0,0 +1,7 @@
|
|||
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://32rr1dpcq5e4"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://b7jasa607pvfx" path="res://fonts/Louis George Cafe Bold.ttf" id="1_r3teu"]
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource("1_r3teu")
|
||||
default_font_size = 36
|
|
@ -1,23 +0,0 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://fonts/Louis George Cafe Bold.ttf" type="FontFile" id=1]
|
||||
|
||||
[sub_resource type="FontFile" id=1]
|
||||
size = 52
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[node name="Letter" type="ColorRect"]
|
||||
offset_right = 68.0
|
||||
offset_bottom = 68.0
|
||||
custom_minimum_size = Vector2( 68, 68 )
|
||||
color = Color( 0.0313726, 0.0313726, 0.0588235, 0.509804 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme_override_fonts/font = SubResource( 1 )
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
350
src/Main.tscn
350
src/Main.tscn
|
@ -1,350 +0,0 @@
|
|||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://fonts/Louis George Cafe Bold.ttf" type="FontFile" id=1]
|
||||
[ext_resource path="res://src/Main.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="FontFile" id=1]
|
||||
size = 72
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="FontFile" id=2]
|
||||
size = 24
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="FontFile" id=5]
|
||||
size = 40
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="FontFile" id=4]
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
resource_name = "ErrorFadeOut"
|
||||
length = 6.0
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("C/V/ErrorText:theme_override_colors/font_color")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array( 0, 5, 6 ),
|
||||
"transitions": PackedFloat32Array( 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 1, 0.31, 0.31, 1 ), Color( 1, 0.31, 0.31, 1 ), Color( 1, 0.309804, 0.309804, 0 ) ]
|
||||
}
|
||||
|
||||
[node name="Main" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 2 )
|
||||
color_incorrect = Color( 0.258824, 0.258824, 0.301961, 1 )
|
||||
color_misplaced = Color( 0.741176, 0.713726, 0.25098, 1 )
|
||||
color_correct = Color( 0, 0.619608, 0.298039, 1 )
|
||||
|
||||
[node name="C" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="C"]
|
||||
offset_left = 52.0
|
||||
offset_top = 292.0
|
||||
offset_right = 588.0
|
||||
offset_bottom = 667.0
|
||||
theme_override_constants/separation = 20
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Title" type="Label" parent="C/V"]
|
||||
offset_right = 536.0
|
||||
offset_bottom = 82.0
|
||||
theme_override_fonts/font = SubResource( 1 )
|
||||
text = "Gordle"
|
||||
align = 1
|
||||
|
||||
[node name="LetterGrid" type="GridContainer" parent="C/V"]
|
||||
offset_left = 268.0
|
||||
offset_top = 102.0
|
||||
offset_right = 268.0
|
||||
offset_bottom = 102.0
|
||||
grow_horizontal = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_constants/v_separation = 8
|
||||
theme_override_constants/h_separation = 8
|
||||
columns = 5
|
||||
|
||||
[node name="ErrorText" type="Label" parent="C/V"]
|
||||
offset_top = 122.0
|
||||
offset_right = 536.0
|
||||
offset_bottom = 150.0
|
||||
theme_override_colors/font_color = Color( 1, 0.31, 0.31, 1 )
|
||||
theme_override_fonts/font = SubResource( 2 )
|
||||
align = 1
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="C/V"]
|
||||
offset_top = 170.0
|
||||
offset_right = 536.0
|
||||
offset_bottom = 375.0
|
||||
|
||||
[node name="HRow1" type="HBoxContainer" parent="C/V/V"]
|
||||
offset_right = 536.0
|
||||
offset_bottom = 47.0
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="ButtonQ" type="Button" parent="C/V/V/HRow1"]
|
||||
offset_right = 50.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "Q"
|
||||
|
||||
[node name="ButtonW" type="Button" parent="C/V/V/HRow1"]
|
||||
offset_left = 54.0
|
||||
offset_right = 104.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "W"
|
||||
|
||||
[node name="ButtonE" type="Button" parent="C/V/V/HRow1"]
|
||||
offset_left = 108.0
|
||||
offset_right = 158.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "E"
|
||||
|
||||
[node name="ButtonR" type="Button" parent="C/V/V/HRow1"]
|
||||
offset_left = 162.0
|
||||
offset_right = 212.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "R"
|
||||
|
||||
[node name="ButtonT" type="Button" parent="C/V/V/HRow1"]
|
||||
offset_left = 216.0
|
||||
offset_right = 266.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "T"
|
||||
|
||||
[node name="ButtonY" type="Button" parent="C/V/V/HRow1"]
|
||||
offset_left = 270.0
|
||||
offset_right = 320.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "Y"
|
||||
|
||||
[node name="ButtonU" type="Button" parent="C/V/V/HRow1"]
|
||||
offset_left = 324.0
|
||||
offset_right = 374.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "U"
|
||||
|
||||
[node name="ButtonI" type="Button" parent="C/V/V/HRow1"]
|
||||
offset_left = 378.0
|
||||
offset_right = 428.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "I"
|
||||
|
||||
[node name="ButtonO" type="Button" parent="C/V/V/HRow1"]
|
||||
offset_left = 432.0
|
||||
offset_right = 482.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "O"
|
||||
|
||||
[node name="ButtonP" type="Button" parent="C/V/V/HRow1"]
|
||||
offset_left = 486.0
|
||||
offset_right = 536.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "P"
|
||||
|
||||
[node name="HRow2" type="HBoxContainer" parent="C/V/V"]
|
||||
offset_left = 27.0
|
||||
offset_top = 51.0
|
||||
offset_right = 509.0
|
||||
offset_bottom = 98.0
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="ButtonA" type="Button" parent="C/V/V/HRow2"]
|
||||
offset_right = 50.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "A"
|
||||
|
||||
[node name="ButtonS" type="Button" parent="C/V/V/HRow2"]
|
||||
offset_left = 54.0
|
||||
offset_right = 104.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "S"
|
||||
|
||||
[node name="ButtonD" type="Button" parent="C/V/V/HRow2"]
|
||||
offset_left = 108.0
|
||||
offset_right = 158.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "D"
|
||||
|
||||
[node name="ButtonF" type="Button" parent="C/V/V/HRow2"]
|
||||
offset_left = 162.0
|
||||
offset_right = 212.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "F"
|
||||
|
||||
[node name="ButtonG" type="Button" parent="C/V/V/HRow2"]
|
||||
offset_left = 216.0
|
||||
offset_right = 266.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "G"
|
||||
|
||||
[node name="ButtonH" type="Button" parent="C/V/V/HRow2"]
|
||||
offset_left = 270.0
|
||||
offset_right = 320.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "H"
|
||||
|
||||
[node name="ButtonJ" type="Button" parent="C/V/V/HRow2"]
|
||||
offset_left = 324.0
|
||||
offset_right = 374.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "J"
|
||||
|
||||
[node name="ButtonK" type="Button" parent="C/V/V/HRow2"]
|
||||
offset_left = 378.0
|
||||
offset_right = 428.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "K"
|
||||
|
||||
[node name="ButtonL" type="Button" parent="C/V/V/HRow2"]
|
||||
offset_left = 432.0
|
||||
offset_right = 482.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "L"
|
||||
|
||||
[node name="HRow3" type="HBoxContainer" parent="C/V/V"]
|
||||
offset_left = 33.0
|
||||
offset_top = 102.0
|
||||
offset_right = 503.0
|
||||
offset_bottom = 149.0
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="ButtonZ" type="Button" parent="C/V/V/HRow3"]
|
||||
offset_right = 50.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "Z"
|
||||
|
||||
[node name="ButtonX" type="Button" parent="C/V/V/HRow3"]
|
||||
offset_left = 54.0
|
||||
offset_right = 104.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "X"
|
||||
|
||||
[node name="ButtonC" type="Button" parent="C/V/V/HRow3"]
|
||||
offset_left = 108.0
|
||||
offset_right = 158.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "C"
|
||||
|
||||
[node name="ButtonV" type="Button" parent="C/V/V/HRow3"]
|
||||
offset_left = 162.0
|
||||
offset_right = 212.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "V"
|
||||
|
||||
[node name="ButtonB" type="Button" parent="C/V/V/HRow3"]
|
||||
offset_left = 216.0
|
||||
offset_right = 266.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "B"
|
||||
|
||||
[node name="ButtonN" type="Button" parent="C/V/V/HRow3"]
|
||||
offset_left = 270.0
|
||||
offset_right = 320.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "N"
|
||||
|
||||
[node name="ButtonM" type="Button" parent="C/V/V/HRow3"]
|
||||
offset_left = 324.0
|
||||
offset_right = 374.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "M"
|
||||
|
||||
[node name="ButtonBksp" type="Button" parent="C/V/V/HRow3"]
|
||||
offset_left = 378.0
|
||||
offset_right = 470.0
|
||||
offset_bottom = 47.0
|
||||
custom_minimum_size = Vector2( 50, 0 )
|
||||
focus_mode = 0
|
||||
text = "bksp"
|
||||
|
||||
[node name="GuessButton" type="Button" parent="C/V/V"]
|
||||
offset_left = 205.0
|
||||
offset_top = 153.0
|
||||
offset_right = 330.0
|
||||
offset_bottom = 205.0
|
||||
focus_mode = 0
|
||||
size_flags_horizontal = 4
|
||||
theme_override_fonts/font = SubResource( 5 )
|
||||
text = "Guess"
|
||||
|
||||
[node name="MenuButton" type="Button" parent="."]
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -65.0
|
||||
offset_top = 10.0
|
||||
offset_right = -10.0
|
||||
offset_bottom = 36.0
|
||||
theme_override_fonts/font = SubResource( 4 )
|
||||
text = "Menu"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ErrorFadeOut" type="AnimationPlayer" parent="."]
|
||||
anims/ErrorFadeOut = SubResource( 3 )
|
||||
|
||||
[connection signal="pressed" from="C/V/V/HRow3/ButtonBksp" to="." method="_on_ButtonBksp_pressed"]
|
||||
[connection signal="pressed" from="C/V/V/GuessButton" to="." method="_on_GuessButton_pressed"]
|
||||
[connection signal="pressed" from="MenuButton" to="." method="_on_MenuButton_pressed"]
|
278
src/Menu.tscn
278
src/Menu.tscn
|
@ -1,278 +0,0 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://fonts/Louis George Cafe Bold.ttf" type="FontFile" id=1]
|
||||
[ext_resource path="res://src/Menu.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="FontFile" id=1]
|
||||
size = 96
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="FontFile" id=2]
|
||||
size = 24
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="FontFile" id=3]
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[node name="Menu" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="C" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="C"]
|
||||
offset_left = 165.0
|
||||
offset_top = 183.0
|
||||
offset_right = 475.0
|
||||
offset_bottom = 776.0
|
||||
theme_override_constants/separation = 80
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="C/V"]
|
||||
offset_right = 310.0
|
||||
offset_bottom = 140.0
|
||||
|
||||
[node name="Title" type="Label" parent="C/V/V"]
|
||||
offset_right = 310.0
|
||||
offset_bottom = 108.0
|
||||
theme_override_fonts/font = SubResource( 1 )
|
||||
text = "Gordle"
|
||||
align = 1
|
||||
|
||||
[node name="Subtitle" type="Label" parent="C/V/V"]
|
||||
offset_top = 112.0
|
||||
offset_right = 310.0
|
||||
offset_bottom = 140.0
|
||||
theme_override_fonts/font = SubResource( 2 )
|
||||
text = "Wordle in Godot"
|
||||
align = 1
|
||||
|
||||
[node name="V2" type="VBoxContainer" parent="C/V"]
|
||||
offset_top = 220.0
|
||||
offset_right = 310.0
|
||||
offset_bottom = 593.0
|
||||
theme_override_constants/separation = 30
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="C/V/V2"]
|
||||
offset_right = 310.0
|
||||
offset_bottom = 110.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="DailyButton" type="Button" parent="C/V/V2/V"]
|
||||
offset_right = 310.0
|
||||
offset_bottom = 47.0
|
||||
text = "Daily Gordle"
|
||||
|
||||
[node name="Label" type="Label" parent="C/V/V2/V"]
|
||||
offset_top = 51.0
|
||||
offset_right = 310.0
|
||||
offset_bottom = 110.0
|
||||
theme_override_fonts/font = SubResource( 2 )
|
||||
text = "Changes every day
|
||||
at midnight GMT"
|
||||
align = 1
|
||||
|
||||
[node name="V2" type="VBoxContainer" parent="C/V/V2"]
|
||||
offset_top = 140.0
|
||||
offset_right = 310.0
|
||||
offset_bottom = 219.0
|
||||
custom_minimum_size = Vector2( 310, 0 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="RandomButton" type="Button" parent="C/V/V2/V2"]
|
||||
offset_right = 310.0
|
||||
offset_bottom = 47.0
|
||||
text = "Random Gordle"
|
||||
|
||||
[node name="Label" type="Label" parent="C/V/V2/V2"]
|
||||
offset_top = 51.0
|
||||
offset_right = 310.0
|
||||
offset_bottom = 79.0
|
||||
theme_override_fonts/font = SubResource( 2 )
|
||||
text = "Different every time"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CreditsButton" type="Button" parent="C/V/V2"]
|
||||
offset_top = 249.0
|
||||
offset_right = 310.0
|
||||
offset_bottom = 296.0
|
||||
text = "Licenses"
|
||||
|
||||
[node name="QuitButton" type="Button" parent="C/V/V2"]
|
||||
offset_top = 326.0
|
||||
offset_right = 310.0
|
||||
offset_bottom = 373.0
|
||||
text = "Quit"
|
||||
|
||||
[node name="Credits" type="ColorRect" parent="."]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color( 0, 0, 0, 0.392157 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="M" type="MarginContainer" parent="Credits"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme_override_constants/margin_right = 50
|
||||
theme_override_constants/margin_top = 50
|
||||
theme_override_constants/margin_left = 50
|
||||
theme_override_constants/margin_bottom = 50
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="Credits/M"]
|
||||
offset_left = 50.0
|
||||
offset_top = 50.0
|
||||
offset_right = 590.0
|
||||
offset_bottom = 910.0
|
||||
|
||||
[node name="Panel" type="PanelContainer" parent="Credits/M/V"]
|
||||
offset_right = 540.0
|
||||
offset_bottom = 809.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Credits/M/V/Panel"]
|
||||
offset_left = 7.0
|
||||
offset_top = 7.0
|
||||
offset_right = 533.0
|
||||
offset_bottom = 802.0
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="Credits/M/V/Panel/ScrollContainer"]
|
||||
offset_right = 526.0
|
||||
offset_bottom = 1652.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 32
|
||||
|
||||
[node name="Godot" type="VBoxContainer" parent="Credits/M/V/Panel/ScrollContainer/V"]
|
||||
offset_right = 514.0
|
||||
offset_bottom = 598.0
|
||||
theme_override_constants/separation = 10
|
||||
alignment = 1
|
||||
|
||||
[node name="Title" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/Godot"]
|
||||
offset_right = 514.0
|
||||
offset_bottom = 41.0
|
||||
text = "Godot Engine"
|
||||
align = 1
|
||||
|
||||
[node name="License" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/Godot"]
|
||||
offset_top = 51.0
|
||||
offset_right = 514.0
|
||||
offset_bottom = 598.0
|
||||
theme_override_fonts/font = SubResource( 3 )
|
||||
text = "This game uses Godot Engine, available under the following license:
|
||||
|
||||
Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. Copyright (c) 2014-2021 Godot Engine contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
|
||||
autowrap = true
|
||||
|
||||
[node name="FreeType" type="VBoxContainer" parent="Credits/M/V/Panel/ScrollContainer/V"]
|
||||
offset_top = 630.0
|
||||
offset_right = 514.0
|
||||
offset_bottom = 722.0
|
||||
theme_override_constants/separation = 10
|
||||
alignment = 1
|
||||
|
||||
[node name="Title" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/FreeType"]
|
||||
offset_right = 514.0
|
||||
offset_bottom = 41.0
|
||||
text = "FreeType"
|
||||
align = 1
|
||||
|
||||
[node name="License" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/FreeType"]
|
||||
offset_top = 51.0
|
||||
offset_right = 514.0
|
||||
offset_bottom = 92.0
|
||||
theme_override_fonts/font = SubResource( 3 )
|
||||
text = "Portions of this software are copyright © 1996-2020 The FreeType Project (www.freetype.org). All rights reserved."
|
||||
autowrap = true
|
||||
|
||||
[node name="ENet" type="VBoxContainer" parent="Credits/M/V/Panel/ScrollContainer/V"]
|
||||
offset_top = 754.0
|
||||
offset_right = 514.0
|
||||
offset_bottom = 1286.0
|
||||
theme_override_constants/separation = 10
|
||||
alignment = 1
|
||||
|
||||
[node name="Title" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/ENet"]
|
||||
offset_right = 514.0
|
||||
offset_bottom = 41.0
|
||||
text = "ENet"
|
||||
align = 1
|
||||
|
||||
[node name="License" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/ENet"]
|
||||
offset_top = 51.0
|
||||
offset_right = 514.0
|
||||
offset_bottom = 532.0
|
||||
theme_override_fonts/font = SubResource( 3 )
|
||||
text = "Copyright (c) 2002-2020 Lee Salzman
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
|
||||
autowrap = true
|
||||
|
||||
[node name="MBedTLS" type="VBoxContainer" parent="Credits/M/V/Panel/ScrollContainer/V"]
|
||||
offset_top = 1318.0
|
||||
offset_right = 514.0
|
||||
offset_bottom = 1652.0
|
||||
theme_override_constants/separation = 10
|
||||
alignment = 1
|
||||
|
||||
[node name="Title" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/MBedTLS"]
|
||||
offset_right = 514.0
|
||||
offset_bottom = 41.0
|
||||
text = "MBedTLS"
|
||||
align = 1
|
||||
|
||||
[node name="License" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/MBedTLS"]
|
||||
offset_top = 51.0
|
||||
offset_right = 514.0
|
||||
offset_bottom = 334.0
|
||||
theme_override_fonts/font = SubResource( 3 )
|
||||
text = "Copyright The Mbed TLS Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
|
||||
autowrap = true
|
||||
|
||||
[node name="CreditsBackButton" type="Button" parent="Credits/M/V"]
|
||||
offset_left = 446.0
|
||||
offset_top = 813.0
|
||||
offset_right = 540.0
|
||||
offset_bottom = 860.0
|
||||
size_flags_horizontal = 8
|
||||
text = "Back"
|
||||
|
||||
[connection signal="pressed" from="C/V/V2/V/DailyButton" to="." method="_on_DailyButton_pressed"]
|
||||
[connection signal="pressed" from="C/V/V2/V2/RandomButton" to="." method="_on_RandomButton_pressed"]
|
||||
[connection signal="pressed" from="C/V/V2/CreditsButton" to="." method="_on_CreditsButton_pressed"]
|
||||
[connection signal="pressed" from="C/V/V2/QuitButton" to="." method="_on_QuitButton_pressed"]
|
||||
[connection signal="pressed" from="Credits/M/V/CreditsBackButton" to="." method="_on_CreditsBackButton_pressed"]
|
|
@ -25,9 +25,8 @@ func parse_words(filename: String, min_len: int, max_len: int) -> Dictionary:
|
|||
for i in range(min_len, max_len + 1):
|
||||
dict[i] = []
|
||||
|
||||
var file := File.new()
|
||||
var error := file.open(filename, File.READ)
|
||||
assert(not error)
|
||||
var file := FileAccess.open(filename, FileAccess.READ)
|
||||
assert(file != null)
|
||||
while not file.eof_reached():
|
||||
var line := file.get_line()
|
||||
var length = line.length()
|
||||
|
@ -61,3 +60,8 @@ func is_valid_word(word: String) -> bool:
|
|||
var words_list := all_words[length] as Array
|
||||
|
||||
return word.to_upper() in words_list
|
||||
|
||||
|
||||
func _notification(what: int) -> void:
|
||||
if what == NOTIFICATION_WM_CLOSE_REQUEST:
|
||||
get_tree().quit()
|
38
src/letter.tscn
Normal file
38
src/letter.tscn
Normal file
|
@ -0,0 +1,38 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://cqfmfp47ryhdr"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://b7jasa607pvfx" path="res://fonts/Louis George Cafe Bold.ttf" id="1"]
|
||||
|
||||
[sub_resource type="FontFile" id="1"]
|
||||
fallbacks = Array[Font]([ExtResource("1")])
|
||||
cache/0/52/0/ascent = 0.0
|
||||
cache/0/52/0/descent = 0.0
|
||||
cache/0/52/0/underline_position = 0.0
|
||||
cache/0/52/0/underline_thickness = 0.0
|
||||
cache/0/52/0/scale = 1.0
|
||||
cache/0/52/0/kerning_overrides/52/0 = Vector2(0, 0)
|
||||
cache/0/52/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
cache/0/16/0/ascent = 0.0
|
||||
cache/0/16/0/descent = 0.0
|
||||
cache/0/16/0/underline_position = 0.0
|
||||
cache/0/16/0/underline_thickness = 0.0
|
||||
cache/0/16/0/scale = 1.0
|
||||
cache/0/16/0/kerning_overrides/52/0 = Vector2(0, 0)
|
||||
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_i5elh"]
|
||||
font_size = 52
|
||||
|
||||
[node name="Letter" type="ColorRect"]
|
||||
custom_minimum_size = Vector2(68, 68)
|
||||
offset_right = 68.0
|
||||
offset_bottom = 68.0
|
||||
color = Color(0.0313726, 0.0313726, 0.0588235, 0.509804)
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme_override_fonts/font = SubResource("1")
|
||||
label_settings = SubResource("LabelSettings_i5elh")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
|
@ -4,7 +4,7 @@ extends Control
|
|||
const letter_count := 5
|
||||
const guess_count := 6
|
||||
|
||||
const Letter = preload("res://src/Letter.tscn")
|
||||
const Letter = preload("res://src/letter.tscn")
|
||||
|
||||
@export var color_incorrect: Color = Color()
|
||||
@export var color_misplaced: Color = Color()
|
||||
|
@ -19,7 +19,7 @@ var current_guess: int
|
|||
var ended: bool
|
||||
var input_guess: String
|
||||
|
||||
@onready var error_text_color_default = $C/V/ErrorText.get("theme_override_colors/font_color")
|
||||
@onready var error_text_color_default = $C/V/ErrorText.label_settings.font_color
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
|
@ -34,11 +34,11 @@ func _ready() -> void:
|
|||
|
||||
var random_seed = null
|
||||
if Global.daily_mode:
|
||||
var current_time := Time.get_datetime_dict_from_system_from_unix_time(Time.get_unix_time_from_system())
|
||||
var current_time := Time.get_datetime_dict_from_system(true)
|
||||
current_time["hour"] = 0
|
||||
current_time["minute"] = 0
|
||||
current_time["second"] = 0
|
||||
random_seed = Time.get_unix_time_from_system_from_datetime(current_time)
|
||||
random_seed = Time.get_unix_time_from_datetime_dict(current_time)
|
||||
|
||||
$C/V/Title.text = "Daily " + $C/V/Title.text
|
||||
else:
|
||||
|
@ -49,7 +49,7 @@ func _ready() -> void:
|
|||
ended = false
|
||||
|
||||
for i in range(0, 26):
|
||||
var letter := char(ord("A") + i)
|
||||
var letter := char("A".unicode_at(0) + i)
|
||||
var keyboard_button: Button = $C/V/V.find_child("Button" + letter)
|
||||
keyboard_buttons[letter] = keyboard_button
|
||||
var error := keyboard_button.connect("pressed", Callable(self, "type_letter").bind(letter))
|
||||
|
@ -124,7 +124,7 @@ func guess_entered() -> void:
|
|||
# Remove that one letter from remaining letters (is there a function for this?)
|
||||
for j in range(letters_remaining.size()):
|
||||
if letters_remaining[j] == guess_letter:
|
||||
letters_remaining.remove(j)
|
||||
letters_remaining.remove_at(j)
|
||||
break
|
||||
|
||||
# Mark all yellows (and grays)
|
||||
|
@ -138,7 +138,7 @@ func guess_entered() -> void:
|
|||
for j in range(letters_remaining.size()):
|
||||
if letters_remaining[j] == guess_letter:
|
||||
found = true
|
||||
letters_remaining.remove(j)
|
||||
letters_remaining.remove_at(j)
|
||||
break
|
||||
if found:
|
||||
letter_instance.color = color_misplaced
|
||||
|
@ -175,7 +175,7 @@ func show_error(text: String, color = null):
|
|||
$C/V/ErrorText.text = text
|
||||
if typeof(color) == TYPE_COLOR:
|
||||
$ErrorFadeOut.stop()
|
||||
$C/V/ErrorText.add_theme_color_override("font_color", color)
|
||||
$C/V/ErrorText.label_settings.font_color = color
|
||||
else:
|
||||
$ErrorFadeOut.play("ErrorFadeOut")
|
||||
|
||||
|
@ -187,7 +187,7 @@ func hide_error():
|
|||
|
||||
func _on_MenuButton_pressed() -> void:
|
||||
# TODO check if game is in progress and show confirmation popup
|
||||
var error := get_tree().change_scene_to_file("res://src/Menu.tscn")
|
||||
var error := get_tree().change_scene_to_file("res://src/menu.tscn")
|
||||
assert(not error)
|
||||
|
||||
|
331
src/main.tscn
Normal file
331
src/main.tscn
Normal file
|
@ -0,0 +1,331 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://busmmqyj42lv5"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://b7jasa607pvfx" path="res://fonts/Louis George Cafe Bold.ttf" id="1"]
|
||||
[ext_resource type="Script" path="res://src/main.gd" id="2"]
|
||||
|
||||
[sub_resource type="FontFile" id="1"]
|
||||
fallbacks = Array[Font]([ExtResource("1")])
|
||||
cache/0/72/0/ascent = 0.0
|
||||
cache/0/72/0/descent = 0.0
|
||||
cache/0/72/0/underline_position = 0.0
|
||||
cache/0/72/0/underline_thickness = 0.0
|
||||
cache/0/72/0/scale = 1.0
|
||||
cache/0/72/0/kerning_overrides/72/0 = Vector2(0, 0)
|
||||
cache/0/72/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
cache/0/16/0/ascent = 0.0
|
||||
cache/0/16/0/descent = 0.0
|
||||
cache/0/16/0/underline_position = 0.0
|
||||
cache/0/16/0/underline_thickness = 0.0
|
||||
cache/0/16/0/scale = 1.0
|
||||
cache/0/16/0/kerning_overrides/72/0 = Vector2(0, 0)
|
||||
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_h2dux"]
|
||||
font_size = 72
|
||||
|
||||
[sub_resource type="FontFile" id="2"]
|
||||
fallbacks = Array[Font]([ExtResource("1")])
|
||||
cache/0/24/0/ascent = 0.0
|
||||
cache/0/24/0/descent = 0.0
|
||||
cache/0/24/0/underline_position = 0.0
|
||||
cache/0/24/0/underline_thickness = 0.0
|
||||
cache/0/24/0/scale = 1.0
|
||||
cache/0/24/0/kerning_overrides/24/0 = Vector2(0, 0)
|
||||
cache/0/24/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
cache/0/16/0/ascent = 0.0
|
||||
cache/0/16/0/descent = 0.0
|
||||
cache/0/16/0/underline_position = 0.0
|
||||
cache/0/16/0/underline_thickness = 0.0
|
||||
cache/0/16/0/scale = 1.0
|
||||
cache/0/16/0/kerning_overrides/24/0 = Vector2(0, 0)
|
||||
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_81m3s"]
|
||||
font_size = 24
|
||||
font_color = Color(1, 0.309804, 0.309804, 1)
|
||||
|
||||
[sub_resource type="FontFile" id="5"]
|
||||
fallbacks = Array[Font]([ExtResource("1")])
|
||||
cache/0/16/0/ascent = 0.0
|
||||
cache/0/16/0/descent = 0.0
|
||||
cache/0/16/0/underline_position = 0.0
|
||||
cache/0/16/0/underline_thickness = 0.0
|
||||
cache/0/16/0/scale = 1.0
|
||||
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
cache/0/16/0/kerning_overrides/36/0 = Vector2(0, 0)
|
||||
cache/0/36/0/ascent = 0.0
|
||||
cache/0/36/0/descent = 0.0
|
||||
cache/0/36/0/underline_position = 0.0
|
||||
cache/0/36/0/underline_thickness = 0.0
|
||||
cache/0/36/0/scale = 1.0
|
||||
cache/0/36/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
cache/0/36/0/kerning_overrides/36/0 = Vector2(0, 0)
|
||||
|
||||
[sub_resource type="Animation" id="3"]
|
||||
resource_name = "ErrorFadeOut"
|
||||
length = 6.0
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("C/V/ErrorText:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 5, 6),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qsyqi"]
|
||||
_data = {
|
||||
"ErrorFadeOut": SubResource("3")
|
||||
}
|
||||
|
||||
[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
|
||||
script = ExtResource("2")
|
||||
color_incorrect = Color(0.258824, 0.258824, 0.301961, 1)
|
||||
color_misplaced = Color(0.741176, 0.713726, 0.25098, 1)
|
||||
color_correct = Color(0, 0.619608, 0.298039, 1)
|
||||
|
||||
[node name="C" type="CenterContainer" parent="."]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="C"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 20
|
||||
|
||||
[node name="Title" type="Label" parent="C/V"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = SubResource("1")
|
||||
text = "Gordle"
|
||||
label_settings = SubResource("LabelSettings_h2dux")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="LetterGrid" type="GridContainer" parent="C/V"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_constants/h_separation = 8
|
||||
theme_override_constants/v_separation = 8
|
||||
columns = 5
|
||||
|
||||
[node name="ErrorText" type="Label" parent="C/V"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(1, 0.309804, 0.309804, 1)
|
||||
theme_override_fonts/font = SubResource("2")
|
||||
label_settings = SubResource("LabelSettings_81m3s")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="C/V"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HRow1" type="HBoxContainer" parent="C/V/V"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="ButtonQ" type="Button" parent="C/V/V/HRow1"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "Q"
|
||||
|
||||
[node name="ButtonW" type="Button" parent="C/V/V/HRow1"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "W"
|
||||
|
||||
[node name="ButtonE" type="Button" parent="C/V/V/HRow1"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "E"
|
||||
|
||||
[node name="ButtonR" type="Button" parent="C/V/V/HRow1"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "R"
|
||||
|
||||
[node name="ButtonT" type="Button" parent="C/V/V/HRow1"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "T"
|
||||
|
||||
[node name="ButtonY" type="Button" parent="C/V/V/HRow1"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "Y"
|
||||
|
||||
[node name="ButtonU" type="Button" parent="C/V/V/HRow1"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "U"
|
||||
|
||||
[node name="ButtonI" type="Button" parent="C/V/V/HRow1"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "I"
|
||||
|
||||
[node name="ButtonO" type="Button" parent="C/V/V/HRow1"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "O"
|
||||
|
||||
[node name="ButtonP" type="Button" parent="C/V/V/HRow1"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "P"
|
||||
|
||||
[node name="HRow2" type="HBoxContainer" parent="C/V/V"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="ButtonA" type="Button" parent="C/V/V/HRow2"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "A"
|
||||
|
||||
[node name="ButtonS" type="Button" parent="C/V/V/HRow2"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "S"
|
||||
|
||||
[node name="ButtonD" type="Button" parent="C/V/V/HRow2"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "D"
|
||||
|
||||
[node name="ButtonF" type="Button" parent="C/V/V/HRow2"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "F"
|
||||
|
||||
[node name="ButtonG" type="Button" parent="C/V/V/HRow2"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "G"
|
||||
|
||||
[node name="ButtonH" type="Button" parent="C/V/V/HRow2"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "H"
|
||||
|
||||
[node name="ButtonJ" type="Button" parent="C/V/V/HRow2"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "J"
|
||||
|
||||
[node name="ButtonK" type="Button" parent="C/V/V/HRow2"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "K"
|
||||
|
||||
[node name="ButtonL" type="Button" parent="C/V/V/HRow2"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "L"
|
||||
|
||||
[node name="HRow3" type="HBoxContainer" parent="C/V/V"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="ButtonZ" type="Button" parent="C/V/V/HRow3"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "Z"
|
||||
|
||||
[node name="ButtonX" type="Button" parent="C/V/V/HRow3"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "X"
|
||||
|
||||
[node name="ButtonC" type="Button" parent="C/V/V/HRow3"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "C"
|
||||
|
||||
[node name="ButtonV" type="Button" parent="C/V/V/HRow3"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "V"
|
||||
|
||||
[node name="ButtonB" type="Button" parent="C/V/V/HRow3"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "B"
|
||||
|
||||
[node name="ButtonN" type="Button" parent="C/V/V/HRow3"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "N"
|
||||
|
||||
[node name="ButtonM" type="Button" parent="C/V/V/HRow3"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "M"
|
||||
|
||||
[node name="ButtonBksp" type="Button" parent="C/V/V/HRow3"]
|
||||
custom_minimum_size = Vector2(50, 0)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
text = "bksp"
|
||||
|
||||
[node name="GuessButton" type="Button" parent="C/V/V"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
focus_mode = 0
|
||||
theme_override_fonts/font = SubResource("5")
|
||||
text = "Guess"
|
||||
|
||||
[node name="MenuButton" type="Button" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -60.0
|
||||
offset_top = 10.0
|
||||
offset_right = -10.0
|
||||
offset_bottom = 37.0
|
||||
grow_horizontal = 0
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Menu"
|
||||
|
||||
[node name="ErrorFadeOut" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_qsyqi")
|
||||
}
|
||||
|
||||
[connection signal="pressed" from="C/V/V/HRow3/ButtonBksp" to="." method="_on_ButtonBksp_pressed"]
|
||||
[connection signal="pressed" from="C/V/V/GuessButton" to="." method="_on_GuessButton_pressed"]
|
||||
[connection signal="pressed" from="MenuButton" to="." method="_on_MenuButton_pressed"]
|
|
@ -8,13 +8,13 @@ func _ready() -> void:
|
|||
|
||||
func _on_DailyButton_pressed() -> void:
|
||||
Global.daily_mode = true
|
||||
var error := get_tree().change_scene_to_file("res://src/Main.tscn")
|
||||
var error := get_tree().change_scene_to_file("res://src/main.tscn")
|
||||
assert(not error)
|
||||
|
||||
|
||||
func _on_RandomButton_pressed() -> void:
|
||||
Global.daily_mode = false
|
||||
var error := get_tree().change_scene_to_file("res://src/Main.tscn")
|
||||
var error := get_tree().change_scene_to_file("res://src/main.tscn")
|
||||
assert(not error)
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@ func _on_CreditsButton_pressed() -> void:
|
|||
|
||||
|
||||
func _on_QuitButton_pressed() -> void:
|
||||
get_tree().notification(NOTIFICATION_WM_QUIT_REQUEST)
|
||||
get_tree().get_root().propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST)
|
||||
|
||||
|
||||
func _on_CreditsBackButton_pressed() -> void:
|
202
src/menu.tscn
Normal file
202
src/menu.tscn
Normal file
|
@ -0,0 +1,202 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://173vb7ig0vfd"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/menu.gd" id="1_53n2c"]
|
||||
[ext_resource type="FontFile" uid="uid://b7jasa607pvfx" path="res://fonts/Louis George Cafe Bold.ttf" id="2_4qysc"]
|
||||
|
||||
[sub_resource type="FontFile" id="1"]
|
||||
fallbacks = Array[Font]([ExtResource("2_4qysc")])
|
||||
cache/0/96/0/ascent = 0.0
|
||||
cache/0/96/0/descent = 0.0
|
||||
cache/0/96/0/underline_position = 0.0
|
||||
cache/0/96/0/underline_thickness = 0.0
|
||||
cache/0/96/0/scale = 1.0
|
||||
cache/0/96/0/kerning_overrides/96/0 = Vector2(0, 0)
|
||||
cache/0/96/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
cache/0/16/0/ascent = 0.0
|
||||
cache/0/16/0/descent = 0.0
|
||||
cache/0/16/0/underline_position = 0.0
|
||||
cache/0/16/0/underline_thickness = 0.0
|
||||
cache/0/16/0/scale = 1.0
|
||||
cache/0/16/0/kerning_overrides/96/0 = Vector2(0, 0)
|
||||
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_ea50h"]
|
||||
font_size = 96
|
||||
|
||||
[sub_resource type="FontFile" id="2"]
|
||||
fallbacks = Array[Font]([ExtResource("2_4qysc")])
|
||||
cache/0/24/0/ascent = 0.0
|
||||
cache/0/24/0/descent = 0.0
|
||||
cache/0/24/0/underline_position = 0.0
|
||||
cache/0/24/0/underline_thickness = 0.0
|
||||
cache/0/24/0/scale = 1.0
|
||||
cache/0/24/0/kerning_overrides/24/0 = Vector2(0, 0)
|
||||
cache/0/24/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
cache/0/16/0/ascent = 0.0
|
||||
cache/0/16/0/descent = 0.0
|
||||
cache/0/16/0/underline_position = 0.0
|
||||
cache/0/16/0/underline_thickness = 0.0
|
||||
cache/0/16/0/scale = 1.0
|
||||
cache/0/16/0/kerning_overrides/24/0 = Vector2(0, 0)
|
||||
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_kumw7"]
|
||||
font_size = 24
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_17upj"]
|
||||
font_size = 24
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_cdviw"]
|
||||
font_size = 24
|
||||
|
||||
[node name="Menu" 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_53n2c")
|
||||
|
||||
[node name="C" type="CenterContainer" parent="."]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="C"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 80
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="C/V"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Title" type="Label" parent="C/V/V"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = SubResource("1")
|
||||
text = "Gordle"
|
||||
label_settings = SubResource("LabelSettings_ea50h")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Subtitle" type="Label" parent="C/V/V"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = SubResource("2")
|
||||
text = "Wordle in Godot"
|
||||
label_settings = SubResource("LabelSettings_kumw7")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="V2" type="VBoxContainer" parent="C/V"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 30
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="C/V/V2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="DailyButton" type="Button" parent="C/V/V2/V"]
|
||||
layout_mode = 2
|
||||
text = "Daily Gordle"
|
||||
|
||||
[node name="Label" type="Label" parent="C/V/V2/V"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = SubResource("2")
|
||||
text = "Changes every day
|
||||
at midnight GMT"
|
||||
label_settings = SubResource("LabelSettings_17upj")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="V2" type="VBoxContainer" parent="C/V/V2"]
|
||||
custom_minimum_size = Vector2(310, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RandomButton" type="Button" parent="C/V/V2/V2"]
|
||||
layout_mode = 2
|
||||
text = "Random Gordle"
|
||||
|
||||
[node name="Label" type="Label" parent="C/V/V2/V2"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = SubResource("2")
|
||||
text = "Different every time"
|
||||
label_settings = SubResource("LabelSettings_cdviw")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="CreditsButton" type="Button" parent="C/V/V2"]
|
||||
layout_mode = 2
|
||||
text = "Licenses"
|
||||
|
||||
[node name="QuitButton" type="Button" parent="C/V/V2"]
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
|
||||
[node name="Credits" type="ColorRect" parent="."]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color(0.054902, 0.054902, 0.105882, 0.784314)
|
||||
|
||||
[node name="M" type="MarginContainer" parent="Credits"]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme_override_constants/margin_left = 50
|
||||
theme_override_constants/margin_top = 50
|
||||
theme_override_constants/margin_right = 50
|
||||
theme_override_constants/margin_bottom = 50
|
||||
|
||||
[node name="V" type="VBoxContainer" parent="Credits/M"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Panel" type="PanelContainer" parent="Credits/M/V"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="Credits/M/V/Panel"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/normal_font_size = 16
|
||||
theme_override_font_sizes/bold_font_size = 36
|
||||
bbcode_enabled = true
|
||||
text = "[center][b]Godot Engine[/b][/center]
|
||||
|
||||
This game uses Godot Engine, available under the following license:
|
||||
|
||||
Copyright (c) 2014-present Godot Engine contributors. Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
[center][b]FreeType[/b][/center]
|
||||
|
||||
Portions of this software are copyright © 1996-2023 The FreeType Project (www.freetype.org). All rights reserved.
|
||||
|
||||
[center][b]ENet[/b][/center]
|
||||
|
||||
Copyright (c) 2002-2020 Lee Salzman
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
[center][b]mbed TLS[/b][/center]
|
||||
|
||||
Copyright The Mbed TLS Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
|
||||
|
||||
[node name="CreditsBackButton" type="Button" parent="Credits/M/V"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
text = "Back"
|
||||
|
||||
[connection signal="pressed" from="C/V/V2/V/DailyButton" to="." method="_on_DailyButton_pressed"]
|
||||
[connection signal="pressed" from="C/V/V2/V2/RandomButton" to="." method="_on_RandomButton_pressed"]
|
||||
[connection signal="pressed" from="C/V/V2/CreditsButton" to="." method="_on_CreditsButton_pressed"]
|
||||
[connection signal="pressed" from="C/V/V2/QuitButton" to="." method="_on_QuitButton_pressed"]
|
||||
[connection signal="pressed" from="Credits/M/V/CreditsBackButton" to="." method="_on_CreditsBackButton_pressed"]
|
Loading…
Reference in a new issue