Skip to content

Commit

Permalink
refs #373: Improve and homogenize icon sizing when items enter invent…
Browse files Browse the repository at this point in the history
…ory.

- **fix**: Assign unique names to the **Up** and **Down** icons in the
  base **InventoryGrid** component.
  • Loading branch information
mapedorr committed Jan 22, 2025
1 parent 48f74cd commit 3c4cd64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ layout_mode = 2
theme_override_constants/separation = 0

[node name="Up" type="TextureButton" parent="ScrollButtons"]
unique_name_in_owner = true
texture_filter = 1
layout_mode = 2
size_flags_vertical = 3
Expand All @@ -64,6 +65,7 @@ texture_disabled = SubResource("AtlasTexture_73nr4")
stretch_mode = 3

[node name="Down" type="TextureButton" parent="ScrollButtons"]
unique_name_in_owner = true
texture_filter = 1
layout_mode = 2
size_flags_vertical = 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ func _on_tween_finished() -> void:
func _add_item(item: PopochiuInventoryItem, animate := true) -> void:
box.add_child(item)

item.custom_minimum_size.x = box.size.y
item.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN
item.size_flags_vertical = Control.SIZE_FILL
item.expand_mode = TextureRect.EXPAND_FIT_WIDTH

item.selected.connect(_change_cursor)

Expand Down

0 comments on commit 3c4cd64

Please sign in to comment.