[squeak-dev] The Trunk: EToys-mt.442.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Apr 15 14:55:51 UTC 2021


Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.442.mcz

==================== Summary ====================

Name: EToys-mt.442
Author: mt
Time: 15 April 2021, 4:55:44.692792 pm
UUID: 1c7fa45e-8000-494d-9769-8e9c042ea663
Ancestors: EToys-mt.441

Complements MorphicExtras-mt.292

=============== Diff against EToys-mt.441 ===============

Item was removed:
- EllipseMorph subclass: #MovingEyeMorph
- 	instanceVariableNames: 'inner iris'
- 	classVariableNames: 'IrisSize'
- 	poolDictionaries: ''
- 	category: 'Etoys-Squeakland-Morphic-Demo'!

Item was removed:
- ----- Method: MovingEyeMorph class>>color:irisColor: (in category 'instance creation') -----
- color: aColor irisColor: anotherColor
- 
- 	^ self new color: aColor irisColor: anotherColor!

Item was removed:
- ----- Method: MovingEyeMorph class>>descriptionForPartsBin (in category 'parts bin') -----
- descriptionForPartsBin
- 	^ self partName:	'MovingEye' translatedNoop
- 		categories:		{'Just for Fun' translatedNoop}
- 		documentation:	'An eye which follows the cursor' translatedNoop!

Item was removed:
- ----- Method: MovingEyeMorph class>>initialize (in category 'class initialization') -----
- initialize
- "
- 	MovingEyeMorph initialize
- "
- 	IrisSize := (0.42 at 0.50).!

Item was removed:
- ----- Method: MovingEyeMorph>>color: (in category 'accessing') -----
- color: aColor
- 
- 	super color: aColor.
- 	
- 	"Migrate old instances."
- 	inner color: Color transparent.
- 	
- 	self keepIrisVisible.!

Item was removed:
- ----- Method: MovingEyeMorph>>color:irisColor: (in category 'accessing') -----
- color: aColor irisColor: anotherColor
- 
- 	self color: aColor.
- 	self irisColor: anotherColor.!

Item was removed:
- ----- Method: MovingEyeMorph>>defaultBorderWidth (in category 'accessing') -----
- defaultBorderWidth
- 
- 	^ 0!

Item was removed:
- ----- Method: MovingEyeMorph>>defaultColor (in category 'initialization') -----
- defaultColor
- "answer the default color/fill style for the receiver"
- 	^ Color black!

Item was removed:
- ----- Method: MovingEyeMorph>>extent: (in category 'geometry') -----
- extent: aPoint
- 
- 	super extent: aPoint.
- 	inner extent: (self extent * ((1.0 at 1.0)-IrisSize)) asIntegerPoint.
- 	iris extent: (self extent * IrisSize) asIntegerPoint.
- 	inner position: (self center - (inner extent // 2)) asIntegerPoint.
- !

Item was removed:
- ----- Method: MovingEyeMorph>>initialize (in category 'initialization') -----
- initialize
- 	"initialize the state of the receiver"
- 	super initialize.
- 	""
- 	inner := EllipseMorph new.
- 	inner color: Color transparent.
- 	inner extent: (self extent * (1.0 @ 1.0 - IrisSize)) asIntegerPoint.
- 	inner borderWidth: 0.
- ""
- 	iris := EllipseMorph new.
- 	iris color: Color white.
- 	iris extent: (self extent * IrisSize) asIntegerPoint.
- ""
- 	self addMorphCentered: inner.
- 	inner addMorphCentered: iris.
- ""
- 	self extent: 26 @ 33!

Item was removed:
- ----- Method: MovingEyeMorph>>irisColor (in category 'accessing') -----
- irisColor
- 
- 	^ iris color!

Item was removed:
- ----- Method: MovingEyeMorph>>irisColor: (in category 'accessing') -----
- irisColor: aColor
- 
- 	iris color: aColor.
- 	
- 	self keepIrisVisible.!

Item was removed:
- ----- Method: MovingEyeMorph>>irisPos (in category 'accessing') -----
- irisPos
- 
- 	^ iris position!

Item was removed:
- ----- Method: MovingEyeMorph>>irisPos: (in category 'accessing') -----
- irisPos: cp
- 
- 	| a b theta x y |
- 	theta := (cp - self center) theta.
- 	a := inner width // 2.
- 	b := inner height // 2.
- 	x := a * (theta cos).
- 	y := b * (theta sin).
- 	iris position: ((x at y) asIntegerPoint) + self center - (iris extent // 2).!

Item was removed:
- ----- Method: MovingEyeMorph>>keepIrisVisible (in category 'private') -----
- keepIrisVisible
- 
- 	self color = self irisColor
- 		ifTrue: [
- 			iris borderWidth: 1;
- 			borderColor: self color makeForegroundColor]
- 		ifFalse: [
- 			iris borderWidth: 0].!

Item was removed:
- ----- Method: MovingEyeMorph>>step (in category 'stepping and presenter') -----
- step
- 	| cp |
- 	cp := self globalPointToLocal: self world primaryHand position.
- 	(inner containsPoint: cp)
- 		ifTrue: [iris position: (cp - (iris extent // 2))]
- 		ifFalse: [self irisPos: cp].!

Item was removed:
- ----- Method: MovingEyeMorph>>stepTime (in category 'testing') -----
- stepTime
- 
- 	^ 100.!



More information about the Squeak-dev mailing list