Game Development Reference
In-Depth Information
The
Drag Handlers
events:
•
IInitializePotentialDragHandler
: This is the first point at which a
drag could be taking place
•
IBeginDragHandler
: This means a confirmed drag action has begun
•
IDragHandler
: This means a UI component is being dragged
(pointer down and cursor movement)
•
IEndDragHandler
: This means a dragged UI component has been released
(pointer released when dragging)
•
IDropHandler
: This is the same as end drag but without drag data
The
Miscellaneous
handler events:
•
IScrollHandler
: This occurs whenever scrolling is detected from an input
device; for example a mouse scroll wheel
•
IUpdateSelectedHandler
: This occurs when the selected UI control is
updated/changed
•
ISelectHandler
: This occurs when a UI control is selected/focused upon
•
IDeselectHandler
: This occurs when a UI control is unselected/loses focus
•
IMoveHandler
: This occurs whenever a controller moves
(uses
Input.GetAxis
)
•
ISubmitHandler
: This occurs whenever a
Submit
button is pressed
(default, the
Enter
key)
•
ICancelHandler
: This occurs whenever a
Submit
button is pressed
(default, the
Esc
key)
By using these interfaces in your scripts, you can automatically bind to these events
when they occur. Now that we know what's available, how do we use them?