diff --git a/assets/fonts/kirsty/kirsty.tres b/assets/fonts/kirsty/kirsty.tres index 7ae9793..6e83b52 100644 --- a/assets/fonts/kirsty/kirsty.tres +++ b/assets/fonts/kirsty/kirsty.tres @@ -3,4 +3,8 @@ [ext_resource path="res://assets/fonts/kirsty/kirsty rg.otf" type="DynamicFontData" id=1] [resource] +size = 38 +outline_color = Color( 0.894118, 0.788235, 0.0901961, 1 ) +use_mipmaps = true +use_filter = true font_data = ExtResource( 1 ) diff --git a/assets/ui/UI_summary.tscn b/assets/ui/UI_summary.tscn index 9e7ddfe..fc09a66 100644 --- a/assets/ui/UI_summary.tscn +++ b/assets/ui/UI_summary.tscn @@ -1,9 +1,11 @@ -[gd_scene load_steps=22 format=2] +[gd_scene load_steps=24 format=2] -[ext_resource path="res://assets/ui/summary/UI_header_summary.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/ui/summary/UI_footer_summary.tscn" type="PackedScene" id=2] -[ext_resource path="res://assets/ui/themes/bck-vert-grd.png" type="Texture" id=3] +[ext_resource path="res://assets/ui/themes/button-summary.jpg" type="Texture" id=1] +[ext_resource path="res://assets/ui/themes/bck-vert-grd.png" type="Texture" id=2] +[ext_resource path="res://assets/ui/icones/treasure.png" type="Texture" id=3] [ext_resource path="res://assets/ui/themes/wood-tile.jpg" type="Texture" id=4] +[ext_resource path="res://assets/ui/themes/button-summary-hover.jpg" type="Texture" id=5] +[ext_resource path="res://assets/fonts/kirsty/kirsty.tres" type="DynamicFont" id=7] [sub_resource type="VisualShaderNodeVectorOp" id=12] operator = 3 @@ -181,61 +183,131 @@ size_flags_vertical = 3 [node name="VBoxContainer" type="VBoxContainer" parent="PanelWood"] anchor_right = 1.0 anchor_bottom = 1.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -custom_constants/separation = 0 +rect_clip_content = true +size_flags_horizontal = 8 +size_flags_vertical = 11 +custom_constants/separation = 30 __meta__ = { "_edit_use_anchors_": false } -[node name="MarginTop" type="MarginContainer" parent="PanelWood/VBoxContainer"] +[node name="CenterContainer" type="CenterContainer" parent="PanelWood/VBoxContainer"] margin_right = 350.0 -margin_bottom = 60.0 -size_flags_horizontal = 3 -custom_constants/margin_top = 60 - -[node name="SummaryHeader" parent="PanelWood/VBoxContainer" instance=ExtResource( 1 )] -anchor_right = 0.0 -margin_top = 60.0 -margin_right = 350.0 -margin_bottom = 248.0 - -[node name="CenterContainer" parent="PanelWood/VBoxContainer/SummaryHeader" index="0"] -margin_right = 350.0 - -[node name="TextureRect" parent="PanelWood/VBoxContainer/SummaryHeader/CenterContainer" index="0"] -margin_left = 111.0 -margin_right = 239.0 - -[node name="ButtonPuzzle" parent="PanelWood/VBoxContainer/SummaryHeader" index="1"] -margin_right = 350.0 - -[node name="ButtonSetting" parent="PanelWood/VBoxContainer/SummaryHeader" index="2"] -margin_right = 350.0 - -[node name="MarginContainer" type="MarginContainer" parent="PanelWood/VBoxContainer"] -margin_top = 248.0 -margin_right = 350.0 -margin_bottom = 802.0 +margin_bottom = 237.0 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="SummaryFooter" parent="PanelWood/VBoxContainer" instance=ExtResource( 2 )] -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 802.0 -margin_right = 350.0 -margin_bottom = 840.0 -size_flags_horizontal = 3 -size_flags_vertical = 9 -alignment = 2 +[node name="TextureRect" type="TextureRect" parent="PanelWood/VBoxContainer/CenterContainer"] +margin_left = 111.0 +margin_top = 54.0 +margin_right = 239.0 +margin_bottom = 182.0 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource( 3 ) +stretch_mode = 3 +flip_h = true -[node name="MarginFooter" type="MarginContainer" parent="PanelWood/VBoxContainer"] -margin_top = 840.0 +[node name="ButtonPuzzle" type="TextureButton" parent="PanelWood/VBoxContainer"] +margin_top = 267.0 +margin_right = 350.0 +margin_bottom = 344.0 +size_flags_horizontal = 0 +size_flags_vertical = 0 +texture_normal = ExtResource( 1 ) +texture_hover = ExtResource( 5 ) +__meta__ = { +"_editor_description_": "" +} + +[node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonPuzzle"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 7 +size_flags_vertical = 3 +custom_fonts/font = ExtResource( 7 ) +custom_colors/font_color = Color( 0, 0, 0, 1 ) +text = "Puzzles" +align = 1 +valign = 1 +__meta__ = { +"_edit_use_anchors_": false, +"_editor_description_": "" +} + +[node name="ButtonSetting" type="TextureButton" parent="PanelWood/VBoxContainer"] +margin_top = 374.0 +margin_right = 350.0 +margin_bottom = 451.0 +size_flags_horizontal = 0 +size_flags_vertical = 0 +texture_normal = ExtResource( 1 ) +texture_hover = ExtResource( 5 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonSetting"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 7 +size_flags_vertical = 3 +custom_fonts/font = ExtResource( 7 ) +custom_colors/font_color = Color( 0, 0, 0, 1 ) +text = "Paramétres" +align = 1 +valign = 1 +__meta__ = { +"_edit_use_anchors_": false, +"_editor_description_": "" +} + +[node name="MarginContainer" type="MarginContainer" parent="PanelWood/VBoxContainer"] +margin_top = 481.0 +margin_right = 350.0 +margin_bottom = 719.0 +size_flags_vertical = 3 + +[node name="ButtonQuit" type="TextureButton" parent="PanelWood/VBoxContainer"] +margin_top = 749.0 +margin_right = 350.0 +margin_bottom = 826.0 +size_flags_horizontal = 0 +size_flags_vertical = 0 +texture_normal = ExtResource( 1 ) +texture_hover = ExtResource( 5 ) +__meta__ = { +"_editor_description_": "" +} + +[node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonQuit"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 7 +size_flags_vertical = 3 +custom_fonts/font = ExtResource( 7 ) +custom_colors/font_color = Color( 0, 0, 0, 1 ) +text = "Quitter" +align = 1 +valign = 1 +__meta__ = { +"_edit_use_anchors_": false, +"_editor_description_": "" +} + +[node name="LabelVersion" type="Label" parent="PanelWood/VBoxContainer"] +margin_top = 856.0 +margin_right = 350.0 +margin_bottom = 870.0 +size_flags_vertical = 0 +text = "v XX.XX" +align = 2 + +[node name="MarginContainerBottom" type="MarginContainer" parent="PanelWood/VBoxContainer"] +margin_top = 900.0 margin_right = 350.0 margin_bottom = 900.0 -custom_constants/margin_top = 60 +size_flags_stretch_ratio = 0.2 [node name="TextureRect" type="TextureRect" parent="."] margin_left = 350.0 @@ -244,10 +316,8 @@ margin_bottom = 900.0 rect_clip_content = true size_flags_horizontal = 11 size_flags_vertical = 3 -texture = ExtResource( 3 ) +texture = ExtResource( 2 ) stretch_mode = 2 __meta__ = { "_edit_use_anchors_": false } - -[editable path="PanelWood/VBoxContainer/SummaryHeader"] diff --git a/assets/ui/summary/UI_footer_summary.tscn b/assets/ui/summary/UI_footer_summary.tscn index aee6682..1ccc1b9 100644 --- a/assets/ui/summary/UI_footer_summary.tscn +++ b/assets/ui/summary/UI_footer_summary.tscn @@ -1,22 +1,54 @@ -[gd_scene format=2] +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://assets/ui/themes/button-summary.jpg" type="Texture" id=1] +[ext_resource path="res://assets/ui/themes/button-summary-hover.jpg" type="Texture" id=2] [node name="VBoxContainer" type="VBoxContainer"] anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -margin_top = -38.0 +margin_top = -188.0 +size_flags_horizontal = 11 +size_flags_vertical = 11 +custom_constants/separation = 20 +alignment = 2 __meta__ = { "_edit_use_anchors_": false } -[node name="ButtonQuit" type="Button" parent="."] +[node name="ButtonQuit" type="TextureButton" parent="."] +margin_top = 154.0 margin_right = 1440.0 -margin_bottom = 20.0 -text = "Quitter" +margin_bottom = 154.0 +size_flags_vertical = 10 +texture_normal = ExtResource( 1 ) +texture_hover = ExtResource( 2 ) +expand = true +__meta__ = { +"_editor_description_": "" +} -[node name="Label" type="Label" parent="."] -margin_top = 24.0 +[node name="Label" type="Label" parent="ButtonQuit"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -23.0 +margin_top = -7.0 +margin_right = 23.0 +margin_bottom = 7.0 +size_flags_horizontal = 7 +size_flags_vertical = 3 +text = "Quitter" +align = 1 +valign = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="LabelVersion" type="Label" parent="."] +margin_top = 174.0 margin_right = 1440.0 -margin_bottom = 38.0 +margin_bottom = 188.0 text = "v XX.XX" align = 2 diff --git a/assets/ui/summary/UI_header_summary.tscn b/assets/ui/summary/UI_header_summary.tscn index 262c095..3292b2f 100644 --- a/assets/ui/summary/UI_header_summary.tscn +++ b/assets/ui/summary/UI_header_summary.tscn @@ -1,39 +1,97 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://assets/ui/icones/treasure.png" type="Texture" id=1] +[ext_resource path="res://assets/ui/themes/button-summary.jpg" type="Texture" id=2] +[ext_resource path="res://assets/ui/themes/button-summary-hover.jpg" type="Texture" id=3] [node name="VBoxContainer" type="VBoxContainer"] anchor_right = 1.0 -margin_bottom = 176.0 -custom_constants/separation = 10 +margin_bottom = 565.0 +rect_clip_content = true +size_flags_horizontal = 11 +size_flags_vertical = 11 +custom_constants/separation = 0 __meta__ = { "_edit_use_anchors_": false } [node name="CenterContainer" type="CenterContainer" parent="."] margin_right = 1440.0 -margin_bottom = 128.0 +margin_bottom = 168.0 size_flags_horizontal = 3 size_flags_vertical = 3 [node name="TextureRect" type="TextureRect" parent="CenterContainer"] margin_left = 656.0 +margin_top = 20.0 margin_right = 784.0 -margin_bottom = 128.0 +margin_bottom = 148.0 size_flags_horizontal = 4 size_flags_vertical = 4 texture = ExtResource( 1 ) stretch_mode = 1 flip_h = true -[node name="ButtonPuzzle" type="Button" parent="."] -margin_top = 138.0 -margin_right = 1440.0 -margin_bottom = 158.0 -text = "Puzzles" - -[node name="ButtonSetting" type="Button" parent="."] +[node name="ButtonPuzzle" type="TextureButton" parent="."] margin_top = 168.0 margin_right = 1440.0 -margin_bottom = 188.0 +margin_bottom = 336.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +texture_normal = ExtResource( 2 ) +texture_hover = ExtResource( 3 ) +expand = true +__meta__ = { +"_editor_description_": "" +} + +[node name="Label" type="Label" parent="ButtonPuzzle"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 7 +size_flags_vertical = 3 +text = "Puzzle" +align = 1 +valign = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="MarginContainer" type="MarginContainer" parent="."] +margin_top = 336.0 +margin_right = 1440.0 +margin_bottom = 366.0 +custom_constants/margin_top = 30 + +[node name="ButtonSetting" type="TextureButton" parent="."] +margin_top = 366.0 +margin_right = 1440.0 +margin_bottom = 534.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +texture_normal = ExtResource( 2 ) +texture_hover = ExtResource( 3 ) +expand = true +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="ButtonSetting"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = -0.840881 +margin_bottom = -0.840881 +size_flags_horizontal = 7 +size_flags_vertical = 3 text = "Parametres" +align = 1 +valign = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="MarginContainer2" type="MarginContainer" parent="."] +margin_top = 534.0 +margin_right = 1440.0 +margin_bottom = 564.0 +custom_constants/margin_top = 30 diff --git a/assets/ui/themes/button-summary-hover.jpg b/assets/ui/themes/button-summary-hover.jpg new file mode 100644 index 0000000..74a2ac2 Binary files /dev/null and b/assets/ui/themes/button-summary-hover.jpg differ diff --git a/assets/ui/themes/button-summary-hover.jpg.import b/assets/ui/themes/button-summary-hover.jpg.import new file mode 100644 index 0000000..222c32e --- /dev/null +++ b/assets/ui/themes/button-summary-hover.jpg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/button-summary-hover.jpg-51e102eaa664807a736aa4aff2762f3e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/themes/button-summary-hover.jpg" +dest_files=[ "res://.import/button-summary-hover.jpg-51e102eaa664807a736aa4aff2762f3e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/ui/themes/button-summary.jpg b/assets/ui/themes/button-summary.jpg index 4ca31cc..9bd00b4 100644 Binary files a/assets/ui/themes/button-summary.jpg and b/assets/ui/themes/button-summary.jpg differ diff --git a/assets/ui/themes/button-summary.jpg.import b/assets/ui/themes/button-summary.jpg.import index 154612f..57673d0 100644 --- a/assets/ui/themes/button-summary.jpg.import +++ b/assets/ui/themes/button-summary.jpg.import @@ -19,7 +19,7 @@ compress/lossy_quality=0.7 compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 +flags/repeat=1 flags/filter=true flags/mipmaps=false flags/anisotropic=false diff --git a/locales/fr.po b/locales/fr.po index d3b0752..87544bb 100644 --- a/locales/fr.po +++ b/locales/fr.po @@ -15,16 +15,16 @@ msgid "MAIN_BUTTON_PUZZLES" msgstr "Puzzles" msgid "MAIN_BUTTON_SETTINGS" -msgstr "Parametres" +msgstr "Paramètres" msgid "MAIN_BUTTON_QUIT" -msgstr "Quit" +msgstr "Quitter" msgid "SETTINGS_LABEL_LANGUE" msgstr "Choisir sa language :" msgid "SETTINGS_LABEL_GYROSCOPE" -msgstr "Utiliser le gyroscope :" +msgstr "Activer le gyroscope :" msgid "LOADING" msgstr "Chargement" diff --git a/scenes/main.gd b/scenes/main.gd index 25d79d9..c4dd884 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -13,9 +13,9 @@ func _ready(): ## PRIVATE func _translation(): - $MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryHeader/ButtonPuzzle.text = tr("MAIN_BUTTON_PUZZLES") - $MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryHeader/ButtonSetting.text = tr("MAIN_BUTTON_SETTINGS") - $MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryFooter/ButtonQuit.text = tr("MAIN_BUTTON_QUIT") + $MarginContainer/UI_summary/PanelWood/VBoxContainer/ButtonPuzzle/Label.text = tr("MAIN_BUTTON_PUZZLES") + $MarginContainer/UI_summary/PanelWood/VBoxContainer/ButtonSetting/Label.text = tr("MAIN_BUTTON_SETTINGS") + $MarginContainer/UI_summary/PanelWood/VBoxContainer/ButtonQuit/Label.text = tr("MAIN_BUTTON_QUIT") func _prepare_change_scene(): if (current_scene != null): diff --git a/scenes/main.tscn b/scenes/main.tscn index e0a9005..9435388 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -1,9 +1,7 @@ -[gd_scene load_steps=13 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://scenes/main.gd" type="Script" id=1] [ext_resource path="res://assets/ui/themes/game-title.png" type="Texture" id=2] -[ext_resource path="res://assets/fonts/MKXTitle.tres" type="DynamicFont" id=3] -[ext_resource path="res://assets/ui/themes/leather.theme" type="Theme" id=4] [ext_resource path="res://assets/ui/themes/bck.jpg" type="Texture" id=6] [ext_resource path="res://assets/ui/UI_summary.tscn" type="PackedScene" id=8] @@ -58,12 +56,6 @@ nodes/fragment/connections = PoolIntArray( 4, 0, 0, 0 ) [sub_resource type="ShaderMaterial" id=6] shader = SubResource( 5 ) -[sub_resource type="GDScript" id=1] -script/source = "extends LinkButton - -# Quit the game with properly exit code -" - [node name="Main" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 @@ -77,37 +69,6 @@ material = SubResource( 6 ) anchor_right = 1.0 anchor_bottom = 1.0 -[node name="Action" type="Panel" parent="."] -visible = false -margin_left = -1.33484 -margin_top = 150.0 -margin_right = 148.665 -margin_bottom = 600.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Quit" type="LinkButton" parent="Action"] -margin_left = 10.0 -margin_top = 401.059 -margin_right = 161.0 -margin_bottom = 435.059 -custom_fonts/font = ExtResource( 3 ) -text = "Quitter" -script = SubResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Button" type="Button" parent="Action"] -margin_right = 130.0 -margin_bottom = 66.0 -theme = ExtResource( 4 ) -text = "thfh" -__meta__ = { -"_edit_use_anchors_": false -} - [node name="MarginContainer" type="MarginContainer" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 @@ -122,12 +83,6 @@ margin_bottom = 900.0 size_flags_horizontal = 0 size_flags_vertical = 3 -[node name="ButtonQuit" parent="MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryFooter" index="0"] -margin_right = 350.0 - -[node name="Label" parent="MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryFooter" index="1"] -margin_right = 350.0 - [node name="CenterContainer" type="MarginContainer" parent="MarginContainer"] margin_left = 385.0 margin_right = 1054.0 @@ -140,10 +95,4 @@ margin_right = 669.0 margin_bottom = 900.0 texture = ExtResource( 2 ) -[connection signal="pressed" from="MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryHeader/ButtonPuzzle" to="." method="_on_ButtonPuzzle_pressed"] -[connection signal="pressed" from="MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryHeader/ButtonSetting" to="." method="_on_ButtonSetting_pressed"] -[connection signal="pressed" from="MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryFooter/ButtonQuit" to="." method="_on_ButtonQuit_pressed"] - [editable path="MarginContainer/UI_summary"] -[editable path="MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryHeader"] -[editable path="MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryFooter"]