[squeak-dev] The Trunk: EToys-kfr.478.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 11 14:41:33 UTC 2023


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

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

Name: EToys-kfr.478
Author: kfr
Time: 15 August 2022, 8:51:08.022152 am
UUID: 446eb471-dc21-4640-8b70-ce2547ce34a0
Ancestors: EToys-ct.477

When heading changes in a Player, it gets added to a TransformationMorph. During this process it's x and y values get set to 0. If the Players pen is down, it will draw a lite to the top left corner.

We fix this by lifting the pen before turning and lower it afterwards

=============== Diff against EToys-ct.477 ===============

Item was changed:
  ----- Method: Player>>setHeading: (in category 'slot getters/setters') -----
  setHeading: newHeading
  	"Set the heading as indicated"
  
+ 	| aCostume penDown |
- 	| aCostume |
  	aCostume := self costume.
  	aCostume isWorldMorph ifTrue: [^ self].
+ 	(penDown :=self getPenDown) ifTrue:[self liftPen].
  	aCostume heading: newHeading.
  	aCostume := self costume. "in case we just got flexed for no apparent reason"
  	(aCostume isFlexMorph and:[aCostume hasNoScaleOrRotation]) 
+ 		ifTrue:	[aCostume removeFlexShell].
+ 	penDown ifTrue:[self lowerPen]
+ 		!
- 		ifTrue:	[aCostume removeFlexShell]!



More information about the Squeak-dev mailing list