'From Squeak3.1alpha of 4 February 2001 [latest update: #3704] on 23 February 2001 at 5:06 pm'! "Change Set: WnldButtons-ar Date: 23 February 2001 Author: Andreas Raab Adds a menu item to wonderland camera morphs allowing to hand out go/stop buttons which can be used when the actual wonderland script editor is hidden in a flap. AND ONLY IN THIS CASE."! !WonderlandCameraMorph methodsFor: 'menu' stamp: 'ar 2/23/2001 17:00'! addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu addUpdating: #snapshotBackgroundString action: #toggleSnapshotBackground. aCustomMenu addUpdating: #getDragAndDropState action: #toggleDragAndDropState. (myControls == nil) ifTrue:[aCustomMenu add: 'showCameraControls' action: #showCameraControls] ifFalse:[aCustomMenu add: 'hideCameraControls' action: #deleteCameraControls]. aCustomMenu add: 'Stop/Go button' action: #attachStopGoButtons.! ! !WonderlandCameraMorph methodsFor: 'menu' stamp: 'ar 2/23/2001 17:03'! attachStopGoButtons | goButton stopButton wrapper | goButton _ ThreePhaseButtonMorph new. goButton image: (ScriptingSystem formAtKey: 'GoPicOn'); offImage: (ScriptingSystem formAtKey: 'GoPic'); pressedImage: (ScriptingSystem formAtKey: 'GoPicOn'); actionSelector: #setProperty:toValue:; arguments: (Array with: #keepStepping with: true); actWhen: #buttonUp; target: self; setNameTo: 'Go Button'. stopButton _ ThreePhaseButtonMorph new. stopButton image: (ScriptingSystem formAtKey: 'StopPic'); offImage: (ScriptingSystem formAtKey: 'StopPic'); pressedImage: (ScriptingSystem formAtKey: 'StopPicOn'); actionSelector: #removeProperty:; arguments: (Array with: #keepStepping); actWhen: #buttonUp; target: self; setNameTo: 'Stop Button'. wrapper _ AlignmentMorph newRow setNameTo: 'wonderland controls'. wrapper vResizing: #shrinkWrap. wrapper hResizing: #shrinkWrap. wrapper beTransparent. wrapper addMorphBack: goButton; addMorphBack: stopButton. self world primaryHand attachMorph: wrapper.! ! !WonderlandCameraMorph methodsFor: 'stepping' stamp: 'ar 2/23/2001 16:58'! step self changed. "*** hack ***" pickedPoint _ nil. "*** hack ***" (self hasProperty: #keepStepping) ifTrue:[ myWonderland getEditor isInWorld ifFalse:[ myWonderland getScheduler tick. ]. ].! !