prop inspector prop_bg 逻辑
This commit is contained in:
parent
c3ca239518
commit
4b939173d2
@ -10,6 +10,7 @@ enum {
|
||||
|
||||
signal quit_and_hidden
|
||||
|
||||
@onready var mouse_mask = %MouseMask as Control
|
||||
@onready var notes_bg = %NotesBG as TextureRect
|
||||
@onready var prop_bg = %PropBG as TextureRect
|
||||
@onready var full_texture = %FullTexture as TextureRect
|
||||
@ -57,6 +58,7 @@ func _hide():
|
||||
quit_and_hidden.emit()
|
||||
hiding_tween = create_tween()
|
||||
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)
|
||||
if blinking_tween and blinking_tween.is_running():
|
||||
blinking_tween.kill()
|
||||
@ -69,7 +71,6 @@ func _post_hide():
|
||||
quit_and_hidden.emit()
|
||||
scroll_container.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
locking = false
|
||||
prop_bg.visible = false
|
||||
full_texture.texture = null
|
||||
texture_cover = null
|
||||
texture_notes = null
|
||||
@ -130,8 +131,10 @@ var locking = false:
|
||||
if val != locking:
|
||||
locking = val
|
||||
if val:
|
||||
mouse_mask.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
SceneManager.lock_player()
|
||||
else:
|
||||
mouse_mask.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
SceneManager.unlock_player()
|
||||
_lock_mutex.unlock()
|
||||
|
||||
@ -151,9 +154,9 @@ func pop_prop_inspection(
|
||||
status = STATUS_INSPECTING_PROP
|
||||
visible = true
|
||||
var tween = create_tween()
|
||||
prop_bg.visible = true
|
||||
full_texture.texture = cover_texture
|
||||
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 = ""
|
||||
tip_label.text = ""
|
||||
|
||||
|
@ -11,9 +11,19 @@ process_mode = 3
|
||||
layer = 21
|
||||
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="."]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
anchors_preset = 14
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
|
Loading…
Reference in New Issue
Block a user