prop inspector prop_bg 逻辑

This commit is contained in:
cakipaul 2025-07-30 19:13:50 +08:00
parent c3ca239518
commit 4b939173d2
2 changed files with 16 additions and 3 deletions

View File

@ -10,6 +10,7 @@ enum {
signal quit_and_hidden signal quit_and_hidden
@onready var mouse_mask = %MouseMask as Control
@onready var notes_bg = %NotesBG as TextureRect @onready var notes_bg = %NotesBG as TextureRect
@onready var prop_bg = %PropBG as TextureRect @onready var prop_bg = %PropBG as TextureRect
@onready var full_texture = %FullTexture as TextureRect @onready var full_texture = %FullTexture as TextureRect
@ -57,6 +58,7 @@ func _hide():
quit_and_hidden.emit() quit_and_hidden.emit()
hiding_tween = create_tween() hiding_tween = create_tween()
hiding_tween.parallel().tween_property(full_texture, "modulate:a", 0.0, 0.3) hiding_tween.parallel().tween_property(full_texture, "modulate:a", 0.0, 0.3)
hiding_tween.parallel().tween_property(prop_bg, "modulate:a", 0.0, 0.3)
hiding_tween.parallel().tween_property(content_label, "modulate:a", 0.0, 0.15) hiding_tween.parallel().tween_property(content_label, "modulate:a", 0.0, 0.15)
if blinking_tween and blinking_tween.is_running(): if blinking_tween and blinking_tween.is_running():
blinking_tween.kill() blinking_tween.kill()
@ -69,7 +71,6 @@ func _post_hide():
quit_and_hidden.emit() quit_and_hidden.emit()
scroll_container.mouse_filter = Control.MOUSE_FILTER_IGNORE scroll_container.mouse_filter = Control.MOUSE_FILTER_IGNORE
locking = false locking = false
prop_bg.visible = false
full_texture.texture = null full_texture.texture = null
texture_cover = null texture_cover = null
texture_notes = null texture_notes = null
@ -130,8 +131,10 @@ var locking = false:
if val != locking: if val != locking:
locking = val locking = val
if val: if val:
mouse_mask.mouse_filter = Control.MOUSE_FILTER_STOP
SceneManager.lock_player() SceneManager.lock_player()
else: else:
mouse_mask.mouse_filter = Control.MOUSE_FILTER_IGNORE
SceneManager.unlock_player() SceneManager.unlock_player()
_lock_mutex.unlock() _lock_mutex.unlock()
@ -151,9 +154,9 @@ func pop_prop_inspection(
status = STATUS_INSPECTING_PROP status = STATUS_INSPECTING_PROP
visible = true visible = true
var tween = create_tween() var tween = create_tween()
prop_bg.visible = true
full_texture.texture = cover_texture full_texture.texture = cover_texture
tween.tween_property(full_texture, "modulate:a", 1.0, 0.15) tween.tween_property(full_texture, "modulate:a", 1.0, 0.15)
tween.parallel().tween_property(prop_bg, "modulate:a", 1.0, 0.15)
content_label.text = "" content_label.text = ""
tip_label.text = "" tip_label.text = ""

View File

@ -11,9 +11,19 @@ process_mode = 3
layer = 21 layer = 21
script = ExtResource("1_2wpwe") script = ExtResource("1_2wpwe")
[node name="MouseMask" type="Control" parent="."]
unique_name_in_owner = true
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
mouse_filter = 2
[node name="PropBG" type="TextureRect" parent="."] [node name="PropBG" type="TextureRect" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
anchors_preset = 14 anchors_preset = 14
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 1.0 anchor_right = 1.0