Displaying item properties on the InventoryGrid #74
-
Hi I'm trying to use InventoryGrid for my inventory system. My item protoset looks like this:
I want to display the stack_size using a RichTextLabel or similar positioned on the corner of the items in the CtrlInventoryGrid. I thought to add the modifications to ctrl_inventory_item_rect.gd. I added a new RichTextLabel var that gets instanced when the script is called and it is set and displayed in the _draw() function. Can someone please point me in the right direction? Thanks in advance. Attached is my changes to ctrl_inventory_item_rect.gd (that doesn't work). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I gave it a quick try and, strangely, replacing But you probably don't need to call I'll play around with it a bit more to figure out why |
Beta Was this translation helpful? Give feedback.
-
Ok, it seems like you need to set the Adding the following line to
|
Beta Was this translation helpful? Give feedback.
Ok, it seems like you need to set the
rect_min_size
for theRichTextLabel
as suggested here.Adding the following line to
_update_stack_size_label()
should do the trick: