Etoys Inbox: Sugar-kfr.13.mcz

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

Etoys Inbox: Sugar-kfr.13.mcz

commits-2
A new version of Sugar was added to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Sugar-kfr.13.mcz

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

Name: Sugar-kfr.13
Author: kfr
Time: 8 February 2012, 10:48:16 am
UUID: e5d01474-fa7f-a147-b775-ec796cf33f2f
Ancestors: Sugar-kfr.12

Add a sound volume button to the navigator bar

=============== Diff against Sugar-kfr.12 ===============

Item was changed:
  ----- Method: SugarNavigatorBar class>>rebuildButtons (in category 'utilitity') -----
  rebuildButtons
+ "self rebuildButtons"
  self current ifNotNilDo: [:bar | bar rebuildButtons]!

Item was added:
+ ----- Method: SugarNavigatorBar>>buttonSound (in category 'buttons creation') -----
+ buttonSound
+ "Answer an new instance of a 'Sound' button."
+
+ ^ shareButton := self makeButton: 'Sound'
+ balloonText: 'Adjust the sound volume' translated
+ for: #soundControl!

Item was changed:
  ----- Method: SugarNavigatorBar>>makeTheButtons (in category 'initialization') -----
  makeTheButtons
 
  ^ {
  self buttonHelp.
  self makeProjectNameLabel.
  },
  (
  Preferences showAdvancedNavigatorButtons
  ifTrue: [{self buttonNewProject}]
  ifFalse: [#()]
  ),
  {
  self buttonPrev.
  self buttonNext.
  self buttonPaint.
  self buttonSupplies.
  self buttonLanguage.
+ self buttonSound.
  },
  (SugarLauncher isRunningInSugar
  ifTrue: [{
  self buttonShare.
  #spacer.
  self buttonChoose.
  self buttonKeep.
  stopButton := SugarLauncher current willSaveOnQuit
  ifTrue: [self buttonStop]
  ifFalse: [self buttonQuit] }]
  ifFalse: [{
  self buttonZoom.
  #spacer.
  self buttonFind.
  self buttonPublish.
  self buttonQuit}]
  ),
  (Preferences navControlInNavBar
  ifTrue: [{self buttonHideNavBar}]
  ifFalse: [#()])!

Item was added:
+ ----- Method: SugarNavigatorBar>>soundControl (in category 'button actions') -----
+ soundControl
+ |  bar slider |
+      bar := SimpleSliderMorph new.
+ bar position: ActiveHand position.
+ bar adjustToValue: SoundPlayer soundVolume first."array with stereo values. pick first"
+ bar descending: true.
+ bar beSticky.
+ slider := bar submorphs first.
+ slider  on: #mouseUp send: #value to: [
+ self setSoundVolume: bar value.
+ bar delete].
+ 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