Is it possible to use the mouse wheel to scroll up and down in the 1.5 Inventory List example?

thanawat

New member
After searching I did not find anyone using the mouse to scroll up and down in the inventory list.
I am wondering Is it possible or do I have to implement it myself?

Thank you.
 

Attachments

  • m.png
    m.png
    184.9 KB · Views: 6
Unfortunatly that is not something we implemented.
A small hack would be to set the scroll input as the input to move up and down in the Standard UI Input Module.

But you'd probably want to add it yourself in code.
You will be interested in the GridNavigatorBase, GridNavigatorWithScrollView and/or GridNavigatorWithScrollbar classes. You can override one of those.

Another option is to simply use the Unity Built-in scrollview instead of our custom one. Ours is more performant if your inventory has a lot of items because we recycle the ItemViewSlots. But I've seen people use the Built-in scroll view Rect because they liked the extra options for elasticity and didn't care about recycling the item view slots because their list was never going to be very long.
 
Top