Module: Carbuncle::Gesture
- Defined in:
- gems/carbuncle-input/mrblib/gesture.rb
Defined Under Namespace
Classes: Drag, Event, Hold, Pinch
Class Method Summary collapse
-
.double_tap? ⇒ Boolean
Checks if a double tap gesture is being done.
-
.drag? ⇒ Boolean
Checks if a drag gesture is being done.
-
.hold? ⇒ Boolean
Checks if a hold gesture is being done.
-
.pinch? ⇒ Boolean
Checks if any pinch gesture is being done.
-
.swipe? ⇒ Boolean
Checks if a swipe on any direction is done.
-
.swipe_down? ⇒ Boolean
Checks if a swipe gesture to the down is being done.
-
.swipe_left? ⇒ Boolean
Checks if a swipe gesture to the left is being done.
-
.swipe_right? ⇒ Boolean
Checks if a swipe gesture to the right is being done.
-
.swipe_up? ⇒ Boolean
Checks if a swipe gesture to the up is being done.
-
.tap? ⇒ Boolean
Checks if a tap gesture is being done.
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.
|
# 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.
|
# 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.
|
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 10
|
.pinch? ⇒ Boolean
Checks if any pinch gesture is being done
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.
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.
|
# 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.
|
# 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.
|
# 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.
|
# 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.
|
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 10
|