From 86ad20e45204bffbec2c29e01f01d348a7a5ed52 Mon Sep 17 00:00:00 2001 From: Nordup Date: Sun, 10 Aug 2025 23:47:53 +0700 Subject: [PATCH] onboarding design improvements --- app/scenes/components/onboarding/board.tscn | 6 ++-- .../components/onboarding/onboarding.tscn | 34 ++++++++----------- app/scenes/menu_body/world.tscn | 4 +-- app/scripts/ui/onboarding/onboarding.gd | 10 +++--- app/shaders/vignette_blur.tres | 2 +- 5 files changed, 25 insertions(+), 31 deletions(-) diff --git a/app/scenes/components/onboarding/board.tscn b/app/scenes/components/onboarding/board.tscn index ed25b19..87acfe6 100644 --- a/app/scenes/components/onboarding/board.tscn +++ b/app/scenes/components/onboarding/board.tscn @@ -11,8 +11,8 @@ corner_radius_top_left = 40 corner_radius_top_right = 40 corner_radius_bottom_right = 40 corner_radius_bottom_left = 40 -shadow_color = Color(0.0584, 0.06128, 0.08, 0.784314) -shadow_size = 6 +shadow_color = Color(0.0747, 0.078015, 0.09, 0.705882) +shadow_size = 10 [sub_resource type="LabelSettings" id="LabelSettings_bkr01"] font = ExtResource("2_glv2j") @@ -36,7 +36,7 @@ grow_vertical = 2 pivot_offset = Vector2(300, 350) script = ExtResource("1_dxxs8") focus_button = NodePath("TextureButton") -unfocus_color = Color(1, 1, 1, 0.505882) +unfocus_color = Color(0.9, 0.9, 0.9, 0.509804) unfocus_scale = Vector2(0.8, 0.8) [node name="Panel" type="Panel" parent="."] diff --git a/app/scenes/components/onboarding/onboarding.tscn b/app/scenes/components/onboarding/onboarding.tscn index 1ffbd13..3b3f749 100644 --- a/app/scenes/components/onboarding/onboarding.tscn +++ b/app/scenes/components/onboarding/onboarding.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=11 format=3 uid="uid://b5tbn17l1pfs1"] +[gd_scene load_steps=9 format=3 uid="uid://b5tbn17l1pfs1"] [ext_resource type="Script" path="res://scripts/ui/onboarding/onboarding.gd" id="1_2xh2a"] [ext_resource type="Script" path="res://scripts/ui/onboarding/carousel.gd" id="2_uhwdh"] @@ -7,26 +7,17 @@ [ext_resource type="Resource" uid="uid://crjhix0osmtnf" path="res://resources/ui_events.res" id="3_jta5g"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_htqsi"] -bg_color = Color(0, 0, 0, 0.505882) +bg_color = Color(0, 0, 0, 0.258824) -[sub_resource type="Curve" id="Curve_gjk4u"] -_data = [Vector2(0, 1), 0.0, -0.118897, 0, 0, Vector2(0.6, 0.686327), -1.65368, -1.65368, 0, 0, Vector2(0.99999, 0.424933), 0.0, 0.0, 0, 0] -point_count = 3 - -[sub_resource type="CurveTexture" id="CurveTexture_fomqh"] -curve = SubResource("Curve_gjk4u") - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_hpwdi"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_pager"] shader = ExtResource("2_vhqmk") shader_parameter/UVScale = Vector2(1, 1) -shader_parameter/BlurAmount = 1.0 -shader_parameter/VignetteColor = Color(0.0704, 0.07856, 0.08, 1) -shader_parameter/Vignette = SubResource("CurveTexture_fomqh") +shader_parameter/BlurAmount = 0.5 +shader_parameter/VignetteColor = Color(0, 0, 0, 1) -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2l2ws"] -bg_color = Color(1, 1, 1, 1) +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_b61hg"] -[node name="Onboarding" type="Control" node_paths=PackedStringArray("root")] +[node name="Onboarding" type="Control" node_paths=PackedStringArray("root", "skip")] top_level = true z_index = 10 layout_mode = 3 @@ -38,6 +29,7 @@ grow_vertical = 2 mouse_filter = 2 script = ExtResource("1_2xh2a") root = NodePath("Root") +skip = NodePath("Root/Carousel/Line/Board/MarginContainer/VBoxContainer/HBoxContainer/Hide") [node name="Root" type="Control" parent="."] layout_mode = 1 @@ -48,7 +40,6 @@ grow_horizontal = 2 grow_vertical = 2 [node name="Panel" type="Panel" parent="Root"] -visible = false layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -58,8 +49,9 @@ grow_vertical = 2 mouse_filter = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_htqsi") -[node name="VignetteBlur" type="Panel" parent="Root"] -material = SubResource("ShaderMaterial_hpwdi") +[node name="Blur" type="Panel" parent="Root"] +top_level = true +material = SubResource("ShaderMaterial_pager") layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -67,7 +59,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 -theme_override_styles/panel = SubResource("StyleBoxFlat_2l2ws") +theme_override_styles/panel = SubResource("StyleBoxFlat_b61hg") [node name="Carousel" type="Control" parent="Root" node_paths=PackedStringArray("line")] layout_mode = 1 @@ -129,3 +121,5 @@ offset_left = 1300.0 offset_top = 0.0 offset_right = 1900.0 offset_bottom = 700.0 + +[editable path="Root/Carousel/Line/Board"] diff --git a/app/scenes/menu_body/world.tscn b/app/scenes/menu_body/world.tscn index c1e3119..27ac5c9 100644 --- a/app/scenes/menu_body/world.tscn +++ b/app/scenes/menu_body/world.tscn @@ -40,7 +40,7 @@ shader_parameter/show_render = null _data = [Vector2(0.0876494, 0.913189), 0.0, -0.118897, 0, 0, Vector2(0.50996, 0.316361), -1.65368, -1.65368, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] point_count = 3 -[sub_resource type="CurveTexture" id="CurveTexture_e4qvr"] +[sub_resource type="CurveTexture" id="CurveTexture_yw30u"] curve = SubResource("Curve_rju31") [sub_resource type="ShaderMaterial" id="ShaderMaterial_bspld"] @@ -48,7 +48,7 @@ shader = ExtResource("18_sat0u") shader_parameter/UVScale = Vector2(0.9, 0.9) shader_parameter/BlurAmount = 2.5 shader_parameter/VignetteColor = Color(0.126, 0.1719, 0.18, 1) -shader_parameter/Vignette = SubResource("CurveTexture_e4qvr") +shader_parameter/Vignette = SubResource("CurveTexture_yw30u") [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_axrau"] bg_color = Color(1, 1, 1, 1) diff --git a/app/scripts/ui/onboarding/onboarding.gd b/app/scripts/ui/onboarding/onboarding.gd index ba85a25..f08d2cb 100644 --- a/app/scripts/ui/onboarding/onboarding.gd +++ b/app/scripts/ui/onboarding/onboarding.gd @@ -5,7 +5,7 @@ const SHOWN = Color(1, 1, 1, 1) const HIDDEN = Color(1, 1, 1, 0) @export var root: Control -# @export var skip: Button +@export var skip: Button @export var fade_in: float = 0.2 @export var fade_out: float = 0.2 @@ -13,10 +13,10 @@ var tween: Tween func _ready() -> void: - # skip.pressed.connect(hide_onboarding) + skip.pressed.connect(hide_onboarding) visible = true - root.hide() + root.visible = false root.modulate = HIDDEN root.mouse_filter = Control.MOUSE_FILTER_PASS @@ -27,7 +27,7 @@ func _ready() -> void: func show_onboarding() -> void: if root.visible: return - root.show() + root.visible = true if is_instance_valid(tween): tween.stop() tween = create_tween() @@ -47,4 +47,4 @@ func hide_onboarding() -> void: tween.tween_property(root, "modulate", HIDDEN, fade_out) await tween.finished - root.hide() + root.visible = false diff --git a/app/shaders/vignette_blur.tres b/app/shaders/vignette_blur.tres index 64610ab..7db91fd 100644 --- a/app/shaders/vignette_blur.tres +++ b/app/shaders/vignette_blur.tres @@ -179,4 +179,4 @@ nodes/fragment/26/node = SubResource("VisualShaderNodeVectorOp_4s8mp") nodes/fragment/26/position = Vector2(-420, 780) nodes/fragment/27/node = SubResource("VisualShaderNodeVec2Parameter_ren8n") nodes/fragment/27/position = Vector2(-1060, -680) -nodes/fragment/connections = PackedInt32Array(8, 0, 7, 2, 9, 0, 7, 1, 10, 0, 11, 2, 15, 0, 11, 0, 16, 0, 15, 2, 18, 0, 15, 0, 4, 0, 21, 0, 11, 0, 23, 0, 7, 0, 24, 0, 25, 0, 23, 1, 20, 0, 25, 1, 26, 0, 25, 0, 11, 0, 26, 1, 23, 0, 24, 1, 24, 0, 0, 0, 21, 0, 7, 0, 27, 0, 21, 1) +nodes/fragment/connections = PackedInt32Array(8, 0, 7, 2, 9, 0, 7, 1, 10, 0, 11, 2, 15, 0, 11, 0, 16, 0, 15, 2, 18, 0, 15, 0, 4, 0, 21, 0, 11, 0, 23, 0, 25, 0, 23, 1, 20, 0, 25, 1, 26, 0, 25, 0, 11, 0, 26, 1, 21, 0, 7, 0, 27, 0, 21, 1, 7, 0, 24, 0, 23, 0, 24, 1, 24, 0, 0, 0)