Closed QueenOfSquiggles closed 4 months ago
Having taken a deeper look into the code, I really admire the design of this. I really like using a common script for handling common features. I've figured out this less-than-ergonomic workaround for v2.4.7
@onready var inv := %InventoryGuiDisplay
# Load type for accessing signals
const CtrlInventoryGridBasic = preload("res://addons/gloot/ui/ctrl_inventory_grid_basic.gd")
func _ready() -> void:
await RenderingServer.frame_post_draw # needed only because this script readys before the inventory grid
var basic: CtrlInventoryGridBasic = inv._ctrl_inventory_grid_basic # technically accessing a private field
basic.selection_changed.connect(_on_selection) # connecting signals works as normal
Hi! The missing signals have been fixed in the meantime, it's just that the fix is not part of the 2.4.7 release. It will be included in 2.4.8, but you can also just take the latest changes from the master brach.
That's good to hear. I'll switch to the latest commit version ❤️
It looks like the code might be a bit off (unless I'm misunderstanding which is entirely possible).
CtrlInventoryGridEx
doesn't have signals such asselection_changed
like the documentation would suggest.I am really loving the customizeability of this plugin, but I would definitely want as much parity between
-Ex
and non-Ex
nodes as possible (without watering down the reason they are separated in the first place).