Add credits/licenses

This commit is contained in:
Terry Hearst 2022-02-24 00:23:47 -05:00
parent a7424f0a66
commit 4c40352c52
4 changed files with 192 additions and 23 deletions

View file

@ -11,7 +11,7 @@ config_version=4
[application] [application]
config/name="gordle" config/name="gordle"
run/main_scene="res://src/Main.tscn" run/main_scene="res://src/Menu.tscn"
config/icon="res://icon.png" config/icon="res://icon.png"
[autoload] [autoload]

View file

@ -45,6 +45,8 @@ func _ready() -> void:
current_guess = 0 current_guess = 0
ended = false ended = false
$C/V/V/H/GuessText.grab_focus()
func _on_GuessButton_pressed() -> void: func _on_GuessButton_pressed() -> void:
var guess_text_node := find_node("GuessText") as LineEdit var guess_text_node := find_node("GuessText") as LineEdit

View file

@ -1,4 +1,4 @@
extends CenterContainer extends Control
func _ready() -> void: func _ready() -> void:
@ -19,8 +19,12 @@ func _on_RandomButton_pressed() -> void:
func _on_CreditsButton_pressed() -> void: func _on_CreditsButton_pressed() -> void:
pass # Replace with function body. $Credits.show()
func _on_QuitButton_pressed() -> void: func _on_QuitButton_pressed() -> void:
get_tree().notification(NOTIFICATION_WM_QUIT_REQUEST) get_tree().notification(NOTIFICATION_WM_QUIT_REQUEST)
func _on_CreditsBackButton_pressed() -> void:
$Credits.hide()

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=5 format=2] [gd_scene load_steps=6 format=2]
[ext_resource path="res://fonts/Louis George Cafe Bold.ttf" type="DynamicFontData" id=1] [ext_resource path="res://fonts/Louis George Cafe Bold.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://src/Menu.gd" type="Script" id=2] [ext_resource path="res://src/Menu.gd" type="Script" id=2]
@ -11,7 +11,10 @@ font_data = ExtResource( 1 )
size = 24 size = 24
font_data = ExtResource( 1 ) font_data = ExtResource( 1 )
[node name="Menu" type="CenterContainer"] [sub_resource type="DynamicFont" id=3]
font_data = ExtResource( 1 )
[node name="Menu" type="Control"]
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
script = ExtResource( 2 ) script = ExtResource( 2 )
@ -19,25 +22,29 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="V" type="VBoxContainer" parent="."] [node name="C" type="CenterContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
[node name="V" type="VBoxContainer" parent="C"]
margin_left = 165.0 margin_left = 165.0
margin_top = 183.0 margin_top = 183.0
margin_right = 475.0 margin_right = 475.0
margin_bottom = 776.0 margin_bottom = 776.0
custom_constants/separation = 80 custom_constants/separation = 80
[node name="V" type="VBoxContainer" parent="V"] [node name="V" type="VBoxContainer" parent="C/V"]
margin_right = 310.0 margin_right = 310.0
margin_bottom = 140.0 margin_bottom = 140.0
[node name="Title" type="Label" parent="V/V"] [node name="Title" type="Label" parent="C/V/V"]
margin_right = 310.0 margin_right = 310.0
margin_bottom = 108.0 margin_bottom = 108.0
custom_fonts/font = SubResource( 1 ) custom_fonts/font = SubResource( 1 )
text = "Gordle" text = "Gordle"
align = 1 align = 1
[node name="Subtitle" type="Label" parent="V/V"] [node name="Subtitle" type="Label" parent="C/V/V"]
margin_top = 112.0 margin_top = 112.0
margin_right = 310.0 margin_right = 310.0
margin_bottom = 140.0 margin_bottom = 140.0
@ -45,7 +52,7 @@ custom_fonts/font = SubResource( 2 )
text = "Wordle in Godot" text = "Wordle in Godot"
align = 1 align = 1
[node name="V2" type="VBoxContainer" parent="V"] [node name="V2" type="VBoxContainer" parent="C/V"]
margin_top = 220.0 margin_top = 220.0
margin_right = 310.0 margin_right = 310.0
margin_bottom = 593.0 margin_bottom = 593.0
@ -54,19 +61,19 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="V" type="VBoxContainer" parent="V/V2"] [node name="V" type="VBoxContainer" parent="C/V/V2"]
margin_right = 310.0 margin_right = 310.0
margin_bottom = 110.0 margin_bottom = 110.0
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="DailyButton" type="Button" parent="V/V2/V"] [node name="DailyButton" type="Button" parent="C/V/V2/V"]
margin_right = 310.0 margin_right = 310.0
margin_bottom = 47.0 margin_bottom = 47.0
text = "Daily Gordle" text = "Daily Gordle"
[node name="Label" type="Label" parent="V/V2/V"] [node name="Label" type="Label" parent="C/V/V2/V"]
margin_top = 51.0 margin_top = 51.0
margin_right = 310.0 margin_right = 310.0
margin_bottom = 110.0 margin_bottom = 110.0
@ -75,7 +82,7 @@ text = "Changes every day
at midnight GMT" at midnight GMT"
align = 1 align = 1
[node name="V2" type="VBoxContainer" parent="V/V2"] [node name="V2" type="VBoxContainer" parent="C/V/V2"]
margin_top = 140.0 margin_top = 140.0
margin_right = 310.0 margin_right = 310.0
margin_bottom = 219.0 margin_bottom = 219.0
@ -84,12 +91,12 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="RandomButton" type="Button" parent="V/V2/V2"] [node name="RandomButton" type="Button" parent="C/V/V2/V2"]
margin_right = 310.0 margin_right = 310.0
margin_bottom = 47.0 margin_bottom = 47.0
text = "Random Gordle" text = "Random Gordle"
[node name="Label" type="Label" parent="V/V2/V2"] [node name="Label" type="Label" parent="C/V/V2/V2"]
margin_top = 51.0 margin_top = 51.0
margin_right = 310.0 margin_right = 310.0
margin_bottom = 79.0 margin_bottom = 79.0
@ -100,19 +107,175 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="CreditsButton" type="Button" parent="V/V2"] [node name="CreditsButton" type="Button" parent="C/V/V2"]
margin_top = 249.0 margin_top = 249.0
margin_right = 310.0 margin_right = 310.0
margin_bottom = 296.0 margin_bottom = 296.0
text = "Credits" text = "Licenses"
[node name="QuitButton" type="Button" parent="V/V2"] [node name="QuitButton" type="Button" parent="C/V/V2"]
margin_top = 326.0 margin_top = 326.0
margin_right = 310.0 margin_right = 310.0
margin_bottom = 373.0 margin_bottom = 373.0
text = "Quit" text = "Quit"
[connection signal="pressed" from="V/V2/V/DailyButton" to="." method="_on_DailyButton_pressed"] [node name="Credits" type="ColorRect" parent="."]
[connection signal="pressed" from="V/V2/V2/RandomButton" to="." method="_on_RandomButton_pressed"] visible = false
[connection signal="pressed" from="V/V2/CreditsButton" to="." method="_on_CreditsButton_pressed"] anchor_right = 1.0
[connection signal="pressed" from="V/V2/QuitButton" to="." method="_on_QuitButton_pressed"] 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
custom_constants/margin_right = 50
custom_constants/margin_top = 50
custom_constants/margin_left = 50
custom_constants/margin_bottom = 50
__meta__ = {
"_edit_use_anchors_": false
}
[node name="V" type="VBoxContainer" parent="Credits/M"]
margin_left = 50.0
margin_top = 50.0
margin_right = 590.0
margin_bottom = 910.0
[node name="Panel" type="PanelContainer" parent="Credits/M/V"]
margin_right = 540.0
margin_bottom = 809.0
size_flags_vertical = 3
[node name="ScrollContainer" type="ScrollContainer" parent="Credits/M/V/Panel"]
margin_left = 7.0
margin_top = 7.0
margin_right = 533.0
margin_bottom = 802.0
[node name="V" type="VBoxContainer" parent="Credits/M/V/Panel/ScrollContainer"]
margin_right = 526.0
margin_bottom = 1652.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/separation = 32
[node name="Godot" type="VBoxContainer" parent="Credits/M/V/Panel/ScrollContainer/V"]
margin_right = 514.0
margin_bottom = 598.0
custom_constants/separation = 10
alignment = 1
[node name="Title" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/Godot"]
margin_right = 514.0
margin_bottom = 41.0
text = "Godot Engine"
align = 1
[node name="License" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/Godot"]
margin_top = 51.0
margin_right = 514.0
margin_bottom = 598.0
custom_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"]
margin_top = 630.0
margin_right = 514.0
margin_bottom = 722.0
custom_constants/separation = 10
alignment = 1
[node name="Title" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/FreeType"]
margin_right = 514.0
margin_bottom = 41.0
text = "FreeType"
align = 1
[node name="License" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/FreeType"]
margin_top = 51.0
margin_right = 514.0
margin_bottom = 92.0
custom_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"]
margin_top = 754.0
margin_right = 514.0
margin_bottom = 1286.0
custom_constants/separation = 10
alignment = 1
[node name="Title" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/ENet"]
margin_right = 514.0
margin_bottom = 41.0
text = "ENet"
align = 1
[node name="License" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/ENet"]
margin_top = 51.0
margin_right = 514.0
margin_bottom = 532.0
custom_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"]
margin_top = 1318.0
margin_right = 514.0
margin_bottom = 1652.0
custom_constants/separation = 10
alignment = 1
[node name="Title" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/MBedTLS"]
margin_right = 514.0
margin_bottom = 41.0
text = "MBedTLS"
align = 1
[node name="License" type="Label" parent="Credits/M/V/Panel/ScrollContainer/V/MBedTLS"]
margin_top = 51.0
margin_right = 514.0
margin_bottom = 334.0
custom_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"]
margin_left = 446.0
margin_top = 813.0
margin_right = 540.0
margin_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"]