'From etoys2.2 of 1 October 2007 [latest update: #1765] on 7 November 2007 at 3:39:33 pm'! "Change Set: SugarNav20-yo Date: 7 November 2007 Author: Yoshiki Ohshima The project name field tracks the screen size change. Also, it has a balloon help now."! ProjectNavigationMorph subclass: #SugarNavigatorBar instanceVariableNames: 'sugarLib highLightColor undoButton shareButton zoomButton supplies listener suppliesFlap projectNameField ' classVariableNames: '' poolDictionaries: '' category: 'Sugar'! !SugarNavigatorBar methodsFor: 'morphic interaction' stamp: 'yo 11/7/2007 15:30'! checkForResize | shouldResize h worldBounds | shouldResize _ false. worldBounds _ self world bounds. worldBounds width ~= self width ifTrue: [shouldResize _ true]. (h _ submorphs first submorphs first height) ~= self height ifTrue: [shouldResize _ true]. (owner notNil and: [owner isFlapTab]) ifTrue: [ owner edgeToAdhereTo == #top ifTrue: [ self topLeft ~= worldBounds topLeft ifTrue: [shouldResize _ true]. ]. owner edgeToAdhereTo == #bottom ifTrue: [ self bottomLeft ~= worldBounds bottomLeft ifTrue: [shouldResize _ true]. ]. shouldResize ifTrue: [ owner edgeToAdhereTo == #top ifTrue: [ self bounds: (0@0 corner: (worldBounds width@h)). ]. owner edgeToAdhereTo == #bottom ifTrue: [ self bounds: (0@(worldBounds height - h) corner: (worldBounds bottomRight)). ]. self resizeProjectNameField. ]. ].! ! !SugarNavigatorBar methodsFor: 'the actions' stamp: 'yo 11/7/2007 15:38'! makeProjectNameLabel | t | projectNameField _ SugarRoundedField new. self resizeProjectNameField. t _ UpdatingStringMorph new. t setProperty: #okToTextEdit toValue: true. t putSelector: #projectNameChanged:. t getSelector: #projectName. t target: self. t useStringFormat. t beSticky. t label: ActiveWorld project name font: (StrikeFont familyName: 'BitstreamVeraSans' size: 24). t color: Color black. t width: projectNameField width - 10. projectNameField label: t. projectNameField setBalloonText: self projectNameFieldBalloonHelp. ^projectNameField. ! ! !SugarNavigatorBar methodsFor: 'the actions' stamp: 'yo 11/7/2007 15:36'! projectNameFieldBalloonHelp ^ 'This is the name of current project. You can edit it as well.' translated. ! ! !SugarNavigatorBar methodsFor: 'the actions' stamp: 'yo 11/7/2007 15:30'! resizeProjectNameField "The height should be 45 according to the Sugar guilde line, but an odd number makes the circle distorted." projectNameField ifNotNil: [projectNameField extent: (Display width >= 1200 ifTrue: [240] ifFalse: [160])@46.]. ! ! ProjectNavigationMorph subclass: #SugarNavigatorBar instanceVariableNames: 'sugarLib highLightColor undoButton shareButton zoomButton supplies listener suppliesFlap projectNameField' classVariableNames: '' poolDictionaries: '' category: 'Sugar'! "Postscript: " Flaps disableGlobalFlaps: false. Flaps enableEToyFlaps. !