diff --git a/res/shader/blur.gdshader b/res/shader/blur.gdshader new file mode 100644 index 0000000..d255d92 --- /dev/null +++ b/res/shader/blur.gdshader @@ -0,0 +1,60 @@ +shader_type canvas_item; +//@A shader by 刚学没几天的小策划@SL +uniform float power : hint_range(0.2, 4.0, 0.1) = 1.0; +uniform float up : hint_range(0.0, 1.0, 0.001) = 0.1; +uniform float down : hint_range(0.0, 1.0, 0.001) = 0.1; +uniform float left : hint_range(0.0, 1.0, 0.001) = 0.1; +uniform float right : hint_range(0.0, 1.0, 0.001) = 0.1; +uniform float up_clip : hint_range(0.0, 1.0, 0.001) = 0.0; +uniform float down_clip : hint_range(0.0, 1.0, 0.001) = 0.0; +uniform float left_clip : hint_range(0.0, 1.0, 0.001) = 0.0; +uniform float right_clip : hint_range(0.0, 1.0, 0.001) = 0.0; +//uniform float angel : hint_range(0.0, 90.0, 0.1) = 0.0; + +void fragment() { + vec2 _rotated_uv = UV; + //TODO: Add an "angel" parameter to change the clipping direction + + float _hor = 1.0; + if (_rotated_uv.x 0.0) { + if (_rotated_uv.x1.0-right) { + if (right_clip 0.0) { + if (1.0-_rotated_uv.x < right_clip){_hor = 0.0;} + else {_hor *= pow( (1.0-_rotated_uv.x-right_clip)/(right-right_clip), power);} + } + else{ + _hor *= pow( (1.0-_rotated_uv.x)/right, power); + } + } + + float _ver = 1.0; + if (_rotated_uv.y 0.0) { + if (_rotated_uv.y1.0-down) { + if (right_clip 0.0) { + if (1.0-_rotated_uv.y < down_clip){_ver = 0.0;} + else {_ver= pow( (1.0-_rotated_uv.y-down_clip)/(down-down_clip), power);} + } + else{ + _ver *= pow( (1.0-_rotated_uv.y)/down, power); + } + } + + COLOR = texture(TEXTURE,UV); + COLOR.a = min(_hor*_ver, texture(TEXTURE,UV).a); +} diff --git a/res/ui/select/selected.tres b/res/ui/select/selected.tres new file mode 100644 index 0000000..dc33826 --- /dev/null +++ b/res/ui/select/selected.tres @@ -0,0 +1,11 @@ +[gd_resource type="StyleBoxTexture" load_steps=2 format=3 uid="uid://dyx7fisnfqmfx"] + +[ext_resource type="Texture2D" uid="uid://dq44782f2sdbq" path="res://res/ui/select/图层 2.png" id="1_s85x1"] + +[resource] +resource_local_to_scene = true +texture = ExtResource("1_s85x1") +texture_margin_left = 12.0 +texture_margin_top = 12.0 +texture_margin_right = 12.0 +texture_margin_bottom = 12.0 diff --git a/res/ui/select/test.png b/res/ui/select/test.png new file mode 100644 index 0000000..eaf2910 Binary files /dev/null and b/res/ui/select/test.png differ diff --git a/res/ui/select/test.png.import b/res/ui/select/test.png.import new file mode 100644 index 0000000..ae35330 --- /dev/null +++ b/res/ui/select/test.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://li8e5ntlgcpg" +path="res://.godot/imported/test.png-d293956f34342a4edcbe405055744398.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/test.png" +dest_files=["res://.godot/imported/test.png-d293956f34342a4edcbe405055744398.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/unselected.tres b/res/ui/select/unselected.tres new file mode 100644 index 0000000..040d6d2 --- /dev/null +++ b/res/ui/select/unselected.tres @@ -0,0 +1,6 @@ +[gd_resource type="StyleBoxTexture" load_steps=2 format=3 uid="uid://criiod0onsrre"] + +[ext_resource type="Texture2D" uid="uid://bbfw824b7sexe" path="res://res/ui/select/图层449.png" id="1_mcl6g"] + +[resource] +texture = ExtResource("1_mcl6g") diff --git a/res/ui/select/历史图标.png b/res/ui/select/历史图标.png new file mode 100644 index 0000000..5b05ef0 Binary files /dev/null and b/res/ui/select/历史图标.png differ diff --git a/res/ui/select/历史图标.png.import b/res/ui/select/历史图标.png.import new file mode 100644 index 0000000..f8f837f --- /dev/null +++ b/res/ui/select/历史图标.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bddj0eoytjep0" +path="res://.godot/imported/历史图标.png-6361d452fde4f8a57a7d78d12374a5db.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/历史图标.png" +dest_files=["res://.godot/imported/历史图标.png-6361d452fde4f8a57a7d78d12374a5db.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/图层 1.png b/res/ui/select/图层 1.png new file mode 100644 index 0000000..7799fdd Binary files /dev/null and b/res/ui/select/图层 1.png differ diff --git a/res/ui/select/图层 1.png.import b/res/ui/select/图层 1.png.import new file mode 100644 index 0000000..5abc20d --- /dev/null +++ b/res/ui/select/图层 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c6l3t83jiltjw" +path="res://.godot/imported/图层 1.png-2d6c1f5a007e2d7dbf1d8119d532bbd0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/图层 1.png" +dest_files=["res://.godot/imported/图层 1.png-2d6c1f5a007e2d7dbf1d8119d532bbd0.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/图层 2.png b/res/ui/select/图层 2.png new file mode 100644 index 0000000..1176d79 Binary files /dev/null and b/res/ui/select/图层 2.png differ diff --git a/res/ui/select/图层 2.png.import b/res/ui/select/图层 2.png.import new file mode 100644 index 0000000..14658c0 --- /dev/null +++ b/res/ui/select/图层 2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dq44782f2sdbq" +path="res://.godot/imported/图层 2.png-ce50be11a422c50beece4d6d24d6a774.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/图层 2.png" +dest_files=["res://.godot/imported/图层 2.png-ce50be11a422c50beece4d6d24d6a774.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/图层 3.png b/res/ui/select/图层 3.png new file mode 100644 index 0000000..049c174 Binary files /dev/null and b/res/ui/select/图层 3.png differ diff --git a/res/ui/select/图层 3.png.import b/res/ui/select/图层 3.png.import new file mode 100644 index 0000000..1560df7 --- /dev/null +++ b/res/ui/select/图层 3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://nht4ovhe7xvy" +path="res://.godot/imported/图层 3.png-f07dc2b26b4873fd6205569cf309cd8d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/图层 3.png" +dest_files=["res://.godot/imported/图层 3.png-f07dc2b26b4873fd6205569cf309cd8d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/图层 4.png b/res/ui/select/图层 4.png new file mode 100644 index 0000000..593d1f2 Binary files /dev/null and b/res/ui/select/图层 4.png differ diff --git a/res/ui/select/图层 4.png.import b/res/ui/select/图层 4.png.import new file mode 100644 index 0000000..b4d8885 --- /dev/null +++ b/res/ui/select/图层 4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bi8yasn7h0fie" +path="res://.godot/imported/图层 4.png-79f2037773ed8c96043df8871c49ab92.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/图层 4.png" +dest_files=["res://.godot/imported/图层 4.png-79f2037773ed8c96043df8871c49ab92.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/图层22.png b/res/ui/select/图层22.png new file mode 100644 index 0000000..71326f4 Binary files /dev/null and b/res/ui/select/图层22.png differ diff --git a/res/ui/select/图层22.png.import b/res/ui/select/图层22.png.import new file mode 100644 index 0000000..dcdf1f4 --- /dev/null +++ b/res/ui/select/图层22.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://sadccea3silb" +path="res://.godot/imported/图层22.png-3f5db3fffa8297bfe9782e4636e9f036.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/图层22.png" +dest_files=["res://.godot/imported/图层22.png-3f5db3fffa8297bfe9782e4636e9f036.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/图层25.png b/res/ui/select/图层25.png new file mode 100644 index 0000000..4481aa3 Binary files /dev/null and b/res/ui/select/图层25.png differ diff --git a/res/ui/select/图层25.png.import b/res/ui/select/图层25.png.import new file mode 100644 index 0000000..0fbc4a0 --- /dev/null +++ b/res/ui/select/图层25.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ncsff7bf6sni" +path="res://.godot/imported/图层25.png-b46c5e9ae1123be836ce3fc614116c1a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/图层25.png" +dest_files=["res://.godot/imported/图层25.png-b46c5e9ae1123be836ce3fc614116c1a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/图层29.png b/res/ui/select/图层29.png new file mode 100644 index 0000000..6126133 Binary files /dev/null and b/res/ui/select/图层29.png differ diff --git a/res/ui/select/图层29.png.import b/res/ui/select/图层29.png.import new file mode 100644 index 0000000..573bff0 --- /dev/null +++ b/res/ui/select/图层29.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bdnuk1oe6bhjv" +path="res://.godot/imported/图层29.png-32ee6aa0c91bedc5ccd9df6f142b8d56.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/图层29.png" +dest_files=["res://.godot/imported/图层29.png-32ee6aa0c91bedc5ccd9df6f142b8d56.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/图层30.png b/res/ui/select/图层30.png new file mode 100644 index 0000000..b33f0e6 Binary files /dev/null and b/res/ui/select/图层30.png differ diff --git a/res/ui/select/图层30.png.import b/res/ui/select/图层30.png.import new file mode 100644 index 0000000..99bc98b --- /dev/null +++ b/res/ui/select/图层30.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c2trkapa6c4p8" +path="res://.godot/imported/图层30.png-a9cc1638a83dadfddd7f279425bfb93c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/图层30.png" +dest_files=["res://.godot/imported/图层30.png-a9cc1638a83dadfddd7f279425bfb93c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/图层449.png b/res/ui/select/图层449.png new file mode 100644 index 0000000..e35389e Binary files /dev/null and b/res/ui/select/图层449.png differ diff --git a/res/ui/select/图层449.png.import b/res/ui/select/图层449.png.import new file mode 100644 index 0000000..25627b0 --- /dev/null +++ b/res/ui/select/图层449.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bbfw824b7sexe" +path="res://.godot/imported/图层449.png-65d298e201171ea0c82a3dc411676b44.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/图层449.png" +dest_files=["res://.godot/imported/图层449.png-65d298e201171ea0c82a3dc411676b44.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/奇幻图标.png b/res/ui/select/奇幻图标.png new file mode 100644 index 0000000..1e6fe3d Binary files /dev/null and b/res/ui/select/奇幻图标.png differ diff --git a/res/ui/select/奇幻图标.png.import b/res/ui/select/奇幻图标.png.import new file mode 100644 index 0000000..97a73ec --- /dev/null +++ b/res/ui/select/奇幻图标.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://3pl6831ybap1" +path="res://.godot/imported/奇幻图标.png-8846276b14b72a54abc8d5433aec624c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/奇幻图标.png" +dest_files=["res://.godot/imported/奇幻图标.png-8846276b14b72a54abc8d5433aec624c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/末世图标.png b/res/ui/select/末世图标.png new file mode 100644 index 0000000..39ced9e Binary files /dev/null and b/res/ui/select/末世图标.png differ diff --git a/res/ui/select/末世图标.png.import b/res/ui/select/末世图标.png.import new file mode 100644 index 0000000..b9814ee --- /dev/null +++ b/res/ui/select/末世图标.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://y03c11caxq5g" +path="res://.godot/imported/末世图标.png-7f90dead0dac381d31528db7661846a5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/末世图标.png" +dest_files=["res://.godot/imported/末世图标.png-7f90dead0dac381d31528db7661846a5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/现实图标.png b/res/ui/select/现实图标.png new file mode 100644 index 0000000..20c9568 Binary files /dev/null and b/res/ui/select/现实图标.png differ diff --git a/res/ui/select/现实图标.png.import b/res/ui/select/现实图标.png.import new file mode 100644 index 0000000..6c2008b --- /dev/null +++ b/res/ui/select/现实图标.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://3j0a4ta8ww4y" +path="res://.godot/imported/现实图标.png-91cb98e70514c40ed352cc576ecc8d66.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/现实图标.png" +dest_files=["res://.godot/imported/现实图标.png-91cb98e70514c40ed352cc576ecc8d66.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/res/ui/select/继续图标.png b/res/ui/select/继续图标.png new file mode 100644 index 0000000..8af35b9 Binary files /dev/null and b/res/ui/select/继续图标.png differ diff --git a/res/ui/select/继续图标.png.import b/res/ui/select/继续图标.png.import new file mode 100644 index 0000000..bc242a7 --- /dev/null +++ b/res/ui/select/继续图标.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cukrtaeu70hc5" +path="res://.godot/imported/继续图标.png-62cb61efb883038fa5c3cdf83ac20324.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res/ui/select/继续图标.png" +dest_files=["res://.godot/imported/继续图标.png-62cb61efb883038fa5c3cdf83ac20324.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/scene/select.gd b/scene/select.gd new file mode 100644 index 0000000..dd2977c --- /dev/null +++ b/scene/select.gd @@ -0,0 +1,30 @@ +extends Control +@onready var selected_button:Button=$VBoxContainer/Button1 +@onready var btn_group:Array[Button]=[$VBoxContainer/Button1, $VBoxContainer/Button2, $VBoxContainer/Button3, $VBoxContainer/Button4, $VBoxContainer/Button5, $VBoxContainer/Button6] +const SELECTED = preload("res://res/ui/select/selected.tres") +const UNSELECTED = preload("res://res/ui/select/unselected.tres") +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass +func side_btn_clicked(ind:int): + selected_button.add_theme_stylebox_override("normal",UNSELECTED) + selected_button.add_theme_stylebox_override("pressed",UNSELECTED) + selected_button.add_theme_stylebox_override("hover",UNSELECTED) + selected_button.add_theme_stylebox_override("hover_pressed",UNSELECTED) + var tween = get_tree().create_tween() + tween.tween_property(selected_button, "custom_minimum_size:x", 320, 0.1) + selected_button.z_index-=1 + btn_group[ind].add_theme_stylebox_override("normal",SELECTED) + btn_group[ind].add_theme_stylebox_override("pressed",SELECTED) + btn_group[ind].add_theme_stylebox_override("hover",SELECTED) + btn_group[ind].add_theme_stylebox_override("hover_pressed",SELECTED) + btn_group[ind].z_index+=1 + var tween2= get_tree().create_tween() + tween2.tween_property(btn_group[ind], "custom_minimum_size:x", 385, 0.1) + selected_button=btn_group[ind] + pass diff --git a/scene/select.tscn b/scene/select.tscn new file mode 100644 index 0000000..d6bb6fe --- /dev/null +++ b/scene/select.tscn @@ -0,0 +1,542 @@ +[gd_scene load_steps=22 format=3 uid="uid://33lcg23hy4mi"] + +[ext_resource type="Script" path="res://scene/select.gd" id="1_cgnul"] +[ext_resource type="Texture2D" uid="uid://li8e5ntlgcpg" path="res://res/ui/select/test.png" id="3_jw1jl"] +[ext_resource type="Texture2D" uid="uid://c6l3t83jiltjw" path="res://res/ui/select/图层 1.png" id="3_yij7q"] +[ext_resource type="StyleBox" uid="uid://dyx7fisnfqmfx" path="res://res/ui/select/selected.tres" id="4_7pqsv"] +[ext_resource type="Shader" path="res://res/shader/blur.gdshader" id="4_dco75"] +[ext_resource type="StyleBox" uid="uid://criiod0onsrre" path="res://res/ui/select/unselected.tres" id="5_f0q5x"] +[ext_resource type="Texture2D" uid="uid://bbfw824b7sexe" path="res://res/ui/select/图层449.png" id="5_xaitc"] +[ext_resource type="Texture2D" uid="uid://ncsff7bf6sni" path="res://res/ui/select/图层25.png" id="8_6wknl"] +[ext_resource type="Texture2D" uid="uid://nht4ovhe7xvy" path="res://res/ui/select/图层 3.png" id="8_wqdui"] +[ext_resource type="Texture2D" uid="uid://c2trkapa6c4p8" path="res://res/ui/select/图层30.png" id="9_ke4j3"] +[ext_resource type="Texture2D" uid="uid://bddj0eoytjep0" path="res://res/ui/select/历史图标.png" id="9_wp7c8"] +[ext_resource type="Texture2D" uid="uid://bi8yasn7h0fie" path="res://res/ui/select/图层 4.png" id="10_iblo5"] +[ext_resource type="Texture2D" uid="uid://3pl6831ybap1" path="res://res/ui/select/奇幻图标.png" id="11_hv6di"] +[ext_resource type="Texture2D" uid="uid://sadccea3silb" path="res://res/ui/select/图层22.png" id="11_tvykm"] +[ext_resource type="Texture2D" uid="uid://3j0a4ta8ww4y" path="res://res/ui/select/现实图标.png" id="12_qqyd6"] +[ext_resource type="Texture2D" uid="uid://y03c11caxq5g" path="res://res/ui/select/末世图标.png" id="13_06h8p"] +[ext_resource type="Texture2D" uid="uid://cukrtaeu70hc5" path="res://res/ui/select/继续图标.png" id="15_jcwu5"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_ly4bd"] +resource_local_to_scene = true +shader = ExtResource("4_dco75") +shader_parameter/power = 1.0 +shader_parameter/up = 0.2 +shader_parameter/down = 0.2 +shader_parameter/left = 0.2 +shader_parameter/right = 0.2 +shader_parameter/up_clip = 0.0 +shader_parameter/down_clip = 0.0 +shader_parameter/left_clip = 0.0 +shader_parameter/right_clip = 0.0 + +[sub_resource type="Gradient" id="Gradient_k04ai"] +interpolation_mode = 2 +offsets = PackedFloat32Array(0, 0.142857, 0.831169) +colors = PackedColorArray(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_lyq3l"] +gradient = SubResource("Gradient_k04ai") + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_gkr7a"] +texture = ExtResource("5_xaitc") + +[node name="Control" 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_cgnul") + +[node name="back" type="TextureRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("3_yij7q") +expand_mode = 1 +stretch_mode = 6 + +[node name="icon" type="TextureRect" parent="back"] +z_index = 1 +material = SubResource("ShaderMaterial_ly4bd") +layout_mode = 2 +anchor_left = 0.179688 +anchor_top = 0.0657407 +anchor_right = 0.775 +anchor_bottom = 0.917593 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("3_jw1jl") +expand_mode = 1 +stretch_mode = 5 +metadata/_edit_use_anchors_ = true + +[node name="black" type="TextureRect" parent="back/icon"] +show_behind_parent = true +layout_mode = 1 +anchors_preset = -1 +anchor_left = -0.15923 +anchor_top = -0.0771739 +anchor_right = 1.0 +anchor_bottom = 1.09674 +grow_vertical = 2 +texture = SubResource("GradientTexture1D_lyq3l") +expand_mode = 1 +metadata/_edit_use_anchors_ = true + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.0614583 +anchor_top = 0.05 +anchor_right = 0.261979 +anchor_bottom = 0.833333 +theme_override_constants/separation = 48 +metadata/_edit_use_anchors_ = true + +[node name="Button1" type="Button" parent="VBoxContainer"] +z_index = 1 +clip_contents = true +custom_minimum_size = Vector2(385, 101) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 3 +focus_mode = 0 +theme_override_styles/hover_pressed = ExtResource("4_7pqsv") +theme_override_styles/hover = ExtResource("4_7pqsv") +theme_override_styles/pressed = ExtResource("4_7pqsv") +theme_override_styles/normal = ExtResource("4_7pqsv") + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Button1"] +show_behind_parent = true +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.0891089 +anchor_right = 1.0 +anchor_bottom = 0.901 +offset_bottom = -0.000999451 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = ExtResource("3_jw1jl") +expand_mode = 1 +stretch_mode = 6 + +[node name="Button2" type="Button" parent="VBoxContainer"] +clip_contents = true +custom_minimum_size = Vector2(385, 101) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 3 +focus_mode = 0 +theme_override_styles/hover_pressed = ExtResource("5_f0q5x") +theme_override_styles/hover = ExtResource("5_f0q5x") +theme_override_styles/pressed = ExtResource("5_f0q5x") +theme_override_styles/normal = ExtResource("5_f0q5x") + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Button2"] +show_behind_parent = true +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.04 +anchor_top = 0.09 +anchor_right = 0.963333 +anchor_bottom = 0.9 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = ExtResource("3_jw1jl") +expand_mode = 1 +stretch_mode = 6 +metadata/_edit_use_anchors_ = true + +[node name="Button3" type="Button" parent="VBoxContainer"] +clip_contents = true +custom_minimum_size = Vector2(385, 101) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 3 +focus_mode = 0 +theme_override_styles/hover_pressed = ExtResource("5_f0q5x") +theme_override_styles/hover = ExtResource("5_f0q5x") +theme_override_styles/pressed = ExtResource("5_f0q5x") +theme_override_styles/normal = SubResource("StyleBoxTexture_gkr7a") + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Button3"] +show_behind_parent = true +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.04 +anchor_top = 0.09 +anchor_right = 0.963333 +anchor_bottom = 0.9 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = ExtResource("3_jw1jl") +expand_mode = 1 +stretch_mode = 6 +metadata/_edit_use_anchors_ = true + +[node name="Button4" type="Button" parent="VBoxContainer"] +clip_contents = true +custom_minimum_size = Vector2(385, 101) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 3 +focus_mode = 0 +theme_override_styles/hover_pressed = ExtResource("5_f0q5x") +theme_override_styles/hover = ExtResource("5_f0q5x") +theme_override_styles/pressed = ExtResource("5_f0q5x") +theme_override_styles/normal = SubResource("StyleBoxTexture_gkr7a") + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Button4"] +show_behind_parent = true +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.04 +anchor_top = 0.09 +anchor_right = 0.963333 +anchor_bottom = 0.9 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = ExtResource("3_jw1jl") +expand_mode = 1 +stretch_mode = 6 +metadata/_edit_use_anchors_ = true + +[node name="Button5" type="Button" parent="VBoxContainer"] +clip_contents = true +custom_minimum_size = Vector2(385, 101) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 3 +focus_mode = 0 +theme_override_styles/hover_pressed = ExtResource("5_f0q5x") +theme_override_styles/hover = ExtResource("5_f0q5x") +theme_override_styles/pressed = ExtResource("5_f0q5x") +theme_override_styles/normal = SubResource("StyleBoxTexture_gkr7a") + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Button5"] +show_behind_parent = true +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.04 +anchor_top = 0.09 +anchor_right = 0.963333 +anchor_bottom = 0.9 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = ExtResource("3_jw1jl") +expand_mode = 1 +stretch_mode = 6 +metadata/_edit_use_anchors_ = true + +[node name="Button6" type="Button" parent="VBoxContainer"] +clip_contents = true +custom_minimum_size = Vector2(385, 101) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 3 +focus_mode = 0 +theme_override_styles/hover_pressed = ExtResource("5_f0q5x") +theme_override_styles/hover = ExtResource("5_f0q5x") +theme_override_styles/pressed = ExtResource("5_f0q5x") +theme_override_styles/normal = SubResource("StyleBoxTexture_gkr7a") + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Button6"] +show_behind_parent = true +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.04 +anchor_top = 0.09 +anchor_right = 0.963333 +anchor_bottom = 0.9 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = ExtResource("3_jw1jl") +expand_mode = 1 +stretch_mode = 6 +metadata/_edit_use_anchors_ = true + +[node name="HBoxContainer" type="HBoxContainer" parent="."] +z_index = 1 +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.028125 +anchor_top = 0.887963 +anchor_right = 1.0 +anchor_bottom = 0.944444 +offset_bottom = -60.0 +theme_override_constants/separation = -29 +metadata/_edit_use_anchors_ = true + +[node name="TextureRect" type="TextureRect" parent="HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +texture = ExtResource("8_wqdui") + +[node name="TextureRect" type="TextureRect" parent="HBoxContainer/TextureRect"] +layout_mode = 0 +anchor_left = -0.00268097 +anchor_top = -0.557377 +anchor_right = 0.268097 +anchor_bottom = 1.09836 +offset_right = -61.0 +offset_bottom = -61.0 +texture = ExtResource("9_wp7c8") + +[node name="Label" type="Label" parent="HBoxContainer/TextureRect"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.292225 +anchor_right = 0.86059 +anchor_bottom = 1.0 +theme_override_font_sizes/font_size = 30 +text = "历史剧本" +horizontal_alignment = 1 +vertical_alignment = 1 +metadata/_edit_use_anchors_ = true + +[node name="Button" type="Button" parent="HBoxContainer/TextureRect"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +focus_mode = 0 +flat = true + +[node name="TextureRect2" type="TextureRect" parent="HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +texture = ExtResource("10_iblo5") + +[node name="TextureRect" type="TextureRect" parent="HBoxContainer/TextureRect2"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = -0.00268097 +anchor_top = -0.557377 +anchor_right = 0.268097 +anchor_bottom = 1.09836 +offset_right = -61.0 +offset_bottom = -61.0 +texture = ExtResource("11_hv6di") + +[node name="Label" type="Label" parent="HBoxContainer/TextureRect2"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.292225 +anchor_right = 0.86059 +anchor_bottom = 1.0 +theme_override_font_sizes/font_size = 30 +text = "奇幻剧本" +horizontal_alignment = 1 +vertical_alignment = 1 +metadata/_edit_use_anchors_ = true + +[node name="Button" type="Button" parent="HBoxContainer/TextureRect2"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +focus_mode = 0 +flat = true + +[node name="TextureRect3" type="TextureRect" parent="HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +texture = ExtResource("10_iblo5") + +[node name="TextureRect" type="TextureRect" parent="HBoxContainer/TextureRect3"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.045 +anchor_top = -0.361 +anchor_right = 0.268097 +anchor_bottom = 1.09836 +offset_left = 0.0899925 +offset_top = 0.0210018 +offset_right = 0.297585 +offset_bottom = -6.0 +texture = ExtResource("12_qqyd6") + +[node name="Label" type="Label" parent="HBoxContainer/TextureRect3"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.292225 +anchor_right = 0.86059 +anchor_bottom = 1.0 +theme_override_font_sizes/font_size = 30 +text = "现实剧本" +horizontal_alignment = 1 +vertical_alignment = 1 +metadata/_edit_use_anchors_ = true + +[node name="Button" type="Button" parent="HBoxContainer/TextureRect3"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +focus_mode = 0 +flat = true + +[node name="TextureRect4" type="TextureRect" parent="HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +texture = ExtResource("10_iblo5") + +[node name="TextureRect" type="TextureRect" parent="HBoxContainer/TextureRect4"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.073 +anchor_top = -0.557 +anchor_right = 0.268097 +anchor_bottom = 1.09836 +offset_left = -0.0540104 +offset_top = -0.0229988 +offset_right = -0.702415 +offset_bottom = 3.0 +texture = ExtResource("13_06h8p") + +[node name="Label" type="Label" parent="HBoxContainer/TextureRect4"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.292225 +anchor_right = 0.86059 +anchor_bottom = 1.0 +theme_override_font_sizes/font_size = 30 +text = "末世剧本" +horizontal_alignment = 1 +vertical_alignment = 1 +metadata/_edit_use_anchors_ = true + +[node name="Button" type="Button" parent="HBoxContainer/TextureRect4"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +focus_mode = 0 +flat = true + +[node name="TextureRect5" type="TextureRect" parent="HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +texture = ExtResource("11_tvykm") + +[node name="TextureRect" type="TextureRect" parent="HBoxContainer/TextureRect5"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.0618812 +anchor_top = -0.639344 +anchor_right = 0.311881 +anchor_bottom = 1.01639 +offset_bottom = 7.0 +texture = ExtResource("15_jcwu5") +metadata/_edit_use_anchors_ = true + +[node name="Label" type="Label" parent="HBoxContainer/TextureRect5"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.292225 +anchor_right = 0.86059 +anchor_bottom = 1.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 30 +text = "继续剧本" +horizontal_alignment = 1 +vertical_alignment = 1 +metadata/_edit_use_anchors_ = true + +[node name="Button" type="Button" parent="HBoxContainer/TextureRect5"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +focus_mode = 0 +flat = true + +[node name="NinePatchRect" type="NinePatchRect" parent="."] +z_index = 1 +layout_mode = 0 +anchor_left = 0.740104 +anchor_top = 0.202778 +anchor_right = 0.964063 +anchor_bottom = 0.712963 +texture = ExtResource("8_6wknl") +patch_margin_left = 43 +patch_margin_top = 83 +patch_margin_right = 90 +patch_margin_bottom = 56 +metadata/_edit_use_anchors_ = true + +[node name="Label" type="Label" parent="NinePatchRect"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.0976744 +anchor_top = 0.137931 +anchor_right = 0.809302 +anchor_bottom = 0.901996 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 34 +text = "剧本介绍剧本介绍 +剧本介绍剧本介绍 +剧本介绍剧本介绍 +剧本介绍剧本介绍 +剧本介绍剧本介绍 +剧本介绍剧本介绍 +剧本介绍剧本介绍" +horizontal_alignment = 1 +autowrap_mode = 3 +metadata/_edit_use_anchors_ = true + +[node name="TextureRect" type="TextureRect" parent="NinePatchRect"] +layout_mode = 2 +anchor_left = 0.156 +anchor_right = 1.0 +anchor_bottom = 0.005 +offset_left = -65.08 +offset_top = -217.0 +offset_right = 56.0 +offset_bottom = 64.245 +texture = ExtResource("9_ke4j3") +expand_mode = 1 +stretch_mode = 5 +metadata/_edit_use_anchors_ = true + +[node name="Label" type="Label" parent="NinePatchRect/TextureRect"] +layout_mode = 0 +anchor_left = 0.355372 +anchor_top = 0.464789 +anchor_right = 0.799587 +anchor_bottom = 0.665493 +theme_override_font_sizes/font_size = 37 +text = "故事名字" +horizontal_alignment = 1 +vertical_alignment = 1 +metadata/_edit_use_anchors_ = true + +[connection signal="pressed" from="VBoxContainer/Button1" to="." method="side_btn_clicked" binds= [0]] +[connection signal="pressed" from="VBoxContainer/Button2" to="." method="side_btn_clicked" binds= [1]] +[connection signal="pressed" from="VBoxContainer/Button3" to="." method="side_btn_clicked" binds= [2]] +[connection signal="pressed" from="VBoxContainer/Button4" to="." method="side_btn_clicked" binds= [3]] +[connection signal="pressed" from="VBoxContainer/Button5" to="." method="side_btn_clicked" binds= [4]] +[connection signal="pressed" from="VBoxContainer/Button6" to="." method="side_btn_clicked" binds= [5]]