Interface MKCHandledScreen.DragMode

Enclosing class:
MKCHandledScreen

public static interface MKCHandledScreen.DragMode
A custom drag behavior for MenuKit slots. The screen dispatches drag events to the active mode. Only one mode is active at a time.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the mouse moves over a new slot during a drag.
    void
    Called when the mouse button is released, ending the drag.
    boolean
    onDragStart(MKCSlot slot, int button)
    Called when a drag starts on a MKCSlot.
  • Method Details

    • onDragStart

      boolean onDragStart(MKCSlot slot, int button)
      Called when a drag starts on a MKCSlot. Return true to claim the drag (subsequent drag/end go to this mode).
    • onDrag

      void onDrag(MKCSlot slot)
      Called when the mouse moves over a new slot during a drag.
    • onDragEnd

      void onDragEnd()
      Called when the mouse button is released, ending the drag.