Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-ct.408.mcz==================== Summary ====================
Name: EToys-ct.408
Author: ct
Time: 17 September 2020, 12:48:54.350813 pm
UUID: c530407c-bee4-a54c-8781-1ba7af10c1c1
Ancestors: EToys-eem.400
Improves MovingEyeMorph support for custom colors.
=============== Diff against EToys-eem.400 ===============
Item was added:
+ ----- Method: MovingEyeMorph class>>color:irisColor: (in category 'instance creation') -----
+ color: aColor irisColor: anotherColor
+
+ ^ self new color: aColor irisColor: anotherColor!
Item was changed:
----- Method: MovingEyeMorph>>color: (in category 'accessing') -----
color: aColor
super color: aColor.
"Migrate old instances."
inner color: Color transparent.
+ self keepIrisVisible.!
- "Keep iris visible."
- aColor = iris color
- ifTrue: [iris borderWidth: 1; borderColor: aColor negated]
- ifFalse: [iris borderWidth: 0].!
Item was added:
+ ----- Method: MovingEyeMorph>>color:irisColor: (in category 'accessing') -----
+ color: aColor irisColor: anotherColor
+
+ self color: aColor.
+ self irisColor: anotherColor.!
Item was added:
+ ----- Method: MovingEyeMorph>>defaultBorderWidth (in category 'accessing') -----
+ defaultBorderWidth
+
+ ^ 0!
Item was changed:
----- Method: MovingEyeMorph>>irisColor: (in category 'accessing') -----
irisColor: aColor
iris color: aColor.
+ self keepIrisVisible.!
- "Keep iris visible."
- aColor = self color
- ifTrue: [iris borderWidth: 1; borderColor: aColor negated]
- ifFalse: [iris borderWidth: 0].!
Item was added:
+ ----- Method: MovingEyeMorph>>keepIrisVisible (in category 'private') -----
+ keepIrisVisible
+
+ self color = self irisColor
+ ifTrue: [
+ iris borderWidth: 1;
+ borderColor: self color makeForegroundColor]
+ ifFalse: [
+ iris borderWidth: 0].!