Most visited

Recently visited

ClickListener

public interface ClickListener

com.viro.core.ClickListener


Callback interface for responding to click events, which occur when any Controller button is clicked.

Summary

Public methods

abstract void onClick(int source, Node node, Vector location)

Callback when a click event is registered over the given Node.

abstract void onClickState(int source, Node node, ClickState clickState, Vector location)

Callback when the ClickState is changed over the given Node.

Public methods

onClick

void onClick (int source, 
                Node node, 
                Vector location)

Callback when a click event is registered over the given Node.

Parameters
source int: The platform specific source ID, which indicates what button or component on the Controller triggered the event. See the Controller's Guide for information.

node Node: The Node that was clicked.

location Vector: The location of the event in world coordinates.

onClickState

void onClickState (int source, 
                Node node, 
                ClickState clickState, 
                Vector location)

Callback when the ClickState is changed over the given Node. This callback is for receiving fine-grained information about a click: when the pointer goes down, when it goes up, and if/when the 'click' itself is registered. For a completed click, this callback is invoked three times: on CLICK_DOWN, CLICK_UP, and then for CLICKED.

To simply listen for click events, use onClick(int, Node, Vector).

Parameters
source int: The platform specific source ID, which indicates what button or component on the Controller triggered the event. See the Controller's Guide for information.

node Node: The Node that was clicked.

clickState ClickState: The status of the click event.

location Vector: The location of the event in world coordinates.

Hooray!