inventory refactor + inv ui interactable
This commit is contained in:
@@ -38,6 +38,18 @@ tracks/1/path = NodePath("CenterContainer/ItemTexture:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.033333335),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0.27058825, 0.27058825, 0.27058825, 1), Color(0.27058825, 0.27058825, 0.27058825, 1)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("CenterContainer/NoItemTextureRect:modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
@@ -71,6 +83,18 @@ tracks/1/keys = {
|
||||
"update": 0,
|
||||
"values": [Color(0.27022192, 0.27022192, 0.2702219, 1), Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("CenterContainer/NoItemTextureRect:modulate")
|
||||
tracks/2/interp = 2
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0.27022192, 0.27022192, 0.2702219, 1), Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_2wu2x"]
|
||||
_data = {
|
||||
@@ -114,6 +138,7 @@ layout_mode = 2
|
||||
[node name="NoItemTextureRect" type="TextureRect" parent="CenterContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
modulate = Color(0.27058825, 0.27058825, 0.27058825, 1)
|
||||
custom_minimum_size = Vector2(12, 12)
|
||||
layout_mode = 2
|
||||
texture = SubResource("GradientTexture2D_vgckh")
|
||||
@@ -142,3 +167,5 @@ stretch_mode = 4
|
||||
|
||||
[node name="BottomSpace" type="Control" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
|
||||
|
||||
@@ -3,6 +3,7 @@ class_name InventoryGuiItem
|
||||
|
||||
@export var no_item_texture_path : Texture2D
|
||||
|
||||
signal item_clicked()
|
||||
|
||||
const MODULATE_INSPECTED_COLOR = Color.GRAY
|
||||
|
||||
@@ -25,6 +26,10 @@ func _on_mouse_excited():
|
||||
if current_item:
|
||||
Pointer.stop_inspect(self)
|
||||
|
||||
func _on_gui_input(_event: InputEvent) -> void:
|
||||
if Input.is_action_just_pressed("action"):
|
||||
emit_signal("item_clicked")
|
||||
|
||||
func inspector_info() -> Inspector.Info:
|
||||
return current_item.inspector_info()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user