A new version of Sugar was added to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Sugar-kfr.20.mcz==================== Summary ====================
Name: Sugar-kfr.20
Author: kfr
Time: 23 February 2012, 4:34:19 pm
UUID: 03f95f7a-55e3-eb4b-be55-7cdd3ee52acd
Ancestors: Sugar-kfr.19
Instance variable for soundButton. Fixed position for sound bar according to sound button.
=============== Diff against Sugar-kfr.19 ===============
Item was changed:
ProjectNavigationMorph subclass: #SugarNavigatorBar
+ instanceVariableNames: 'sugarLib highLightColor paintButton undoButton shareButton soundButton stopButton supplies listener suppliesFlap projectNameField isSugar'
- instanceVariableNames: 'sugarLib highLightColor paintButton undoButton shareButton stopButton supplies listener suppliesFlap projectNameField isSugar'
classVariableNames: ''
poolDictionaries: ''
category: 'Sugar'!
Item was changed:
----- Method: SugarNavigatorBar>>buttonSound (in category 'buttons creation') -----
buttonSound
"Answer an new instance of a 'Sound' button."
+ ^ soundButton := self makeButton: 'sound'
- ^ shareButton := self makeButton: 'sound'
balloonText: 'Adjust the sound volume' translated
for: #soundVolume!
Item was changed:
----- Method: SugarNavigatorBar>>soundVolume (in category 'buttons creation') -----
soundVolume
| bar slider r p |
+ bar := SimpleSliderMorph new.
+ bar position: soundButton position+ (6@15).
- bar := SimpleSliderMorph new.
- bar position: ActiveHand position- (12@10).
bar borderColor: Color black; borderWidth: 2.
bar width:25.
bar adjustToValue: SoundPlayer soundVolume average.
bar descending: true.
bar beSticky.
slider := bar submorphs first.
slider borderWidth: 0; color: Color black .
bar on: #mouseLeave send: #value to: [ bar delete].
bar on: #mouseUp send: #value to: [
r := bar roomToMove.
p := ActiveHand lastEvent position adhereTo: r.
bar setValue: ((r bottom - p y ) asFloat / r height ).
self setSoundVolume: bar value.
self beep:'coyote'].
slider on: #mouseUp send: #value to: [
self setSoundVolume: bar value.
self beep:'coyote'].
slider on: #mouseMove send: #value to: [
bar scrollAbsolute: ActiveHand lastEvent.
self setSoundVolume: bar value].
^bar openInWorld!
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev