sigh This is another one of those questions where I don’t really know how to ask.
So, I have a function which creates invSlot widgets and stores them in an array called ‘Slots’ in the order in which they were created (see a part of it here:)
. Now in my invSlot user widget class I define that on a button press, (the button is part of my invSlot widget, see here:)
a custom event is triggered. Now this customEvent triggers my dropItem functions which remove an item from a given Index in my itemList array, but for this to work I of course need to provide it with an index. This is where my question lies, I tried this: (all of this is done in the invSlot base widget, just so its clear to what the self ref is pointing towards)
to find the slot on which I am currently pressing a button in the array of all of my slots so that the returned index is the index I can provide my other functions with, but it always just returns -1 as an index so I suppose something is not working there. So, how can I find the slotWidget on which I am currently pressing the button in an array with all of my created slotWidgets?
(any help would be extreeemely appreciated, may also be an alternative solution, if the question is unclear please ask, I will remain active on this post)
Thanks in advance