-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this PR adds click support to listeners. Click is a new event type (like pointer down, pointer move). It encompasses two stages (pointer down + pointer up) in the same object or group of objects that belong to the listener. It processes all the phases of a click gesture this PR also: - guarantees that the click gesture is applied only once per frame (no double actions from overlapping shapes) - supports starting the click gesture in one shape and ending it in another shape of the same listener (by promoting the hover state to the group and not on individual shapes) Diffs= 405ca998b add click event support (#7668) Co-authored-by: hernan <[email protected]>
- Loading branch information
Showing
7 changed files
with
316 additions
and
37 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 |
---|---|---|
@@ -1 +1 @@ | ||
4732c37b5e8afae84ec54d662682380598292ac3 | ||
405ca998b7729cb4f84448fe681e9c4a82243099 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef _RIVE_GESTURE_CLICK_PHASE_HPP_ | ||
#define _RIVE_GESTURE_CLICK_PHASE_HPP_ | ||
namespace rive | ||
{ | ||
enum class GestureClickPhase : int | ||
{ | ||
out = 0, | ||
down = 1, | ||
clicked = 2, | ||
}; | ||
} | ||
#endif |
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ enum class ListenerType : int | |
up = 3, | ||
move = 4, | ||
event = 5, | ||
click = 6, | ||
}; | ||
} | ||
#endif |
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
Binary file not shown.
Oops, something went wrong.