-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
427f2cc
commit 9eb7390
Showing
5 changed files
with
114 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class_name InputEventMultiScreenLongPress | ||
extends InputEventAction | ||
|
||
var position : Vector2 | ||
var fingers : int | ||
var raw_gesture : RawGesture | ||
|
||
func _init(_raw_gesture : RawGesture = null) -> void: | ||
raw_gesture = _raw_gesture | ||
if raw_gesture: | ||
fingers = raw_gesture.size() | ||
position = raw_gesture.centroid("presses", "position") | ||
|
||
func as_text() -> String: | ||
return "position=" + str(position) + "|fingers=" + str(fingers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class_name InputEventSingleScreenLongPress | ||
extends InputEventAction | ||
|
||
var position : Vector2 | ||
var raw_gesture : RawGesture | ||
|
||
func _init(_raw_gesture : RawGesture = null) -> void: | ||
raw_gesture = _raw_gesture | ||
if raw_gesture: | ||
position = raw_gesture.presses[0].position | ||
|
||
|
||
func as_text() -> String: | ||
return "position=" + str(position) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.