The Inbox: EToys-jl.224.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: EToys-jl.224.mcz

commits-2
A new version of EToys was added to project The Inbox:
http://source.squeak.org/inbox/EToys-jl.224.mcz

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

Name: EToys-jl.224
Author: jl
Time: 31 August 2016, 4:40:01.094637 pm
UUID: df8cd49e-5ee7-4c4d-a115-c51127d5bd7b
Ancestors: EToys-jl.223

implenented dimensions width and height for kedama

=============== Diff against EToys-jl.223 ===============

Item was changed:
  ----- Method: KedamaMorph class>>additionsToViewerCategories (in category 'class initialization') -----
  additionsToViewerCategories
  "Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories."
  ^ #(
 
    (kedama (
  (command addToPatchDisplayList: 'add patch to display list' Patch)
  (command removeAllFromPatchDisplayList 'clear the patch display list')
  (slot patchDisplayList 'patches to display' String readOnly Player getPatchesList unused unused)
  (command addToTurtleDisplayList: 'add turtle to display list' Player)
  (command removeAllFromTurtleDisplayList 'clear the turtle display list')
  (slot turtleDisplayList 'turtles to display' String readOnly Player getTurtlesList unused unused)
  (slot pixelsPerPatch 'the display scale' Number readWrite Player getPixelsPerPatch Player setPixelsPerPatch:)
+ (slot dimensionsWidth 'widht of kedma world' Number readWrite Player getDimensionsWidth Player setDimensionsWidth:)
+ (slot dimensionsHeigth 'height of kedama world' Number readWrite Player getDimensionsHeight Player setDimensionsHeight:)
- (slot dimensions 'the turtles in x and y direction' Point readWrite Player getDimensions Player setDimensions:)
  (slot color 'The color of the object' Color readWrite Player getColor  Player  setColor:)
  "(command makeTurtlesMap 'Internally create the map of turtles')"
  (slot leftEdgeMode 'the mode of left edge' EdgeMode readWrite Player getLeftEdgeMode Player setLeftEdgeMode:)
  (slot rightEdgeMode 'the mode of right edge' EdgeMode readWrite Player getRightEdgeMode Player setRightEdgeMode:)
  (slot topEdgeMode 'the mode of top edge' EdgeMode readWrite Player getTopEdgeMode Player setTopEdgeMode:)
  (slot bottomEdgeMode 'the mode of bottom edge' EdgeMode readWrite Player getBottomEdgeMode Player setBottomEdgeMode:)
  ))
  ).
  !

Item was changed:
  ----- Method: KedamaMorph>>dimensions: (in category 'accessing') -----
+ dimensions: anExtent
+ dimensions := anExtent.
- dimensions: aPoint
-
- dimensions := aPoint.
  wrapX := dimensions x asFloat.
  wrapY := dimensions y asFloat.
  patchVarDisplayForm := Form extent: dimensions depth: 32.
+ patchesToDisplay do: [ :ea |
+ ea newExtent: anExtent.
+ ].
  self pixelsPerPatch: self pixelsPerPatch.!

Item was added:
+ ----- Method: Player>>getDimensionsHeight (in category 'slot-kedama') -----
+ getDimensionsHeight
+
+ ^ (self getValueFromCostume: #dimensions) y.
+ !

Item was added:
+ ----- Method: Player>>getDimensionsWidth (in category 'slot-kedama') -----
+ getDimensionsWidth
+
+ ^ (self getValueFromCostume: #dimensions) x.
+ !

Item was changed:
  ----- Method: Player>>setDimensions: (in category 'slot-kedama') -----
+ setDimensions: asPoint
- setDimensions: aNumber
 
+ ^ self setCostumeSlot: #dimensions: toValue: asPoint.
- ^ self setCostumeSlot: #dimensions: toValue: aNumber asPoint.
  !

Item was added:
+ ----- Method: Player>>setDimensionsHeight: (in category 'slot-kedama') -----
+ setDimensionsHeight: aNumber
+
+ ^ self setDimensions: self getDimensionsWidth @ aNumber.
+ !

Item was added:
+ ----- Method: Player>>setDimensionsWidth: (in category 'slot-kedama') -----
+ setDimensionsWidth: aNumber
+
+ ^ self setDimensions: aNumber @ self getDimensionsHeight.
+ !