tModLoader CustomSlot - Custom item slot wrapper using UIElement

abluescarab

Empress of Light
Hello, all! A lot of people have been asking me how I added custom slots in Wing Slot and my answer has always been that it's an outdated method they shouldn't use. The new method in tModLoader is using a UIElement wrapper around the ItemSlot class to draw your own slots, but I found this can be restrictive due to the nature of ItemSlot and confusing for new modders.

I would like to officially release my own ItemSlot wrapper! The features include the ability to:
  • Specify what items should go in the slot
  • Designate a partner slot to swap items between (like default vanity/equipment slots)
  • Force a toggle visibility button even on non-equipment slots
  • Specify your own text on hovering over the slot
  • Use your own texture when the slot is empty
  • Change the slot size and background texture
You can find these files at the GitHub repository (adf.ly) (direct). Follow the instructions there to add them to your projects, and please use the issues section on the repo to report any problems or make suggestions.

  • Items with multiple colors display in gray
 
Back
Top Bottom