I'm coding a data based game, where I need to be able to display objects and rearrange them to the user's whim but still be able to call their methods and resources. I have a big ItemList I populate with an array of objects, but I rearrange them with different criteria (alphabetically, for example), but the ItemList only holds a String so when they're rearranged their IDs shift.
I figured the simplest way to do this would be to have a custom ItemList where:
a) I store two values, the object id and the String, or
b) I store a reference to the object and display a string with a method call
but I'm having issues finding in the documentation how to extend the class and which methods I need to override or what property holds the display values. Is there a way to do this or am I missing a simpler answer that's supported in GDScript without having to do this extension in the first place?