'From etoys2.1 of 30 August 2007 [latest update: #1599] on 6 September 2007 at 3:56:54 pm'! "Change Set: flapFix-bf Date: 6 September 2007 Author: Bert Freudenberg Fix a DNU when there is no current SugarNavBar instance"! !Flaps class methodsFor: 'predefined flaps' stamp: 'bf 9/6/2007 10:31'! newSuppliesFlapFromQuads: quads positioning: positionSymbol withPreviousEntries: aCollection "Answer a fully-instantiated flap named 'Supplies' to be placed at the bottom of the screen. Use #center as the positionSymbol to have it centered at the bottom of the screen, or #right to have it placed off near the right edge." | aFlapTab aStrip aWidth sugarNavigator | sugarNavigator _ Preferences sugarNavigator. aStrip _ PartsBin newPartsBinWithOrientation: #leftToRight andColor: Color gray muchLighter from: quads withPreviousEntries: aCollection. self twiddleSuppliesButtonsIn: aStrip. aFlapTab _ (sugarNavigator ifTrue: [SolidSugarSuppliesTab] ifFalse: [FlapTab]) new referent: aStrip beSticky. aFlapTab setName: 'Supplies' translated edge: (sugarNavigator ifTrue: [#top] ifFalse: [#bottom]) color: Color red lighter. aFlapTab position: (0 @ (sugarNavigator ifTrue: [(SugarNavTab someInstance ifNil: [aFlapTab]) height] ifFalse: [aFlapTab height])). aFlapTab setBalloonText: aFlapTab balloonTextForFlapsMenu. aFlapTab applyThickness: 20. aWidth := ActiveWorld width. aStrip extent: ActiveWorld width @ (76 * (1 + (1350 // aWidth))). aStrip beFlap: true. aStrip autoLineLayout: true. sugarNavigator ifTrue: [ aFlapTab useSolidTab. aFlapTab height: 20; color: (Color r: 0.804 g: 0.804 b: 0.804). ] ifFalse: [ aFlapTab color: Color red lighter ]. ^ aFlapTab "Flaps replaceGlobalFlapwithID: 'Supplies' translated"! !