From 6260e10709b25d390f60d04332502a657a95442b Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 18 Mar 2026 20:14:06 +0100 Subject: [PATCH 1/2] feat: add credit screen animation The buttons on the credit screen to go to asset creators are now hidden inside of a hidden banner. This can be shown by hovering over the new arrow on that page. The same goes for the main menu, all game links are now hidden behind that arrow. --- .../scenes/AnimationArrowUp.tscn | 8 ++ entities/ui/credits/scenes/Credits.tscn | 113 +++++++++++++----- entities/ui/links/scenes/links.tscn | 42 +------ entities/ui/main_menu/scenes/MainMenu.tscn | 73 +++++++---- .../scripts/ControlAnimationComponent.gd | 21 +++- .../control_animation/ControlAnimation.gd | 2 +- .../resources/FadeInAnimation.tres | 8 ++ .../resources/FadeInAnimationDelayed.tres | 9 ++ 8 files changed, 184 insertions(+), 92 deletions(-) create mode 100644 entities/ui/animation_arrow_up/scenes/AnimationArrowUp.tscn create mode 100644 shared/resources/control_animation/resources/FadeInAnimation.tres create mode 100644 shared/resources/control_animation/resources/FadeInAnimationDelayed.tres diff --git a/entities/ui/animation_arrow_up/scenes/AnimationArrowUp.tscn b/entities/ui/animation_arrow_up/scenes/AnimationArrowUp.tscn new file mode 100644 index 0000000..b667eef --- /dev/null +++ b/entities/ui/animation_arrow_up/scenes/AnimationArrowUp.tscn @@ -0,0 +1,8 @@ +[gd_scene format=3 uid="uid://c6411vrwwcrjs"] + +[ext_resource type="Texture2D" uid="uid://dnv727mf8n6m0" path="res://assets/icons/RetractIcon.tres" id="1_km7ps"] + +[node name="TextureRect" type="TextureRect" unique_id=1988116494] +custom_minimum_size = Vector2(80, 80) +size_flags_horizontal = 8 +texture = ExtResource("1_km7ps") diff --git a/entities/ui/credits/scenes/Credits.tscn b/entities/ui/credits/scenes/Credits.tscn index 11e6629..349229d 100644 --- a/entities/ui/credits/scenes/Credits.tscn +++ b/entities/ui/credits/scenes/Credits.tscn @@ -9,6 +9,24 @@ [ext_resource type="Script" uid="uid://dvrn3p7xl4tpl" path="res://shared/entities/clickable_button/resources/actions/OpenLinkAction.gd" id="5_gggmv"] [ext_resource type="Texture2D" uid="uid://doybax1rt0tgn" path="res://assets/icons/QuitIcon.tres" id="7_liw4c"] [ext_resource type="Script" uid="uid://b03sehux5xslr" path="res://shared/entities/clickable_button/resources/actions/OpenMainMenu.gd" id="7_xxa1d"] +[ext_resource type="Script" uid="uid://rxshx7ma8nn3" path="res://shared/global_entities/control_animation_component/scripts/ControlAnimationComponent.gd" id="8_xrko3"] +[ext_resource type="Script" uid="uid://bcxjaw3jedjv5" path="res://shared/resources/control_animation/ControlAnimation.gd" id="9_5taea"] +[ext_resource type="Resource" uid="uid://dvtxx5rwv0aoo" path="res://shared/resources/control_animation/resources/FadeInAnimationDelayed.tres" id="9_chbw5"] +[ext_resource type="PackedScene" uid="uid://c6411vrwwcrjs" path="res://entities/ui/animation_arrow_up/scenes/AnimationArrowUp.tscn" id="10_5taea"] +[ext_resource type="Texture2D" uid="uid://cg0l7tvqmtghr" path="res://assets/sprites/sheet_white1x.png" id="11_5taea"] + +[sub_resource type="Resource" id="Resource_4lqqu"] +script = ExtResource("7_xxa1d") +metadata/_custom_type_script = "uid://b03sehux5xslr" + +[sub_resource type="Resource" id="Resource_72uk5"] +script = ExtResource("9_5taea") +position = Vector2(0, -95) +metadata/_custom_type_script = "uid://bcxjaw3jedjv5" + +[sub_resource type="AtlasTexture" id="AtlasTexture_chbw5"] +atlas = ExtResource("11_5taea") +region = Rect2(150, 250, 50, 50) [sub_resource type="Resource" id="Resource_gul80"] script = ExtResource("5_gggmv") @@ -30,10 +48,6 @@ script = ExtResource("5_gggmv") link = "https://www.materialmaker.org/" metadata/_custom_type_script = "uid://dvrn3p7xl4tpl" -[sub_resource type="Resource" id="Resource_4lqqu"] -script = ExtResource("7_xxa1d") -metadata/_custom_type_script = "uid://b03sehux5xslr" - [node name="Credits" type="CanvasLayer" unique_id=1647596529] [node name="MenuBackground" parent="." unique_id=1813391932 instance=ExtResource("1_n8sdb")] @@ -59,73 +73,112 @@ script = ExtResource("1_xb4j0") timer_tick = 30.0 scroll_speed = 2 -[node name="ButtonArea" type="MarginContainer" parent="." unique_id=2132915574] -anchors_preset = 12 +[node name="ClostButtonMargin" type="MarginContainer" parent="." unique_id=771782369] +anchors_preset = 3 +anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -offset_top = -15.0 -grow_horizontal = 2 +offset_left = -169.0 +offset_top = -91.0 +grow_horizontal = 0 grow_vertical = 0 -size_flags_horizontal = 3 +theme_override_constants/margin_right = 15 +theme_override_constants/margin_bottom = 15 + +[node name="CloseButton" type="Button" parent="ClostButtonMargin" unique_id=584494095] +layout_mode = 2 +size_flags_horizontal = 10 +size_flags_vertical = 8 +focus_neighbor_left = NodePath("../../ButtonArea/VBoxContainer/LinkList/MaterialMaker") +focus_neighbor_right = NodePath("../../ButtonArea/VBoxContainer/LinkList/Kenney_nl") +shortcut = ExtResource("3_i56v7") +shortcut_in_tooltip = false +text = "CLOSE" +icon = ExtResource("7_liw4c") +script = ExtResource("3_ntyq1") +is_focused = true +animation_resource = ExtResource("4_5w3yf") +pressed_action = SubResource("Resource_4lqqu") + +[node name="ButtonArea" type="MarginContainer" parent="." unique_id=2132915574] +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_top = -50.0 +offset_right = 870.0 +offset_bottom = 95.0 +grow_vertical = 0 +size_flags_horizontal = 0 size_flags_vertical = 8 theme_override_constants/margin_left = 15 theme_override_constants/margin_right = 15 theme_override_constants/margin_bottom = 15 -[node name="LinkList" type="HBoxContainer" parent="ButtonArea" unique_id=75402586] +[node name="ControlAnimationComponent" type="Node" parent="ButtonArea" unique_id=600937403] +script = ExtResource("8_xrko3") +enter_values = ExtResource("9_chbw5") +hover_values = SubResource("Resource_72uk5") +metadata/_custom_type_script = "uid://rxshx7ma8nn3" + +[node name="VBoxContainer" type="VBoxContainer" parent="ButtonArea" unique_id=279835640] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 8 + +[node name="TextureRect" parent="ButtonArea/VBoxContainer" unique_id=1988116494 instance=ExtResource("10_5taea")] +layout_mode = 2 + +[node name="LinkList" type="HBoxContainer" parent="ButtonArea/VBoxContainer" unique_id=75402586] layout_mode = 2 -[node name="Kenney_nl" type="Button" parent="ButtonArea/LinkList" unique_id=1793741721] +[node name="Kenney_nl" type="Button" parent="ButtonArea/VBoxContainer/LinkList" unique_id=1793741721] layout_mode = 2 -focus_neighbor_left = NodePath("../CloseButton") +focus_neighbor_left = NodePath("../../../../ClostButtonMargin/CloseButton") focus_neighbor_right = NodePath("../Auxree") +mouse_filter = 1 text = "Kenney.nl" -icon = ExtResource("3_vnxeo") +icon = SubResource("AtlasTexture_chbw5") script = ExtResource("3_ntyq1") animation_resource = ExtResource("4_5w3yf") pressed_action = SubResource("Resource_gul80") -[node name="Auxree" type="Button" parent="ButtonArea/LinkList" unique_id=1342980662] +[node name="Auxree" type="Button" parent="ButtonArea/VBoxContainer/LinkList" unique_id=1342980662] layout_mode = 2 focus_neighbor_left = NodePath("../Kenney_nl") focus_neighbor_right = NodePath("../Abstraction") +mouse_filter = 1 text = "Axuree" icon = ExtResource("3_vnxeo") script = ExtResource("3_ntyq1") animation_resource = ExtResource("4_5w3yf") pressed_action = SubResource("Resource_ntyq1") -[node name="Abstraction" type="Button" parent="ButtonArea/LinkList" unique_id=265739547] +[node name="Abstraction" type="Button" parent="ButtonArea/VBoxContainer/LinkList" unique_id=265739547] layout_mode = 2 focus_neighbor_left = NodePath("../Auxree") focus_neighbor_right = NodePath("../MaterialMaker") +mouse_filter = 1 text = "Abstraction" icon = ExtResource("3_vnxeo") script = ExtResource("3_ntyq1") animation_resource = ExtResource("4_5w3yf") pressed_action = SubResource("Resource_gggmv") -[node name="MaterialMaker" type="Button" parent="ButtonArea/LinkList" unique_id=207632722] +[node name="MaterialMaker" type="Button" parent="ButtonArea/VBoxContainer/LinkList" unique_id=207632722] layout_mode = 2 focus_neighbor_left = NodePath("../Abstraction") -focus_neighbor_right = NodePath("../CloseButton") +focus_neighbor_right = NodePath("../../../../ClostButtonMargin/CloseButton") +mouse_filter = 1 text = "Material Maker" icon = ExtResource("3_vnxeo") script = ExtResource("3_ntyq1") animation_resource = ExtResource("4_5w3yf") pressed_action = SubResource("Resource_xxa1d") -[node name="CloseButton" type="Button" parent="ButtonArea/LinkList" unique_id=584494095] -layout_mode = 2 -size_flags_horizontal = 10 -focus_neighbor_left = NodePath("../MaterialMaker") -focus_neighbor_right = NodePath("../Kenney_nl") -shortcut = ExtResource("3_i56v7") -shortcut_in_tooltip = false -text = "CLOSE" -icon = ExtResource("7_liw4c") -script = ExtResource("3_ntyq1") -is_focused = true -animation_resource = ExtResource("4_5w3yf") -pressed_action = SubResource("Resource_4lqqu") +[connection signal="focus_entered" from="ButtonArea/VBoxContainer/LinkList/Kenney_nl" to="ButtonArea/ControlAnimationComponent" method="trigger_hover"] +[connection signal="focus_exited" from="ButtonArea/VBoxContainer/LinkList/Kenney_nl" to="ButtonArea/ControlAnimationComponent" method="trigger_hover_lost"] +[connection signal="focus_entered" from="ButtonArea/VBoxContainer/LinkList/Auxree" to="ButtonArea/ControlAnimationComponent" method="trigger_hover"] +[connection signal="focus_entered" from="ButtonArea/VBoxContainer/LinkList/Abstraction" to="ButtonArea/ControlAnimationComponent" method="trigger_hover"] +[connection signal="focus_entered" from="ButtonArea/VBoxContainer/LinkList/MaterialMaker" to="ButtonArea/ControlAnimationComponent" method="trigger_hover"] +[connection signal="focus_exited" from="ButtonArea/VBoxContainer/LinkList/MaterialMaker" to="ButtonArea/ControlAnimationComponent" method="trigger_hover_lost"] diff --git a/entities/ui/links/scenes/links.tscn b/entities/ui/links/scenes/links.tscn index 9778b87..6b86e96 100644 --- a/entities/ui/links/scenes/links.tscn +++ b/entities/ui/links/scenes/links.tscn @@ -5,11 +5,8 @@ [ext_resource type="Texture2D" uid="uid://d1fc7nwftgx4y" path="res://assets/icons/QuestionIcon.tres" id="2_1cih1"] [ext_resource type="Script" uid="uid://qgxq73rkwfr3" path="res://shared/entities/clickable_button/resources/OpenSystemFolder.gd" id="3_f67t6"] [ext_resource type="Script" uid="uid://chfatpxf8ucxr" path="res://shared/entities/clickable_button/ClickableButton.gd" id="3_l56ar"] -[ext_resource type="Script" uid="uid://rxshx7ma8nn3" path="res://shared/global_entities/control_animation_component/scripts/ControlAnimationComponent.gd" id="4_m7voa"] -[ext_resource type="Resource" uid="uid://cakox3m20wk7q" path="res://shared/resources/control_animation/resources/DefaultButtonEnter.tres" id="5_6wbyd"] [ext_resource type="Script" uid="uid://dvrn3p7xl4tpl" path="res://shared/entities/clickable_button/resources/actions/OpenLinkAction.gd" id="5_m7voa"] [ext_resource type="Texture2D" uid="uid://cln3v63hwble8" path="res://assets/icons/HomeIcon.tres" id="6_6wbyd"] -[ext_resource type="Resource" uid="uid://by7h6kfigwa21" path="res://shared/resources/control_animation/resources/DefaultButtonAnimation.tres" id="6_dpv13"] [ext_resource type="Texture2D" uid="uid://cswswoet5pppp" path="res://assets/icons/ShareIcon.tres" id="7_dpv13"] [ext_resource type="Texture2D" uid="uid://cat86qdkpvga8" path="res://assets/icons/WarningIcon.tres" id="8_63oac"] @@ -45,18 +42,13 @@ size_flags_horizontal = 8 [node name="OpenCustomDeckFolder" type="Button" parent="." unique_id=2116555998] layout_mode = 2 tooltip_text = "OPEN_DECK_FOLDER_TOOLTIP" +mouse_filter = 1 icon = ExtResource("1_1cih1") script = ExtResource("3_l56ar") active = 2 only_visible_if_custom_deck_active = true pressed_action = SubResource("Resource_m7voa") -[node name="ControlAnimationComponent" type="Node" parent="OpenCustomDeckFolder" unique_id=977552176] -script = ExtResource("4_m7voa") -enter_values = ExtResource("5_6wbyd") -hover_values = ExtResource("6_dpv13") -metadata/_custom_type_script = "uid://rxshx7ma8nn3" - [node name="HowToPlay" type="Button" parent="." unique_id=1979169242] layout_mode = 2 size_flags_horizontal = 8 @@ -64,63 +56,39 @@ tooltip_text = "HOW_TO_PLAY" focus_neighbor_right = NodePath("../GitHubRepository") focus_next = NodePath("../GitHubRepository") focus_previous = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") +mouse_filter = 1 shortcut = ExtResource("1_2ay2a") icon = ExtResource("2_1cih1") script = ExtResource("3_l56ar") pressed_action = SubResource("Resource_ssyfv") -[node name="ControlAnimationComponent" type="Node" parent="HowToPlay" unique_id=1737761850 node_paths=PackedStringArray("await_component")] -script = ExtResource("4_m7voa") -await_component = NodePath("../../OpenCustomDeckFolder/ControlAnimationComponent") -enter_values = ExtResource("5_6wbyd") -hover_values = ExtResource("6_dpv13") -metadata/_custom_type_script = "uid://rxshx7ma8nn3" - [node name="GitHubRepository" type="Button" parent="." unique_id=511307644] layout_mode = 2 size_flags_horizontal = 8 tooltip_text = "GITHUB_REPOSITORY_BUTTON" focus_neighbor_left = NodePath("../HowToPlay") focus_neighbor_right = NodePath("../OpenGameSite") +mouse_filter = 1 icon = ExtResource("6_6wbyd") script = ExtResource("3_l56ar") pressed_action = SubResource("Resource_bmgck") -[node name="ControlAnimationComponent" type="Node" parent="GitHubRepository" unique_id=1581642327 node_paths=PackedStringArray("await_component")] -script = ExtResource("4_m7voa") -await_component = NodePath("../../HowToPlay/ControlAnimationComponent") -enter_values = ExtResource("5_6wbyd") -hover_values = ExtResource("6_dpv13") -metadata/_custom_type_script = "uid://rxshx7ma8nn3" - [node name="OpenGameSite" type="Button" parent="." unique_id=540372814] layout_mode = 2 tooltip_text = "GAME_PAGE" focus_neighbor_left = NodePath("../GitHubRepository") focus_neighbor_right = NodePath("../ReportBug") +mouse_filter = 1 icon = ExtResource("7_dpv13") script = ExtResource("3_l56ar") pressed_action = SubResource("Resource_7m08p") -[node name="ControlAnimationComponent" type="Node" parent="OpenGameSite" unique_id=1020999169 node_paths=PackedStringArray("await_component")] -script = ExtResource("4_m7voa") -await_component = NodePath("../../GitHubRepository/ControlAnimationComponent") -enter_values = ExtResource("5_6wbyd") -hover_values = ExtResource("6_dpv13") -metadata/_custom_type_script = "uid://rxshx7ma8nn3" - [node name="ReportBug" type="Button" parent="." unique_id=129169406] layout_mode = 2 tooltip_text = "REPORT_BUG" focus_neighbor_left = NodePath("../OpenGameSite") focus_neighbor_right = NodePath("../HowToPlay") +mouse_filter = 1 icon = ExtResource("8_63oac") script = ExtResource("3_l56ar") pressed_action = SubResource("Resource_q0p35") - -[node name="ControlAnimationComponent" type="Node" parent="ReportBug" unique_id=457431092 node_paths=PackedStringArray("await_component")] -script = ExtResource("4_m7voa") -await_component = NodePath("../../OpenGameSite/ControlAnimationComponent") -enter_values = ExtResource("5_6wbyd") -hover_values = ExtResource("6_dpv13") -metadata/_custom_type_script = "uid://rxshx7ma8nn3" diff --git a/entities/ui/main_menu/scenes/MainMenu.tscn b/entities/ui/main_menu/scenes/MainMenu.tscn index 73725a8..1eab9d1 100644 --- a/entities/ui/main_menu/scenes/MainMenu.tscn +++ b/entities/ui/main_menu/scenes/MainMenu.tscn @@ -28,6 +28,8 @@ [ext_resource type="Texture2D" uid="uid://dmmfqt6ictpos" path="res://assets/icons/SettingsIcon.tres" id="20_vm73v"] [ext_resource type="PackedScene" uid="uid://da8m8gpy2rlvo" path="res://entities/ui/links/scenes/links.tscn" id="21_fr5td"] [ext_resource type="PackedScene" uid="uid://ded0xyxbb1om1" path="res://entities/ui/settings_menu/scenes/SettingsMenu.tscn" id="21_plb04"] +[ext_resource type="Resource" uid="uid://c1inbmbft2wj0" path="res://shared/resources/control_animation/resources/FadeInAnimation.tres" id="28_0jj68"] +[ext_resource type="PackedScene" uid="uid://c6411vrwwcrjs" path="res://entities/ui/animation_arrow_up/scenes/AnimationArrowUp.tscn" id="28_exu4r"] [sub_resource type="Resource" id="Resource_exu4r"] script = ExtResource("4_psgpi") @@ -90,6 +92,11 @@ animation_time = 0.3 position = Vector2(0, -200) metadata/_custom_type_script = "uid://bcxjaw3jedjv5" +[sub_resource type="Resource" id="Resource_0jj68"] +script = ExtResource("4_psgpi") +position = Vector2(0, -97) +metadata/_custom_type_script = "uid://bcxjaw3jedjv5" + [node name="MainMenu" type="CanvasLayer" unique_id=674321008 node_paths=PackedStringArray("game_buttons") groups=["active_scene"]] script = ExtResource("1_0c7m2") game_buttons = [NodePath("CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Start Game"), NodePath("CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quick Game AI"), NodePath("CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Deck Viewer")] @@ -230,8 +237,8 @@ metadata/_custom_type_script = "uid://rxshx7ma8nn3" [node name="Quit" type="Button" parent="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer" unique_id=1120827469] layout_mode = 2 tooltip_text = "QUIT_GAME_TOOLTIP" -focus_neighbor_right = NodePath("../../../../../BottomDock/Links/HowToPlay") -focus_neighbor_bottom = NodePath("../../../../../BottomDock/Links/HowToPlay") +focus_neighbor_right = NodePath("../../../../../BottomDock/VBoxContainer/Links/HowToPlay") +focus_neighbor_bottom = NodePath("../../../../../BottomDock/VBoxContainer/Links/HowToPlay") focus_next = NodePath("../Start Game") text = "QUIT_GAME" icon = ExtResource("15_lppid") @@ -285,7 +292,7 @@ size_flags_horizontal = 10 size_flags_vertical = 0 tooltip_text = "GAME_SETTINGS" focus_neighbor_left = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Start Game") -focus_neighbor_bottom = NodePath("../../../BottomDock/Links/HowToPlay") +focus_neighbor_bottom = NodePath("../../../BottomDock/VBoxContainer/Links/HowToPlay") focus_next = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Start Game") focus_previous = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Start Game") icon = ExtResource("20_vm73v") @@ -300,46 +307,70 @@ hover_values = ExtResource("9_exu4r") metadata/_custom_type_script = "uid://rxshx7ma8nn3" [node name="BottomDock" type="MarginContainer" parent="." unique_id=1158314847] -anchors_preset = 12 +anchors_preset = 3 +anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -grow_horizontal = 2 +offset_left = -416.0 +offset_top = -53.0 +offset_bottom = 97.00037 +grow_horizontal = 0 grow_vertical = 0 size_flags_horizontal = 3 size_flags_vertical = 10 -mouse_filter = 2 theme_override_constants/margin_left = 10 theme_override_constants/margin_top = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 -[node name="Links" parent="BottomDock" unique_id=31784573 instance=ExtResource("21_fr5td")] +[node name="ControlAnimationComponent" type="Node" parent="BottomDock" unique_id=392816729 node_paths=PackedStringArray("await_component")] +script = ExtResource("3_aqmwr") +await_component = NodePath("../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit/ControlAnimationComponent") +enter_values = ExtResource("28_0jj68") +hover_values = SubResource("Resource_0jj68") +metadata/_custom_type_script = "uid://rxshx7ma8nn3" + +[node name="VBoxContainer" type="VBoxContainer" parent="BottomDock" unique_id=422140136] layout_mode = 2 -[node name="OpenCustomDeckFolder" parent="BottomDock/Links" index="0" unique_id=2116555998] -focus_neighbor_left = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") -focus_neighbor_top = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") +[node name="TextureRect" parent="BottomDock/VBoxContainer" unique_id=1988116494 instance=ExtResource("28_exu4r")] +layout_mode = 2 + +[node name="Links" parent="BottomDock/VBoxContainer" unique_id=31784573 instance=ExtResource("21_fr5td")] +layout_mode = 2 -[node name="ControlAnimationComponent" parent="BottomDock/Links/OpenCustomDeckFolder" index="0" unique_id=977552176 node_paths=PackedStringArray("await_component")] -await_component = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit/ControlAnimationComponent") +[node name="OpenCustomDeckFolder" parent="BottomDock/VBoxContainer/Links" index="0" unique_id=2116555998] +focus_neighbor_left = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") +focus_neighbor_top = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") -[node name="HowToPlay" parent="BottomDock/Links" index="1" unique_id=1979169242] -focus_neighbor_top = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") +[node name="HowToPlay" parent="BottomDock/VBoxContainer/Links" index="1" unique_id=1979169242] +focus_neighbor_top = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") +focus_previous = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") -[node name="GitHubRepository" parent="BottomDock/Links" index="2" unique_id=511307644] -focus_neighbor_top = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") +[node name="GitHubRepository" parent="BottomDock/VBoxContainer/Links" index="2" unique_id=511307644] +focus_neighbor_top = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") -[node name="OpenGameSite" parent="BottomDock/Links" index="3" unique_id=540372814] -focus_neighbor_top = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") +[node name="OpenGameSite" parent="BottomDock/VBoxContainer/Links" index="3" unique_id=540372814] +focus_neighbor_top = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") -[node name="ReportBug" parent="BottomDock/Links" index="4" unique_id=129169406] -focus_neighbor_top = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") +[node name="ReportBug" parent="BottomDock/VBoxContainer/Links" index="4" unique_id=129169406] +focus_neighbor_top = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit") [connection signal="pressed" from="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quick Game AI" to="AvailableAiModes" method="toggle_menu"] [connection signal="enter_animation_done" from="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit/ControlAnimationComponent" to="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Start Game" method="focused"] [connection signal="hiding_container" from="AvailableAiModes" to="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quick Game AI" method="neighbor_hidden"] [connection signal="showing_container" from="AvailableAiModes" to="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quick Game AI" method="neighbor_shown"] +[connection signal="focus_entered" from="BottomDock/VBoxContainer/Links/OpenCustomDeckFolder" to="BottomDock/ControlAnimationComponent" method="trigger_hover"] +[connection signal="focus_exited" from="BottomDock/VBoxContainer/Links/OpenCustomDeckFolder" to="BottomDock/ControlAnimationComponent" method="trigger_hover_lost"] +[connection signal="focus_entered" from="BottomDock/VBoxContainer/Links/HowToPlay" to="BottomDock/ControlAnimationComponent" method="trigger_hover"] +[connection signal="focus_exited" from="BottomDock/VBoxContainer/Links/HowToPlay" to="BottomDock/ControlAnimationComponent" method="trigger_hover_lost"] +[connection signal="focus_entered" from="BottomDock/VBoxContainer/Links/GitHubRepository" to="BottomDock/ControlAnimationComponent" method="trigger_hover"] +[connection signal="focus_exited" from="BottomDock/VBoxContainer/Links/GitHubRepository" to="BottomDock/ControlAnimationComponent" method="trigger_hover_lost"] +[connection signal="focus_entered" from="BottomDock/VBoxContainer/Links/OpenGameSite" to="BottomDock/ControlAnimationComponent" method="trigger_hover"] +[connection signal="focus_exited" from="BottomDock/VBoxContainer/Links/OpenGameSite" to="BottomDock/ControlAnimationComponent" method="trigger_hover_lost"] +[connection signal="focus_entered" from="BottomDock/VBoxContainer/Links/ReportBug" to="BottomDock/ControlAnimationComponent" method="trigger_hover"] +[connection signal="focus_exited" from="BottomDock/VBoxContainer/Links/ReportBug" to="BottomDock/ControlAnimationComponent" method="trigger_hover_lost"] [editable path="AvailableAiModes"] -[editable path="BottomDock/Links"] +[editable path="BottomDock/VBoxContainer/Links"] diff --git a/shared/global_entities/control_animation_component/scripts/ControlAnimationComponent.gd b/shared/global_entities/control_animation_component/scripts/ControlAnimationComponent.gd index 3307f4f..310c6d1 100644 --- a/shared/global_entities/control_animation_component/scripts/ControlAnimationComponent.gd +++ b/shared/global_entities/control_animation_component/scripts/ControlAnimationComponent.gd @@ -11,7 +11,7 @@ signal enter_animation_done() "position", "size", "rotation", - "self_modulate" + "modulate" ] @export_group("Enter Animation") @export var enter_animation_enabled: bool = true @@ -27,6 +27,7 @@ signal enter_animation_done() var target: Control var default_values: Dictionary[String, Variant] = {} +var _hover_triggered: bool = false const INSTANT_TRANSITION: Tween.TransitionType = Tween.TransitionType.TRANS_LINEAR @@ -46,7 +47,7 @@ func _setup() -> void: "position": target.position, "size": target.size, "rotation": target.rotation, - "self_modulate": target.self_modulate + "modulate": target.self_modulate } if use_center: target.pivot_offset = target.size / 2 @@ -129,4 +130,18 @@ func _add_tween(target_properties: Dictionary[String, Variant], func _call_end_method(end_method: Callable) -> void: if end_method == null or self == null: return - end_method.call() \ No newline at end of file + end_method.call() + +func trigger_hover() -> void: + _hover_triggered = true + target.mouse_entered.emit() + await get_tree().physics_frame + await get_tree().physics_frame + _hover_triggered = false + + +func trigger_hover_lost() -> void: + await get_tree().physics_frame + if _hover_triggered: + return + target.mouse_exited.emit() \ No newline at end of file diff --git a/shared/resources/control_animation/ControlAnimation.gd b/shared/resources/control_animation/ControlAnimation.gd index cb0f732..b27c203 100644 --- a/shared/resources/control_animation/ControlAnimation.gd +++ b/shared/resources/control_animation/ControlAnimation.gd @@ -26,7 +26,7 @@ func setup(target: Control) -> void: "position": target.position + position, "size": target.size + size, "rotation": target.rotation + deg_to_rad(rotation_degree), - "self_modulate": target.self_modulate * modulate_add + "modulate": target.modulate * modulate_add } func get_data() -> Dictionary[String, Variant]: diff --git a/shared/resources/control_animation/resources/FadeInAnimation.tres b/shared/resources/control_animation/resources/FadeInAnimation.tres new file mode 100644 index 0000000..59369cb --- /dev/null +++ b/shared/resources/control_animation/resources/FadeInAnimation.tres @@ -0,0 +1,8 @@ +[gd_resource type="Resource" script_class="ControlAnimation" format=3 uid="uid://c1inbmbft2wj0"] + +[ext_resource type="Script" uid="uid://bcxjaw3jedjv5" path="res://shared/resources/control_animation/ControlAnimation.gd" id="1_757ol"] + +[resource] +script = ExtResource("1_757ol") +modulate_add = Color(1, 1, 1, 0) +metadata/_custom_type_script = "uid://bcxjaw3jedjv5" diff --git a/shared/resources/control_animation/resources/FadeInAnimationDelayed.tres b/shared/resources/control_animation/resources/FadeInAnimationDelayed.tres new file mode 100644 index 0000000..70c9ea3 --- /dev/null +++ b/shared/resources/control_animation/resources/FadeInAnimationDelayed.tres @@ -0,0 +1,9 @@ +[gd_resource type="Resource" script_class="ControlAnimation" format=3 uid="uid://dvtxx5rwv0aoo"] + +[ext_resource type="Script" uid="uid://bcxjaw3jedjv5" path="res://shared/resources/control_animation/ControlAnimation.gd" id="1_kbmky"] + +[resource] +script = ExtResource("1_kbmky") +modulate_add = Color(1, 1, 1, 0) +delay = 1.0 +metadata/_custom_type_script = "uid://bcxjaw3jedjv5" From e0eddaf40f4ad608fd444c9df2857e4eacc485a9 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 18 Mar 2026 20:18:30 +0100 Subject: [PATCH 2/2] fix: Godot version on credit screen The version listed on the credit screen was listed as 4.5 but should be 4.6 instead. --- de.po | 2 +- en.po | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/de.po b/de.po index 03e3021..467a17a 100644 --- a/de.po +++ b/de.po @@ -200,7 +200,7 @@ msgstr "" "\n" "[center][b]Powered By[/b][/center]\n" "[center][img=200x200,center,center]res://icon.svg[/img][/center]\n" -"[center]Godot Game Engine 4.5[/center]" +"[center]Godot Game Engine 4.6[/center]" #: entities/ui/credits/scenes/Credits.tscn msgid "Kenney.nl" diff --git a/en.po b/en.po index 84a2b13..4c25230 100644 --- a/en.po +++ b/en.po @@ -153,7 +153,7 @@ msgstr "" "\n" "[center][b]Powered By[/b][/center]\n" "[center][img=200x200,center,center]res://icon.svg[/img][/center]\n" -"[center]Godot Game Engine 4.5[/center]" +"[center]Godot Game Engine 4.6[/center]" #: entities/ui/credits/scenes/Credits.tscn msgid "Kenney.nl"