'From Squeakland 3.8.5976 of 25 August 2004 [latest update: #278] on 31 August 2004 at 2:41:10 pm'! "Change Set: familiarButtons-sw Date: 31 August 2004 Author: Scott Wallace Restores the familiar look to the brown-O 'dismiss' icons in the viewer and scriptor."! !Morph methodsFor: 'e-toy support' stamp: 'sw 8/31/2004 14:11'! pinkXButton "Answer a button with the old X on a pink background, targeted to self" | aButton | aButton _ IconicButton new labelGraphic: (ScriptingSystem formAtKey: #PinkX). aButton color: Color transparent; borderWidth: 0; shedSelvedge; actWhen: #buttonUp. aButton target: self. ^ aButton! ! !Morph methodsFor: 'e-toy support' stamp: 'sw 8/31/2004 14:06'! tanOButton "Answer a button with the old O on a tan background, targeted to self" | aButton | aButton _ IconicButton new labelGraphic: (ScriptingSystem formAtKey: #TanO). aButton color: Color transparent; borderWidth: 0; shedSelvedge; actWhen: #buttonUp. aButton target: self. ^ aButton! ! !CategoryViewer methodsFor: 'header pane' stamp: 'sw 8/31/2004 14:01'! addHeaderMorph "Add the header at the top of the viewer, with a control for choosing the category, etc." | header aButton | header _ AlignmentMorph newRow color: self color; wrapCentering: #center; cellPositioning: #leftCenter. aButton _ self tanOButton. header addMorph: aButton. aButton actionSelector: #delete; setBalloonText: 'remove this pane from the screen don''t worry -- nothing will be lost!!.' translated. self maybeAddArrowsTo: header. header beSticky. self addMorph: header. self addNamePaneTo: header. chosenCategorySymbol _ #basic! ! !ScriptEditorMorph methodsFor: 'buttons' stamp: 'sw 8/31/2004 14:11'! addDestroyButtonTo: aRowMorph "Add the destroiy button at the end of the header provided" | aButton | aButton _ IconicButton new. aRowMorph addMorphBack: self pinkXButton. aButton actionSelector: #destroyScript; setBalloonText: 'Destroy this script (CAUTION!!!!)' translated. ^ aRowMorph! ! !ScriptEditorMorph methodsFor: 'buttons' stamp: 'sw 8/31/2004 14:05'! addDismissButtonTo: aRowMorph "Add the brown dismiss button to the header" | aButton | aButton _ self tanOButton. aRowMorph addMorphBack: aButton. aButton actionSelector: #dismiss; setBalloonText: 'Remove this script from the screen (you can open it again from a Viewer)' translated. ^ aRowMorph! ! !StandardViewer methodsFor: 'initialization' stamp: 'sw 8/31/2004 14:02'! addHeaderMorphWithBarHeight: anInteger includeDismissButton: aBoolean "Add the header morph to the receiver, using anInteger as a guide for its height, and if aBoolean is true, include a dismiss buton for it" | header aFont aButton aTextMorph nail wrpr costs headWrapper | header _ AlignmentMorph newRow color: self color muchLighter; wrapCentering: #center; cellPositioning: #leftCenter. aFont _ Preferences standardButtonFont. aBoolean ifTrue: [aButton _ self tanOButton. header addMorph: aButton. aButton target: self; actionSelector: #dismiss; setBalloonText: 'remove this entire Viewer from the screen don''t worry -- nothing will be lost!!.' translated. header addTransparentSpacerOfSize: 4@1]. aButton _ IconicButton new borderWidth: 0; labelGraphic: (ScriptingSystem formAtKey: #AddCategoryViewer); color: Color transparent; actWhen: #buttonDown; target: self; actionSelector: #addCategoryViewer; setBalloonText: 'click here to add another category pane' translated; shedSelvedge. header addMorphBack: aButton. header addTransparentSpacerOfSize: 4@1. costs _ scriptedPlayer costumes. costs ifNotNil: [(costs size > 1 or: [costs size = 1 and: [costs first ~~ scriptedPlayer costume]]) ifTrue: [header addUpDownArrowsFor: self. (wrpr _ header submorphs last) submorphs second setBalloonText: 'switch to previous costume' translated. wrpr submorphs first setBalloonText: 'switch to next costume' translated]]. nail _ (self hasProperty: #noInteriorThumbnail) ifFalse: [ThumbnailMorph new objectToView: scriptedPlayer viewSelector: #costume] ifTrue: [ImageMorph new image: Cursor menu]. nail on: #mouseDown send: #offerViewerMenuForEvt:morph: to: scriptedPlayer. header addMorphBack: nail. nail setBalloonText: 'click here to get a menu that will allow you to add a variable, tear off a tile, etc..' translated. (self hasProperty: #noInteriorThumbnail) ifFalse: [nail borderWidth: 3; borderColor: #raised]. header addTransparentSpacerOfSize: 5@5. " aButton _ SimpleButtonMorph new target: self; actionSelector: #newEmptyScript; label: 'S' translated font: (aFont _ StrikeFont familyName: #ComicBold size: 16); color: Color transparent; borderWidth: 0; actWhen: #buttonDown. aButton setBalloonText: 'drag from here to create a new script for this object' translated. header addMorphBack: aButton. header addTransparentSpacerOfSize: 8@5." aButton _ SimpleButtonMorph new target: scriptedPlayer; actionSelector: #addInstanceVariable; label: 'v' translated font: aFont; color: Color transparent; borderWidth: 1; actWhen: #buttonUp. "aButton firstSubmorph color: Color gray." aButton setBalloonText: 'click here to add a variable to this object.' translated. header addMorphBack: aButton. header addTransparentSpacerOfSize: 5@5. self viewsMorph ifTrue: [scriptedPlayer costume assureExternalName]. aTextMorph _ UpdatingStringMorph new useStringFormat; target: scriptedPlayer; getSelector: #nameForViewer; setNameTo: 'name'; font: ScriptingSystem fontForNameEditingInScriptor. self viewsMorph ifTrue: [aTextMorph putSelector: #setName:. aTextMorph setProperty: #okToTextEdit toValue: true]. aTextMorph step. header addMorphBack: aTextMorph. aTextMorph setBalloonText: 'Click here to edit the player''s name.' translated. header beSticky. anInteger > 0 ifTrue: [headWrapper _ AlignmentMorph newColumn color: self color. headWrapper addTransparentSpacerOfSize: (0 @ anInteger). headWrapper addMorphBack: header. self addMorph: headWrapper] ifFalse: [self addMorph: header]! ! "Postscript:" ScriptingSystem saveForm: (Form extent: 16@22 depth: 16 fromArray: #( 0 0 12017 787558129 787558129 787546112 0 0 0 12017 787572528 1731225392 1731225392 1731210993 787546112 0 0 787572528 1731225392 1731225392 1731225392 1731225392 1731210993 0 12017 1731225392 1731225392 1731225392 1731225392 1731225392 1731225392 787546112 12017 1731225392 1731225392 1731225392 1731225392 1731225392 1731225392 787546112 787572528 1731225392 1731225392 1731225392 1731225392 1731225392 1731225392 1731210993 787572528 1731225392 1731225392 1731225392 1731225392 1731225392 1731225392 1731210993 787572528 1731225392 1731225392 65537 65537 1731225392 1731225392 1731210993 787572528 1731225392 65537 65537 65537 91952 1731225392 1731210993 787572528 1731225392 65537 1731225392 1731225392 65537 1731225392 1731210993 787572528 1731198977 91952 1731225392 1731225392 65537 1731225392 1731210993 787572528 1731198977 91952 1731225392 1731225392 65537 1731225392 1731210993 787572528 1731198977 91952 1731225392 1731225392 65537 1731225392 1731210993 787572528 1731198977 65537 1731225392 1731198977 91952 1731225392 1731210993 787572528 1731225392 65537 65537 65537 91952 1731225392 1731210993 787572528 1731225392 1731198977 65537 91952 1731225392 1731225392 1731210993 787572528 1731225392 1731225392 1731225392 1731225392 1731225392 1731225392 1731210993 12017 1731225392 1731225392 1731225392 1731225392 1731225392 1731225392 787546112 12017 1731225392 1731225392 1731225392 1731225392 1731225392 1731225392 787546112 0 787572528 1731225392 1731225392 1731225392 1731225392 1731210993 0 0 12017 787572528 1731225392 1731225392 1731210993 787546112 0 0 0 12017 787558129 787558129 787546112 0 0) offset: 0@0) atKey: #TanO. ScriptingSystem saveForm: (Form extent: 16@22 depth: 16 fromArray: #( 0 0 12017 787558129 787558129 787546112 0 0 0 12017 787578681 2134474553 2134474553 2134454001 787546112 0 0 787578681 2134474553 2134474553 2134474553 2134474553 2134454001 0 12017 2134474553 2134474553 2134474553 2134474553 2134474553 2134474553 787546112 12017 2134474553 2134474553 2134474553 2134474553 2134474553 2134474553 787546112 787578681 2134474553 2134474553 2134474553 2134474553 2134474553 2134474553 2134454001 787578681 2134474553 2134474553 2134474553 2134474553 2134474553 2134474553 2134454001 787578681 2134441985 98105 2134474553 2134474553 65537 2134474553 2134454001 787578681 2134441985 65537 2134474553 2134441985 65537 2134474553 2134454001 787578681 2134474553 65537 98105 65537 98105 2134474553 2134454001 787578681 2134474553 2134441985 65537 65537 2134474553 2134474553 2134454001 787578681 2134474553 2134474553 65537 98105 2134474553 2134474553 2134454001 787578681 2134474553 2134441985 65537 65537 2134474553 2134474553 2134454001 787578681 2134474553 65537 98105 65537 98105 2134474553 2134454001 787578681 2134441985 65537 2134474553 2134441985 65537 2134474553 2134454001 787578681 2134441985 98105 2134474553 2134474553 65537 2134474553 2134454001 787578681 2134474553 2134474553 2134474553 2134474553 2134474553 2134474553 2134454001 12017 2134474553 2134474553 2134474553 2134474553 2134474553 2134474553 787546112 12017 2134474553 2134474553 2134474553 2134474553 2134474553 2134474553 787546112 0 787578681 2134474553 2134474553 2134474553 2134474553 2134454001 0 0 12017 787578681 2134474553 2134474553 2134454001 787546112 0 0 0 12017 787558129 787558129 787546112 0 0) offset: 0@0) atKey: #PinkX.!