llms.txt: machine-readable documentation index. Markdown version of this page is also available.

Ninja Bear Studio Plugins Help

Build Tooltips and Drag-and-Drop

Let the player inspect an item and drag it to a new position using the same entry that displays its icon. Start with the item widget from the slot-based or spatial setup guide.

Show the selected item's details

  1. Create a tooltip based on the inventory item widget. Add a manual Inventory Item ViewModel and the fragment ViewModels for the values you want, such as the display name and stack size. Apply the same item-view bindings as the entry widget.

  2. When an occupied entry receives pointer or keyboard focus, create the tooltip for the owning player. Use Get View from User Widget on the tooltip and Set ViewModel by Class to pass it the entry's existing Inventory Item ViewModel. Show it as a tooltip or in a details panel.

  3. On mouse leave or focus loss, hide the tooltip. If you created a floating widget, remove it from its parent and clear the reference. When navigating with a controller, use On Added to Focus Path to show details for the newly focused entry.

Assigning the selected entry's ViewModel to a tooltip

Move an item between slots

  1. In the base item widget's Inventory settings, set Drag Widget Class to the widget that should follow the pointer. Your existing item widget works as a first visual. Leave Drag Drop Operation Class set to NinjaInventoryDragDropOperation.

  2. Give every destination slot its owning container and position, including empty slots. In a spatial backpack, use the reference cells for these targets. The operation can then check the destination, move the item, merge compatible stacks, or apply the layout's swap rules.

  3. For a world drop area, use NinjaInventoryDropZoneWidget or implement Inventory Drop Zone Widget Interface on your own widget and return the intended world position from GetDropLocationInWorldSpace. Configure the item's Drop Fragment and pickup class so an accepted drop creates the right pickup.

To add a custom combination, subclass NinjaInventoryDragDropOperation and select it in the item's Drag Drop Operation Class. Override EvaluateTargetItemOperation to recognize the pair. Use EvaluateOperation for a rule involving the destination widget, and PerformOperation for the accepted action. Delegate ordinary moves to the parent implementation so the same widget still handles regular slots.

Try It in Play

Hover over a bandage stack, then select it with a controller. Both should show the same quantity. Drag the stack to a free slot and then onto another partial bandage stack. Try dropping it on a lantern-only equipment slot. The bag should keep the bandages and their count when the destination rejects them.

25 November 2026