Skip to content

Commit

Permalink
Add M2ColorSensor to handle color selection of pipette tool
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilian-franz committed May 20, 2021
1 parent df7ef62 commit d7fac98
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 11 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
instance creation
newWith: aTarget
^ (self basicNew
target: aTarget;
initialize)
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
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
target: aMorphicMonet
target := aMorphicMonet
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
target
^ target
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" } }
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" }
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
"isDefaultTool" : "mFr 5/6/2021 15:56",
"isDefaultTool:" : "mFr 5/6/2021 15:53",
"isM2MenuItemMorph" : "mFr 5/19/2021 09:04",
"isSelected:" : "ms 5/13/2021 19:21",
"mouseUp:" : "mFr 5/6/2021 15:30" } }
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
actionSelector
^ #chooseColor
^ #invokeColorSensor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
"actionSelector" : "mFr 5/19/2021 12:33",
"actionSelector" : "mFr 5/20/2021 22:34",
"icon" : "mFr 5/19/2021 10:51",
"isActivatable" : "mFr 5/19/2021 12:33",
"label" : "mFr 5/19/2021 12:33" },
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tooling
invokeColorSensor
M2ColorSensor newWith: self
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"canvas" : "mFr 5/19/2021 10:58",
"canvasPanel" : "mFr 5/19/2021 10:59",
"canvasPanel:" : "mFr 5/19/2021 10:59",
"chooseColor" : "mFr 5/19/2021 12:40",
"clearCanvas" : "mFr 5/19/2021 10:59",
"colorPalette" : "mFr 5/19/2021 10:59",
"colorPanel" : "mFr 5/19/2021 10:59",
Expand All @@ -32,6 +31,7 @@
"initializeMenuPanel" : "mFr 5/19/2021 11:01",
"initializePanels" : "mk 7/27/2020 20:16",
"initializeTopPanel" : "mFr 5/19/2021 11:01",
"invokeColorSensor" : "mFr 5/20/2021 22:34",
"loadCanvas" : "mFr 5/19/2021 11:01",
"loadMenu" : "mFr 5/19/2021 12:45",
"menuBrushCollection" : "mFr 5/14/2021 15:05",
Expand Down

0 comments on commit d7fac98

Please sign in to comment.