Module: Carbuncle::Gesture

Defined in:
gems/carbuncle-input/mrblib/gesture.rb

Defined Under Namespace

Classes: Drag, Event, Hold, Pinch

Class Method Summary collapse

Class Method Details

.double_tap?Boolean

Checks if a double tap gesture is being done. A tap is a quick touch and lif on your screen.

Returns:

  • (Boolean)

See Also:



# File 'gems/carbuncle-input/mrblib/gesture.rb', line 10

.drag?Boolean

Checks if a drag gesture is being done. A drag actions is when the user holds and then moves the finger on the screen.

Returns:

  • (Boolean)


# File 'gems/carbuncle-input/mrblib/gesture.rb', line 10

.hold?Boolean

Checks if a hold gesture is being done. A hold action is when the screen is being touched without lifting from some time.

Returns:

  • (Boolean)


# File 'gems/carbuncle-input/mrblib/gesture.rb', line 10

.pinch?Boolean

Checks if any pinch gesture is being done

Returns:

  • (Boolean)


45
46
47
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 45

def pinch?
  pinch_in? || pinch_out?
end

.swipe?Boolean

Checks if a swipe on any direction is done. A swipe is when the user moves the finger quickly across a direction into the screen.

Returns:

  • (Boolean)


51
52
53
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 51

def swipe?
  swipe_right? || swipe_left? || swipe_up? || swipe_down?
end

.swipe_down?Boolean

Checks if a swipe gesture to the down is being done. A swipe is when the user moves the finger quickly across a direction into the screen.

Returns:

  • (Boolean)


# File 'gems/carbuncle-input/mrblib/gesture.rb', line 10

.swipe_left?Boolean

Checks if a swipe gesture to the left is being done. A swipe is when the user moves the finger quickly across a direction into the screen.

Returns:

  • (Boolean)


# File 'gems/carbuncle-input/mrblib/gesture.rb', line 10

.swipe_right?Boolean

Checks if a swipe gesture to the right is being done. A swipe is when the user moves the finger quickly across a direction into the screen.

Returns:

  • (Boolean)


# File 'gems/carbuncle-input/mrblib/gesture.rb', line 10

.swipe_up?Boolean

Checks if a swipe gesture to the up is being done. A swipe is when the user moves the finger quickly across a direction into the screen.

Returns:

  • (Boolean)


# File 'gems/carbuncle-input/mrblib/gesture.rb', line 10

.tap?Boolean

Checks if a tap gesture is being done. A tap is a quick touch and lif on your screen.

Returns:

  • (Boolean)


# File 'gems/carbuncle-input/mrblib/gesture.rb', line 10