Class: Toybox::WatchUi::ClickEvent

Inherits:
Lang::Object show all

Overview

ClickEvent is an object sent to InputDelegate there is tap interaction with a device's touch screen.

Examples:

using Toybox.System;
using Toybox.WatchUi;

class InputDelegate extends WatchUi.BehaviorDelegate {
    function onTap(clickEvent) {
        System.println(clickEvent.getCoordinates()); // e.g. [36, 40]
        System.println(clickEvent.getType());        // CLICK_TYPE_TAP = 0
        return true;
    }
}

See Also:

Since:

  • 1.0.0

Instance Method Summary collapse

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Instance Method Details

getCoordinatesToybox::Lang::Array

Get the coordinates of a click event.

Returns:

Since:

  • 1.0.0


11525
11526
# File 'Monkeybrains.rb', line 11525

def getCoordinates()
end

getTypeToybox::Lang::Number

Get the type of click event.

Returns:

Since:

  • 1.0.0


11532
11533
# File 'Monkeybrains.rb', line 11532

def getType()
end