优化 gallery 与 bag
This commit is contained in:
parent
d8d0a529e5
commit
92693f9719
BIN
asset/art/ui/style_box/ui_gallery_item.png
Normal file
BIN
asset/art/ui/style_box/ui_gallery_item.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
34
asset/art/ui/style_box/ui_gallery_item.png.import
Normal file
34
asset/art/ui/style_box/ui_gallery_item.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bcwffsdtv8vq8"
|
||||||
|
path="res://.godot/imported/ui_gallery_item.png-45c2c6ede02b01fad4850965d9c07c65.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://asset/art/ui/style_box/ui_gallery_item.png"
|
||||||
|
dest_files=["res://.godot/imported/ui_gallery_item.png-45c2c6ede02b01fad4850965d9c07c65.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
|
@ -8,6 +8,7 @@ c02_杂物堆,杂物堵住了,,,,,
|
|||||||
prop_新鲜的肉,新鲜的肉,,,[#texture=c02/新鲜的肉.png],,
|
prop_新鲜的肉,新鲜的肉,,,[#texture=c02/新鲜的肉.png],,
|
||||||
c02_小蝉寻人启事_脸部破碎,寻人启事...画像和字迹都看不清。,,,,,
|
c02_小蝉寻人启事_脸部破碎,寻人启事...画像和字迹都看不清。,,,,,
|
||||||
小猫玩具发光,嗯?玩具在发光,,,,,
|
小猫玩具发光,嗯?玩具在发光,,,,,
|
||||||
|
setting_画册,画册(G),,,,,
|
||||||
index_新游戏,新游戏,,,,,New Game
|
index_新游戏,新游戏,,,,,New Game
|
||||||
index_继续游戏,继续游戏,,,,,Resume
|
index_继续游戏,继续游戏,,,,,Resume
|
||||||
index_退出游戏,退出游戏,,,,,Exit
|
index_退出游戏,退出游戏,,,,,Exit
|
||||||
@ -20,9 +21,11 @@ setting_窗口置顶,窗口置顶,,,,,Top Window
|
|||||||
setting_自动保存,自动保存,,,,,Auto Save
|
setting_自动保存,自动保存,,,,,Auto Save
|
||||||
setting_主界面,回到主界面,,,,,Back to Menu
|
setting_主界面,回到主界面,,,,,Back to Menu
|
||||||
setting_退出,保存并退出,,,,,Save & Exit
|
setting_退出,保存并退出,,,,,Save & Exit
|
||||||
setting_日志,日志(B),,,,,Open the Log
|
setting_日志,笔记(B),,,,,Open the Log
|
||||||
setting_画册,画册(G),,,,,
|
setting_记忆,记忆(G),,,,,
|
||||||
ui_秒,秒,,,,,S
|
ui_秒,秒,,,,,S
|
||||||
|
bag_tab_日志,笔记,,,,,
|
||||||
|
bag_tab_记忆,记忆,,,,,
|
||||||
ui_saved_all,已保存所有数据,,,,,All the data have been saved
|
ui_saved_all,已保存所有数据,,,,,All the data have been saved
|
||||||
ui_new_archive,已创建新存档,,,,,A new archive has been created
|
ui_new_archive,已创建新存档,,,,,A new archive has been created
|
||||||
ui_auto_saved,自动保存成功,,,,,Auto save successful
|
ui_auto_saved,自动保存成功,,,,,Auto save successful
|
||||||
|
|
@ -13,10 +13,13 @@
|
|||||||
自动保存[ID:setting_自动保存]
|
自动保存[ID:setting_自动保存]
|
||||||
回到主界面[ID:setting_主界面]
|
回到主界面[ID:setting_主界面]
|
||||||
保存并退出[ID:setting_退出]
|
保存并退出[ID:setting_退出]
|
||||||
日志(B)[ID:setting_日志]
|
笔记(B)[ID:setting_日志]
|
||||||
画册(G)[ID:setting_画册]
|
记忆(G)[ID:setting_记忆]
|
||||||
秒 [ID:ui_秒]
|
秒 [ID:ui_秒]
|
||||||
|
|
||||||
|
笔记[ID:bag_tab_日志]
|
||||||
|
记忆[ID:bag_tab_记忆]
|
||||||
|
|
||||||
已保存所有数据 [ID:ui_saved_all]
|
已保存所有数据 [ID:ui_saved_all]
|
||||||
已创建新存档 [ID:ui_new_archive]
|
已创建新存档 [ID:ui_new_archive]
|
||||||
自动保存成功 [ID:ui_auto_saved]
|
自动保存成功 [ID:ui_auto_saved]
|
||||||
|
58
config/gallery_item_theme.tres
Normal file
58
config/gallery_item_theme.tres
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
[gd_resource type="Theme" load_steps=14 format=3 uid="uid://ro8r1wa1bvua"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bcwffsdtv8vq8" path="res://asset/art/ui/style_box/ui_gallery_item.png" id="1_yv50c"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://dr8bp6p7byb37" path="res://asset/font/字体/方正楷体简体.TTF" id="2_i3fde"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_f06v1"]
|
||||||
|
texture = ExtResource("1_yv50c")
|
||||||
|
modulate_color = Color(0.892756, 0.892756, 0.892756, 1)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_r77y1"]
|
||||||
|
texture = ExtResource("1_yv50c")
|
||||||
|
modulate_color = Color(0.783523, 0.783523, 0.783523, 1)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_508w1"]
|
||||||
|
texture = ExtResource("1_yv50c")
|
||||||
|
modulate_color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_adjiu"]
|
||||||
|
load_path = "res://.godot/imported/ui_gallery_item.png-45c2c6ede02b01fad4850965d9c07c65.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_vsh8q"]
|
||||||
|
texture = SubResource("CompressedTexture2D_adjiu")
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_aypwd"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_yv50c"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_i3fde"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_drjmf"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8mlms"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ai6wi"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
default_font = ExtResource("2_i3fde")
|
||||||
|
default_font_size = 9
|
||||||
|
Button/colors/font_color = Color(0, 0, 0, 1)
|
||||||
|
Button/styles/focus = SubResource("StyleBoxTexture_f06v1")
|
||||||
|
Button/styles/hover = SubResource("StyleBoxTexture_r77y1")
|
||||||
|
Button/styles/normal = SubResource("StyleBoxTexture_508w1")
|
||||||
|
Button/styles/pressed = SubResource("StyleBoxTexture_vsh8q")
|
||||||
|
Label/colors/font_color = Color(0, 0, 0, 1)
|
||||||
|
Label/constants/line_spacing = 1
|
||||||
|
Label/font_sizes/font_size = 8
|
||||||
|
PanelContainer/styles/panel = SubResource("StyleBoxEmpty_aypwd")
|
||||||
|
tab_btn/base_type = &"Button"
|
||||||
|
tab_btn/colors/font_color = Color(0, 0, 0, 1)
|
||||||
|
tab_btn/colors/font_disabled_color = Color(0, 0, 0, 1)
|
||||||
|
tab_btn/colors/font_focus_color = Color(0, 0, 0, 1)
|
||||||
|
tab_btn/colors/font_hover_color = Color(0, 0, 0, 1)
|
||||||
|
tab_btn/colors/font_pressed_color = Color(0, 0, 0, 1)
|
||||||
|
tab_btn/styles/disabled = SubResource("StyleBoxEmpty_yv50c")
|
||||||
|
tab_btn/styles/focus = SubResource("StyleBoxEmpty_i3fde")
|
||||||
|
tab_btn/styles/hover = SubResource("StyleBoxEmpty_drjmf")
|
||||||
|
tab_btn/styles/normal = SubResource("StyleBoxEmpty_8mlms")
|
||||||
|
tab_btn/styles/pressed = SubResource("StyleBoxEmpty_ai6wi")
|
@ -1,54 +0,0 @@
|
|||||||
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://ro8r1wa1bvua"]
|
|
||||||
|
|
||||||
[ext_resource type="FontFile" uid="uid://dr8bp6p7byb37" path="res://asset/font/字体/方正楷体简体.TTF" id="1_aypwd"]
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_f06v1"]
|
|
||||||
bg_color = Color(0.6, 0.6, 0.6, 0)
|
|
||||||
border_width_left = 1
|
|
||||||
border_width_top = 1
|
|
||||||
border_width_right = 1
|
|
||||||
border_width_bottom = 1
|
|
||||||
border_color = Color(1, 1, 1, 1)
|
|
||||||
border_blend = true
|
|
||||||
expand_margin_left = 1.0
|
|
||||||
expand_margin_top = 1.0
|
|
||||||
expand_margin_right = 1.0
|
|
||||||
expand_margin_bottom = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_508w1"]
|
|
||||||
bg_color = Color(0.6, 0.6, 0.6, 0)
|
|
||||||
border_width_left = 1
|
|
||||||
border_width_top = 1
|
|
||||||
border_width_right = 1
|
|
||||||
border_width_bottom = 1
|
|
||||||
border_color = Color(1, 1, 1, 1)
|
|
||||||
border_blend = true
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_aypwd"]
|
|
||||||
bg_color = Color(0.6, 0.6, 0.6, 0)
|
|
||||||
border_width_left = 1
|
|
||||||
border_width_top = 1
|
|
||||||
border_width_right = 1
|
|
||||||
border_width_bottom = 1
|
|
||||||
border_color = Color(0.196531, 0.0801087, 0.0529168, 1)
|
|
||||||
border_blend = true
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_r77y1"]
|
|
||||||
bg_color = Color(0.6, 0.6, 0.6, 0)
|
|
||||||
border_width_left = 1
|
|
||||||
border_width_top = 1
|
|
||||||
border_width_right = 1
|
|
||||||
border_width_bottom = 1
|
|
||||||
border_color = Color(0.74978, 0.74978, 0.74978, 1)
|
|
||||||
border_blend = true
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_aypwd"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
default_font = ExtResource("1_aypwd")
|
|
||||||
default_font_size = 9
|
|
||||||
Button/styles/focus = SubResource("StyleBoxFlat_f06v1")
|
|
||||||
Button/styles/hover = SubResource("StyleBoxFlat_508w1")
|
|
||||||
Button/styles/normal = SubResource("StyleBoxFlat_aypwd")
|
|
||||||
Button/styles/pressed = SubResource("StyleBoxFlat_r77y1")
|
|
||||||
PanelContainer/styles/panel = SubResource("StyleBoxEmpty_aypwd")
|
|
@ -4,7 +4,14 @@ extends CanvasLayer
|
|||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
layer = GlobalConfig.CANVAS_LAYER_GALLERY
|
layer = GlobalConfig.CANVAS_LAYER_GALLERY
|
||||||
SceneManager.toggle_pause_counter(true)
|
SceneManager.toggle_pause_counter(true)
|
||||||
$OpenSfx.play()
|
%OpenSfx.play()
|
||||||
|
%"物品".pressed.connect(_on_tab_pressed)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_tab_pressed():
|
||||||
|
SceneManager.toggle_pause_counter(false)
|
||||||
|
SceneManager.show_bag()
|
||||||
|
queue_free()
|
||||||
|
|
||||||
|
|
||||||
func _unhandled_input(event: InputEvent) -> void:
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://gfkdh8pqhixn"]
|
[gd_scene load_steps=9 format=3 uid="uid://gfkdh8pqhixn"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bt86ajx7nwnk3" path="res://scene/gallery/gallery.gd" id="1_mpm8n"]
|
[ext_resource type="Script" uid="uid://bt86ajx7nwnk3" path="res://scene/gallery/gallery.gd" id="1_mpm8n"]
|
||||||
[ext_resource type="AudioStream" uid="uid://dyjifofhdx25w" path="res://asset/audio/sfx/交互/打开背包.wav" id="2_kfxav"]
|
[ext_resource type="AudioStream" uid="uid://dyjifofhdx25w" path="res://asset/audio/sfx/交互/打开背包.wav" id="2_kfxav"]
|
||||||
[ext_resource type="PackedScene" uid="uid://du6jt6ae5ulvy" path="res://scene/gallery/gallery_item.tscn" id="2_m3ngl"]
|
[ext_resource type="PackedScene" uid="uid://du6jt6ae5ulvy" path="res://scene/gallery/gallery_item.tscn" id="2_m3ngl"]
|
||||||
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="3_cntvv"]
|
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="3_cntvv"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dkvuc5llqax6d" path="res://asset/art/scene/c02/s03_公寓一楼院子/肉铺门板.png" id="3_db1ov"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://ckd26q67hm7j0" path="res://scene/gallery/clips/clip1_偷听.tscn" id="3_ymhcd"]
|
[ext_resource type="PackedScene" uid="uid://ckd26q67hm7j0" path="res://scene/gallery/clips/clip1_偷听.tscn" id="3_ymhcd"]
|
||||||
|
[ext_resource type="Theme" uid="uid://ro8r1wa1bvua" path="res://config/gallery_item_theme.tres" id="4_bk3xr"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dsj3l0baqg1g7" path="res://asset/art/ui/小蝶笔记.png" id="4_cntvv"]
|
||||||
[ext_resource type="PackedScene" uid="uid://da4rposvvqo3d" path="res://scene/gallery/clips/clip2_疯子看井.tscn" id="7_cntvv"]
|
[ext_resource type="PackedScene" uid="uid://da4rposvvqo3d" path="res://scene/gallery/clips/clip2_疯子看井.tscn" id="7_cntvv"]
|
||||||
|
|
||||||
[node name="Gallery" type="CanvasLayer"]
|
[node name="Gallery" type="CanvasLayer"]
|
||||||
@ -13,6 +14,7 @@ process_mode = 3
|
|||||||
script = ExtResource("1_mpm8n")
|
script = ExtResource("1_mpm8n")
|
||||||
|
|
||||||
[node name="OpenSfx" type="AudioStreamPlayer" parent="."]
|
[node name="OpenSfx" type="AudioStreamPlayer" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
stream = ExtResource("2_kfxav")
|
stream = ExtResource("2_kfxav")
|
||||||
bus = &"game_sfx"
|
bus = &"game_sfx"
|
||||||
script = ExtResource("3_cntvv")
|
script = ExtResource("3_cntvv")
|
||||||
@ -24,102 +26,142 @@ anchor_right = 1.0
|
|||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
texture = ExtResource("3_db1ov")
|
theme = ExtResource("4_bk3xr")
|
||||||
expand_mode = 3
|
texture = ExtResource("4_cntvv")
|
||||||
|
expand_mode = 5
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
[node name="Control" type="Control" parent="BG"]
|
||||||
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 26.0
|
||||||
|
offset_top = -7.0
|
||||||
|
offset_right = 26.0
|
||||||
|
offset_bottom = 41.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_constants/margin_left = 50
|
|
||||||
theme_override_constants/margin_top = 50
|
|
||||||
theme_override_constants/margin_right = 50
|
|
||||||
theme_override_constants/margin_bottom = 50
|
|
||||||
|
|
||||||
[node name="GridContainer" type="GridContainer" parent="MarginContainer"]
|
[node name="物品" type="Button" parent="BG/Control"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
z_index = 200
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 92.0
|
||||||
|
offset_top = 43.0
|
||||||
|
offset_right = 142.0
|
||||||
|
offset_bottom = 83.0
|
||||||
|
theme = ExtResource("4_bk3xr")
|
||||||
|
theme_type_variation = &"tab_btn"
|
||||||
|
text = "bag_tab_日志"
|
||||||
|
flat = true
|
||||||
|
|
||||||
|
[node name="回忆" type="Button" parent="BG/Control"]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 137.0
|
||||||
|
offset_top = 42.0
|
||||||
|
offset_right = 187.0
|
||||||
|
offset_bottom = 82.0
|
||||||
|
theme = ExtResource("4_bk3xr")
|
||||||
|
theme_type_variation = &"tab_btn"
|
||||||
|
disabled = true
|
||||||
|
text = "bag_tab_记忆"
|
||||||
|
flat = true
|
||||||
|
|
||||||
|
[node name="GridContainer" type="GridContainer" parent="BG/Control"]
|
||||||
z_index = 10
|
z_index = 10
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
columns = 4
|
offset_left = 90.0
|
||||||
|
offset_top = 73.0
|
||||||
|
offset_right = 244.0
|
||||||
|
offset_bottom = 293.0
|
||||||
|
columns = 2
|
||||||
|
|
||||||
[node name="GalleryItem" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem" parent="BG/Control/GridContainer" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("3_ymhcd")
|
packed_scene = ExtResource("3_ymhcd")
|
||||||
title = "g_偷听对话"
|
title = "g_偷听对话"
|
||||||
|
|
||||||
[node name="GalleryItem2" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem2" parent="BG/Control/GridContainer" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("7_cntvv")
|
packed_scene = ExtResource("7_cntvv")
|
||||||
title = "g_疯子看井"
|
title = "g_疯子看井"
|
||||||
|
|
||||||
[node name="GalleryItem3" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem3" parent="BG/Control/GridContainer" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("3_ymhcd")
|
packed_scene = ExtResource("3_ymhcd")
|
||||||
title = "g_偷听对话"
|
title = "g_偷听对话"
|
||||||
|
|
||||||
[node name="GalleryItem4" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem4" parent="BG/Control/GridContainer" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("7_cntvv")
|
packed_scene = ExtResource("7_cntvv")
|
||||||
title = "g_疯子看井"
|
title = "g_疯子看井"
|
||||||
|
|
||||||
[node name="GalleryItem5" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem5" parent="BG/Control/GridContainer" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("3_ymhcd")
|
packed_scene = ExtResource("3_ymhcd")
|
||||||
title = "g_偷听对话"
|
title = "g_偷听对话"
|
||||||
|
|
||||||
[node name="GalleryItem6" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem6" parent="BG/Control/GridContainer" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("7_cntvv")
|
packed_scene = ExtResource("7_cntvv")
|
||||||
title = "g_疯子看井"
|
title = "g_疯子看井"
|
||||||
|
|
||||||
[node name="GalleryItem7" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem7" parent="BG/Control/GridContainer" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("3_ymhcd")
|
packed_scene = ExtResource("3_ymhcd")
|
||||||
title = "g_偷听对话"
|
title = "g_偷听对话"
|
||||||
|
|
||||||
[node name="GalleryItem8" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem8" parent="BG/Control/GridContainer" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("7_cntvv")
|
packed_scene = ExtResource("7_cntvv")
|
||||||
title = "g_疯子看井"
|
title = "g_疯子看井"
|
||||||
|
|
||||||
[node name="GalleryItem9" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GridContainer2" type="GridContainer" parent="BG/Control"]
|
||||||
|
z_index = 10
|
||||||
|
layout_mode = 2
|
||||||
|
offset_left = 268.0
|
||||||
|
offset_top = 74.0
|
||||||
|
offset_right = 422.0
|
||||||
|
offset_bottom = 294.0
|
||||||
|
columns = 2
|
||||||
|
|
||||||
|
[node name="GalleryItem" parent="BG/Control/GridContainer2" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("3_ymhcd")
|
packed_scene = ExtResource("3_ymhcd")
|
||||||
title = "g_偷听对话"
|
title = "g_偷听对话"
|
||||||
|
|
||||||
[node name="GalleryItem10" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem2" parent="BG/Control/GridContainer2" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("7_cntvv")
|
packed_scene = ExtResource("7_cntvv")
|
||||||
title = "g_疯子看井"
|
title = "g_疯子看井"
|
||||||
|
|
||||||
[node name="GalleryItem11" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem3" parent="BG/Control/GridContainer2" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("3_ymhcd")
|
packed_scene = ExtResource("3_ymhcd")
|
||||||
title = "g_偷听对话"
|
title = "g_偷听对话"
|
||||||
|
|
||||||
[node name="GalleryItem12" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem4" parent="BG/Control/GridContainer2" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("7_cntvv")
|
packed_scene = ExtResource("7_cntvv")
|
||||||
title = "g_疯子看井"
|
title = "g_疯子看井"
|
||||||
|
|
||||||
[node name="GalleryItem13" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem5" parent="BG/Control/GridContainer2" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("3_ymhcd")
|
packed_scene = ExtResource("3_ymhcd")
|
||||||
title = "g_偷听对话"
|
title = "g_偷听对话"
|
||||||
|
|
||||||
[node name="GalleryItem14" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem6" parent="BG/Control/GridContainer2" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("7_cntvv")
|
packed_scene = ExtResource("7_cntvv")
|
||||||
title = "g_疯子看井"
|
title = "g_疯子看井"
|
||||||
|
|
||||||
[node name="GalleryItem15" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem7" parent="BG/Control/GridContainer2" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("3_ymhcd")
|
packed_scene = ExtResource("3_ymhcd")
|
||||||
title = "g_偷听对话"
|
title = "g_偷听对话"
|
||||||
|
|
||||||
[node name="GalleryItem16" parent="MarginContainer/GridContainer" instance=ExtResource("2_m3ngl")]
|
[node name="GalleryItem8" parent="BG/Control/GridContainer2" instance=ExtResource("2_m3ngl")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
packed_scene = ExtResource("7_cntvv")
|
packed_scene = ExtResource("7_cntvv")
|
||||||
title = "g_疯子看井"
|
title = "g_疯子看井"
|
||||||
|
@ -43,9 +43,9 @@ func _reload_scene(add_to_card:=true):
|
|||||||
current_scene = packed_scene.instantiate()
|
current_scene = packed_scene.instantiate()
|
||||||
if add_to_card:
|
if add_to_card:
|
||||||
scene_holder.add_child(current_scene)
|
scene_holder.add_child(current_scene)
|
||||||
current_scene.scale = Vector2.ONE / 6.0
|
current_scene.scale = Vector2.ONE * 0.125 # 1/8
|
||||||
# 防止看到上边缘黑边
|
# 防止看到上边缘黑边
|
||||||
current_scene.position = Vector2(0, -7)
|
current_scene.position = Vector2(0, -4.75)
|
||||||
|
|
||||||
|
|
||||||
func _on_toggle_hover(focus: bool):
|
func _on_toggle_hover(focus: bool):
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
[gd_scene load_steps=4 format=3 uid="uid://du6jt6ae5ulvy"]
|
[gd_scene load_steps=4 format=3 uid="uid://du6jt6ae5ulvy"]
|
||||||
|
|
||||||
[ext_resource type="Theme" uid="uid://ro8r1wa1bvua" path="res://config/gallery_theme.tres" id="1_2f468"]
|
[ext_resource type="Theme" uid="uid://ro8r1wa1bvua" path="res://config/gallery_item_theme.tres" id="1_2f468"]
|
||||||
[ext_resource type="Script" uid="uid://bk8ton7q8i6hb" path="res://scene/gallery/gallery_item.gd" id="1_2q576"]
|
[ext_resource type="Script" uid="uid://bk8ton7q8i6hb" path="res://scene/gallery/gallery_item.gd" id="1_2q576"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cbql1i4hblmt1" path="res://asset/art/ui/prop/特写通用遮罩.png" id="3_wb2ol"]
|
[ext_resource type="Texture2D" uid="uid://cbql1i4hblmt1" path="res://asset/art/ui/prop/特写通用遮罩.png" id="3_wb2ol"]
|
||||||
|
|
||||||
[node name="GalleryItem" type="PanelContainer"]
|
[node name="GalleryItem" type="PanelContainer"]
|
||||||
offset_right = 96.0
|
offset_right = 75.0
|
||||||
offset_bottom = 56.0
|
offset_bottom = 46.0
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
theme = ExtResource("1_2f468")
|
theme = ExtResource("1_2f468")
|
||||||
script = ExtResource("1_2q576")
|
script = ExtResource("1_2q576")
|
||||||
|
|
||||||
[node name="VBox" type="VBoxContainer" parent="."]
|
[node name="VBox" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 0
|
||||||
|
|
||||||
[node name="SceneButton" type="Button" parent="VBox"]
|
[node name="SceneButton" type="Button" parent="VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(96, 41)
|
custom_minimum_size = Vector2(75.5, 37)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="SceneHolder" type="Control" parent="VBox/SceneButton"]
|
[node name="SceneHolder" type="Control" parent="VBox/SceneButton"]
|
||||||
@ -24,17 +25,19 @@ unique_name_in_owner = true
|
|||||||
show_behind_parent = true
|
show_behind_parent = true
|
||||||
clip_children = 1
|
clip_children = 1
|
||||||
clip_contents = true
|
clip_contents = true
|
||||||
|
custom_minimum_size = Vector2(70.5, 30)
|
||||||
anchors_preset = 0
|
anchors_preset = 0
|
||||||
offset_left = 1.0
|
offset_left = 2.5
|
||||||
offset_top = 1.0
|
offset_top = 2.5
|
||||||
offset_right = 95.0
|
offset_right = 73.0
|
||||||
offset_bottom = 40.0
|
offset_bottom = 32.5
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
|
||||||
[node name="Title" type="Label" parent="VBox"]
|
[node name="Title" type="Label" parent="VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
|
text = "title"
|
||||||
|
|
||||||
[node name="DisplayLayer" type="CanvasLayer" parent="VBox"]
|
[node name="DisplayLayer" type="CanvasLayer" parent="VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
extends Panel
|
extends CanvasLayer
|
||||||
|
|
||||||
@onready var buttons_vbox = %ButtonsVBox as VBoxContainer
|
@onready var buttons_vbox = %ButtonsVBox as VBoxContainer
|
||||||
@onready var texture_rect = %TextureRect as TextureRect
|
@onready var texture_rect = %TextureRect as TextureRect
|
||||||
@ -6,10 +6,17 @@ extends Panel
|
|||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
get_parent().layer = GlobalConfig.CANVAS_LAYER_BAG
|
layer = GlobalConfig.CANVAS_LAYER_BAG
|
||||||
SceneManager.toggle_pause_counter(true)
|
SceneManager.toggle_pause_counter(true)
|
||||||
_load_item_buttons()
|
_load_item_buttons()
|
||||||
$OpenBagSfx.play()
|
%OpenBagSfx.play()
|
||||||
|
%"回忆".pressed.connect(_on_tab_pressed)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_tab_pressed():
|
||||||
|
SceneManager.toggle_pause_counter(false)
|
||||||
|
SceneManager.show_gallery()
|
||||||
|
queue_free()
|
||||||
|
|
||||||
|
|
||||||
func _load_item_buttons() -> void:
|
func _load_item_buttons() -> void:
|
||||||
@ -41,7 +48,6 @@ func _load_item_buttons() -> void:
|
|||||||
# # _display_item(inventory.important_items[0])
|
# # _display_item(inventory.important_items[0])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _display_item(prop_key, button):
|
func _display_item(prop_key, button):
|
||||||
var hud = SceneManager.get_prop_hud()
|
var hud = SceneManager.get_prop_hud()
|
||||||
if not hud:
|
if not hud:
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://b6gbolo1o7wdf"]
|
[gd_scene load_steps=9 format=3 uid="uid://b6gbolo1o7wdf"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cg7wdaw03bovq" path="res://scene/prop/prop_bag.gd" id="1_f3hpu"]
|
[ext_resource type="Script" uid="uid://cg7wdaw03bovq" path="res://scene/prop/prop_bag.gd" id="1_f3hpu"]
|
||||||
|
[ext_resource type="Theme" uid="uid://ro8r1wa1bvua" path="res://config/gallery_item_theme.tres" id="1_rvhvk"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dsj3l0baqg1g7" path="res://asset/art/ui/小蝶笔记.png" id="2_3s314"]
|
[ext_resource type="Texture2D" uid="uid://dsj3l0baqg1g7" path="res://asset/art/ui/小蝶笔记.png" id="2_3s314"]
|
||||||
[ext_resource type="AudioStream" uid="uid://dyjifofhdx25w" path="res://asset/audio/sfx/交互/打开背包.wav" id="2_xo6jf"]
|
[ext_resource type="AudioStream" uid="uid://dyjifofhdx25w" path="res://asset/audio/sfx/交互/打开背包.wav" id="2_xo6jf"]
|
||||||
[ext_resource type="PackedScene" uid="uid://wxd25ec3cqyy" path="res://scene/prop/prop_bag_button.tscn" id="3_wlvs1"]
|
[ext_resource type="PackedScene" uid="uid://wxd25ec3cqyy" path="res://scene/prop/prop_bag_button.tscn" id="3_wlvs1"]
|
||||||
@ -13,17 +14,19 @@ bg_color = Color(0.6, 0.6, 0.6, 0)
|
|||||||
|
|
||||||
[node name="PropBag" type="CanvasLayer"]
|
[node name="PropBag" type="CanvasLayer"]
|
||||||
process_mode = 3
|
process_mode = 3
|
||||||
|
script = ExtResource("1_f3hpu")
|
||||||
|
|
||||||
[node name="Bag" type="Panel" parent="."]
|
[node name="OpenBagSfx" type="AudioStreamPlayer" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
stream = ExtResource("2_xo6jf")
|
||||||
|
|
||||||
|
[node name="Bag" type="Control" parent="."]
|
||||||
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
script = ExtResource("1_f3hpu")
|
|
||||||
|
|
||||||
[node name="OpenBagSfx" type="AudioStreamPlayer" parent="Bag"]
|
|
||||||
stream = ExtResource("2_xo6jf")
|
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="Bag"]
|
[node name="TextureRect" type="TextureRect" parent="Bag"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
@ -39,6 +42,30 @@ texture = ExtResource("2_3s314")
|
|||||||
expand_mode = 5
|
expand_mode = 5
|
||||||
stretch_mode = 2
|
stretch_mode = 2
|
||||||
|
|
||||||
|
[node name="物品" type="Button" parent="Bag"]
|
||||||
|
z_index = 100
|
||||||
|
offset_left = 112.0
|
||||||
|
offset_top = 39.0
|
||||||
|
offset_right = 162.0
|
||||||
|
offset_bottom = 79.0
|
||||||
|
theme = ExtResource("1_rvhvk")
|
||||||
|
theme_type_variation = &"tab_btn"
|
||||||
|
disabled = true
|
||||||
|
text = "bag_tab_日志"
|
||||||
|
flat = true
|
||||||
|
|
||||||
|
[node name="回忆" type="Button" parent="Bag"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
z_index = 200
|
||||||
|
offset_left = 157.0
|
||||||
|
offset_top = 38.0
|
||||||
|
offset_right = 207.0
|
||||||
|
offset_bottom = 78.0
|
||||||
|
theme = ExtResource("1_rvhvk")
|
||||||
|
theme_type_variation = &"tab_btn"
|
||||||
|
text = "bag_tab_记忆"
|
||||||
|
flat = true
|
||||||
|
|
||||||
[node name="ScrollContainer" type="ScrollContainer" parent="Bag"]
|
[node name="ScrollContainer" type="ScrollContainer" parent="Bag"]
|
||||||
custom_minimum_size = Vector2(120, 160)
|
custom_minimum_size = Vector2(120, 160)
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
@ -75,18 +102,19 @@ text = "示例按钮"
|
|||||||
[node name="DisplayVBox" type="VBoxContainer" parent="Bag"]
|
[node name="DisplayVBox" type="VBoxContainer" parent="Bag"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 300.0
|
offset_left = 300.0
|
||||||
offset_top = 64.0
|
offset_top = 61.0
|
||||||
offset_right = 440.0
|
offset_right = 440.0
|
||||||
offset_bottom = 248.0
|
offset_bottom = 255.0
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="Bag/DisplayVBox"]
|
[node name="TextureRect" type="TextureRect" parent="Bag/DisplayVBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(100, 100)
|
custom_minimum_size = Vector2(100, 100)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 0
|
||||||
texture = ExtResource("4_wlvs1")
|
texture = ExtResource("4_wlvs1")
|
||||||
expand_mode = 3
|
expand_mode = 5
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="Content" type="TextEdit" parent="Bag/DisplayVBox"]
|
[node name="Content" type="TextEdit" parent="Bag/DisplayVBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
@ -252,4 +252,4 @@ focus_neighbor_left = NodePath("../DiaryBtn")
|
|||||||
focus_neighbor_top = NodePath("../../../HBoxContainer3/ExitBtn")
|
focus_neighbor_top = NodePath("../../../HBoxContainer3/ExitBtn")
|
||||||
focus_next = NodePath("../../../HBoxContainer/HSliderMasterBus")
|
focus_next = NodePath("../../../HBoxContainer/HSliderMasterBus")
|
||||||
focus_previous = NodePath("../DiaryBtn")
|
focus_previous = NodePath("../DiaryBtn")
|
||||||
text = "setting_画册"
|
text = "setting_记忆"
|
||||||
|
Loading…
Reference in New Issue
Block a user