Nicolas Cellier uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-nice.145.mcz ==================== Summary ==================== Name: MorphicExtras-nice.145 Author: nice Time: 25 December 2013, 11:12:48.502 pm UUID: 8fd3a7be-e242-422e-974a-065a92ac27e8 Ancestors: MorphicExtras-nice.144 Change a few print:(aFloat roundTo: 0.01) into nextPutAll:(aFloat printShowingMaxDecimalPlaces: 2) =============== Diff against MorphicExtras-nice.144 =============== Item was changed: ----- Method: PaintBoxMorph>>eyedropper:action:cursor:evt: (in category 'actions') ----- eyedropper: aButton action: aSelector cursor: aCursor evt: evt "Take total control and pick up a color!!!!" | pt feedbackColor delay | delay := Delay forMilliseconds: 10. aButton state: #on. tool ifNotNil: [tool state: #off]. currentCursor := aCursor. evt hand showTemporaryCursor: currentCursor hotSpotOffset: 6 negated @ 4 negated. "<<<< the form was changed a bit??" feedbackColor := Display colorAt: Sensor cursorPoint. colorMemory align: colorMemory bounds topRight with: colorMemoryThin bounds topRight. self addMorphFront: colorMemory. "Full color picker" [Sensor anyButtonPressed] whileFalse: [pt := Sensor cursorPoint. "deal with the fact that 32 bit displays may have garbage in the alpha bits" feedbackColor := Display depth = 32 ifTrue: + [Color colorFromPixelValue: ((Display pixelValueAt: pt) bitOr: 16rFF000000) - [Color colorFromPixelValue: ((Display pixelValueAt: pt) bitOr: 4278190080) depth: 32] ifFalse: [Display colorAt: pt]. "the hand needs to be drawn" evt hand position: pt. currentColor ~= feedbackColor ifTrue: [ currentColor := feedbackColor. self showColor ]. self world displayWorldSafely. delay wait]. "Now wait for the button to be released." [Sensor anyButtonPressed] whileTrue: [ pt := Sensor cursorPoint. "the hand needs to be drawn" evt hand position: pt. self world displayWorldSafely. delay wait]. evt hand showTemporaryCursor: nil hotSpotOffset: 0 @ 0. self currentColor: feedbackColor evt: evt. colorMemory delete. tool ifNotNil: [tool state: #on. currentCursor := tool arguments third]. aButton state: #off ! Item was changed: ----- Method: SoundEventMorph>>sound: (in category 'as yet unclassified') ----- sound: aSound sound := aSound. + self setBalloonText: 'a sound of duration ',(sound duration printShowingMaxDecimalPlaces: 1),' seconds'.! - self setBalloonText: 'a sound of duration ',(sound duration roundTo: 0.1) printString,' seconds'.! Item was changed: ----- Method: ZASMCameraMarkMorph>>cameraPoint:cameraScale:controller: (in category 'as yet unclassified') ----- cameraPoint: aPoint cameraScale: aNumber controller: aController self setProperty: #cameraPoint toValue: aPoint. self setProperty: #cameraScale toValue: aNumber. self setProperty: #cameraController toValue: aController. self addMorph: ( + StringMorph contents: aPoint printString,' ',(aNumber printShowingMaxDecimalPlaces: 3) - StringMorph contents: aPoint printString,' ',(aNumber roundTo: 0.001) printString ) lock.! Item was changed: ----- Method: ZASMCameraMarkMorph>>cameraPoint:cameraScale:controller:page: (in category 'as yet unclassified') ----- cameraPoint: aPoint cameraScale: aNumber controller: aController page: aBookPage self setProperty: #cameraPoint toValue: aPoint. self setProperty: #cameraScale toValue: aNumber. self setProperty: #cameraController toValue: aController. self setProperty: #bookPage toValue: aBookPage. self addMorphBack: (ImageMorph new image: (aBookPage imageForm scaledToSize: 80@80)) lock. + self setBalloonText: aPoint rounded printString,' ',(aNumber printShowingMaxDecimalPlaces: 3)! - self setBalloonText: aPoint rounded printString,' ',(aNumber roundTo: 0.001) printString! |
Free forum by Nabble | Edit this page |