-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add M2ColorSensor to handle color selection of pipette tool
- Loading branch information
1 parent
df7ef62
commit d7fac98
Showing
14 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
Empty file.
5 changes: 5 additions & 0 deletions
5
packages/SketchMorph2-Core.package/M2ColorSensor.class/class/newWith..st
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,5 @@ | ||
instance creation | ||
newWith: aTarget | ||
^ (self basicNew | ||
target: aTarget; | ||
initialize) |
7 changes: 7 additions & 0 deletions
7
packages/SketchMorph2-Core.package/M2ColorSensor.class/instance/initialize.st
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,7 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
self | ||
extent: 0 asPoint; | ||
openInWorld. | ||
self activeHand addMouseListener: self |
7 changes: 7 additions & 0 deletions
7
packages/SketchMorph2-Core.package/M2ColorSensor.class/instance/mouseUp..st
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,7 @@ | ||
event handling | ||
mouseUp: evt | ||
self target | ||
setColor: (Display colorAt: evt cursorPoint); | ||
activateDefaultItem. | ||
self activeHand removeMouseListener: self. | ||
self delete |
3 changes: 3 additions & 0 deletions
3
packages/SketchMorph2-Core.package/M2ColorSensor.class/instance/target..st
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,3 @@ | ||
accessing | ||
target: aMorphicMonet | ||
target := aMorphicMonet |
3 changes: 3 additions & 0 deletions
3
packages/SketchMorph2-Core.package/M2ColorSensor.class/instance/target.st
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,3 @@ | ||
accessing | ||
target | ||
^ target |
8 changes: 8 additions & 0 deletions
8
packages/SketchMorph2-Core.package/M2ColorSensor.class/methodProperties.json
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,8 @@ | ||
{ | ||
"class" : { | ||
"newWith:" : "mFr 5/20/2021 22:30" }, | ||
"instance" : { | ||
"initialize" : "mFr 5/20/2021 22:31", | ||
"mouseUp:" : "mFr 5/20/2021 22:29", | ||
"target" : "mFr 5/20/2021 22:27", | ||
"target:" : "mFr 5/20/2021 22:27" } } |
14 changes: 14 additions & 0 deletions
14
packages/SketchMorph2-Core.package/M2ColorSensor.class/properties.json
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 @@ | ||
{ | ||
"category" : "SketchMorph2-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"target" ], | ||
"name" : "M2ColorSensor", | ||
"pools" : [ | ||
], | ||
"super" : "Morph", | ||
"type" : "normal" } |
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
2 changes: 1 addition & 1 deletion
2
packages/SketchMorph2-Core.package/M2Pipette.class/class/actionSelector.st
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,3 +1,3 @@ | ||
accessing | ||
actionSelector | ||
^ #chooseColor | ||
^ #invokeColorSensor |
2 changes: 1 addition & 1 deletion
2
packages/SketchMorph2-Core.package/M2Pipette.class/methodProperties.json
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
7 changes: 0 additions & 7 deletions
7
packages/SketchMorph2-Core.package/MorphicMonet.class/instance/chooseColor.st
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
packages/SketchMorph2-Core.package/MorphicMonet.class/instance/invokeColorSensor.st
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,3 @@ | ||
tooling | ||
invokeColorSensor | ||
M2ColorSensor newWith: self |
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