-
-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This test verifies how FP handles focus changes on mouse clicks.
- Loading branch information
1 parent
516e10a
commit cc70686
Showing
5 changed files
with
100 additions
and
0 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,34 @@ | ||
[ | ||
{ "type": "MouseMove", "pos": [5, 5] }, | ||
{ "type": "MouseDown", "pos": [5, 5], "btn": "Left" }, { "type": "MouseUp", "pos": [5, 5], "btn": "Left" }, | ||
|
||
{ "type": "MouseMove", "pos": [70, 175] }, | ||
{ "type": "MouseDown", "pos": [70, 175], "btn": "Left" }, { "type": "MouseUp", "pos": [70, 175], "btn": "Left" }, | ||
{ "type": "MouseMove", "pos": [5, 5] }, | ||
{ "type": "MouseDown", "pos": [5, 5], "btn": "Left" }, { "type": "MouseUp", "pos": [5, 5], "btn": "Left" }, | ||
|
||
{ "type": "MouseMove", "pos": [230, 175] }, | ||
{ "type": "MouseDown", "pos": [230, 175], "btn": "Left" }, { "type": "MouseUp", "pos": [230, 175], "btn": "Left" }, | ||
{ "type": "MouseMove", "pos": [5, 5] }, | ||
{ "type": "MouseDown", "pos": [5, 5], "btn": "Left" }, { "type": "MouseUp", "pos": [5, 5], "btn": "Left" }, | ||
|
||
{ "type": "MouseMove", "pos": [360, 190] }, | ||
{ "type": "MouseDown", "pos": [360, 190], "btn": "Left" }, { "type": "MouseUp", "pos": [360, 190], "btn": "Left" }, | ||
{ "type": "MouseMove", "pos": [5, 5] }, | ||
{ "type": "MouseDown", "pos": [5, 5], "btn": "Left" }, { "type": "MouseUp", "pos": [5, 5], "btn": "Left" }, | ||
|
||
{ "type": "MouseMove", "pos": [360, 190] }, | ||
{ "type": "MouseDown", "pos": [360, 190], "btn": "Left" }, { "type": "MouseUp", "pos": [360, 190], "btn": "Left" }, | ||
{ "type": "MouseMove", "pos": [230, 175] }, | ||
{ "type": "MouseDown", "pos": [230, 175], "btn": "Left" }, { "type": "MouseUp", "pos": [230, 175], "btn": "Left" }, | ||
|
||
{ "type": "MouseMove", "pos": [360, 190] }, | ||
{ "type": "MouseDown", "pos": [360, 190], "btn": "Left" }, { "type": "MouseUp", "pos": [360, 190], "btn": "Left" }, | ||
{ "type": "MouseMove", "pos": [70, 175] }, | ||
{ "type": "MouseDown", "pos": [70, 175], "btn": "Left" }, { "type": "MouseUp", "pos": [70, 175], "btn": "Left" }, | ||
|
||
{ "type": "MouseMove", "pos": [360, 190] }, | ||
{ "type": "MouseDown", "pos": [360, 190], "btn": "Left" }, { "type": "MouseUp", "pos": [360, 190], "btn": "Left" }, | ||
{ "type": "MouseMove", "pos": [360, 190] }, | ||
{ "type": "MouseDown", "pos": [360, 190], "btn": "Left" }, { "type": "MouseUp", "pos": [360, 190], "btn": "Left" } | ||
] |
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,45 @@ | ||
_level0.clip.onMouseDown | ||
_level0.clip.onMouseUp | ||
_level0.clip.onMouseDown | ||
_level0.clip.onPress | ||
_level0.clip.onMouseUp | ||
_level0.clip.onRelease | ||
_level0.clip.onMouseDown | ||
_level0.clip.onMouseUp | ||
_level0.clip.onMouseDown | ||
press | ||
_level0.button.onPress | ||
_level0.clip.onMouseUp | ||
release | ||
_level0.button.onRelease | ||
_level0.clip.onMouseDown | ||
_level0.clip.onMouseUp | ||
_level0.clip.onMouseDown | ||
Focus at: _level0.text | ||
_level0.clip.onMouseUp | ||
_level0.clip.onMouseDown | ||
Focus at: null | ||
_level0.clip.onMouseUp | ||
_level0.clip.onMouseDown | ||
Focus at: _level0.text | ||
_level0.clip.onMouseUp | ||
_level0.clip.onMouseDown | ||
Focus at: null | ||
press | ||
_level0.button.onPress | ||
_level0.clip.onMouseUp | ||
release | ||
_level0.button.onRelease | ||
_level0.clip.onMouseDown | ||
Focus at: _level0.text | ||
_level0.clip.onMouseUp | ||
_level0.clip.onMouseDown | ||
Focus at: null | ||
_level0.clip.onPress | ||
_level0.clip.onMouseUp | ||
_level0.clip.onRelease | ||
_level0.clip.onMouseDown | ||
Focus at: _level0.text | ||
_level0.clip.onMouseUp | ||
_level0.clip.onMouseDown | ||
_level0.clip.onMouseUp |
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,20 @@ | ||
var listener = new Object(); | ||
listener.onSetFocus = function(oldFocus, newFocus) { | ||
trace("Focus at: " + newFocus); | ||
}; | ||
Selection.addListener(listener); | ||
|
||
function setHandlers(obj) { | ||
obj.onRelease = function () { trace(obj + ".onRelease"); } | ||
obj.onKeyDown = function () { trace(obj + ".onKeyDown"); } | ||
obj.onKeyUp = function () { trace(obj + ".onKeyUp"); } | ||
obj.onPress = function () { trace(obj + ".onPress"); } | ||
obj.onReleaseOutside = function () { trace(obj + ".onReleaseOutside"); } | ||
obj.onMouseDown = function () { trace(obj + ".onMouseDown") } | ||
obj.onMouseUp = function () { trace(obj + ".onMouseUp") } | ||
} | ||
|
||
clip.focusEnabled = true; | ||
setHandlers(clip); | ||
setHandlers(button); | ||
setHandlers(text); |
Binary file not shown.
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 @@ | ||
num_ticks = 1 |