'From Squeak3.2alpha of 2 October 2001 [latest update: #4478] on 11 November 2001 at 9:08:29 pm'! "Change Set: threeAndreasIssues-sw Date: 11 November 2001 Author: Scott Wallace Fixes up three issues mentioned by Andreas yesterday: (1) Borders restored on tiles in viewers and on script-status controls. (2) Ted's changed colors for Rectangles now reflected in appearance in Tools flap & Objects tool. (3) Programmatic change of script status now properly reflected in the status controls in viewers -- colors now right, and the tickingness of the little clock faces is now right."! !CategoryViewer methodsFor: 'categories' stamp: 'sw 11/11/2001 21:07'! adjustColorsAndBordersWithin "Adjust the colors and borders of submorphs to suit current fashion" self allMorphsDo: [:aMorph | (aMorph isKindOf: ViewerLine) ifTrue: [aMorph layoutInset: 1]. (aMorph isKindOf: TilePadMorph) ifTrue: [aMorph beTransparent]. (aMorph isKindOf: PhraseTileMorph) ifTrue: [aMorph beTransparent. aMorph borderWidth: 0]. (aMorph isKindOf: TileMorph orOf: TilePadMorph) ifTrue: [aMorph borderWidth: 1]]. self borderWidth: 1! ! !Flaps class methodsFor: 'replacement' stamp: 'sw 11/10/2001 23:35'! replaceSuppliesFlap "If there is a global Supplies flap, replace it with an updated one." | aFlapTab | (aFlapTab _ self globalFlapTabWithID: 'Supplies') ifNil: [^ self]. self removeFlapTab: aFlapTab keepInList: false. self addGlobalFlap: self newSuppliesFlap. self currentWorld ifNotNil: [self currentWorld addGlobalFlaps] "Flaps replaceSuppliesFlap"! ! !Player methodsFor: 'scripts-standard' stamp: 'sw 11/11/2001 20:47'! changeScript: scriptName toStatus: statusSymbol "Change the script of the given name to have the given status, and get all relevant script-status controls updated" scriptName ifNil: [^ self]. Symbol hasInterned: scriptName ifTrue: [:sym | self instantiatedUserScriptsDo: [:aScriptInstantiation | aScriptInstantiation selector == sym ifTrue: [aScriptInstantiation status: statusSymbol. aScriptInstantiation updateAllStatusMorphs]]]! ! !ScriptInstantiation methodsFor: 'status control' stamp: 'sw 11/11/2001 20:45'! updateStatusMorph: statusControlMorph "the status control may need to reflect an externally-induced change in status" | statusSymbol colorSelector statusReadoutButton | statusControlMorph ifNil: [^ self]. statusSymbol _ self status. (#(paused ticking) includes: statusSymbol) ifTrue: [statusControlMorph assurePauseTickControlsShow] ifFalse: [statusControlMorph maybeRemovePauseTickControls]. statusReadoutButton _ statusControlMorph submorphs last. colorSelector _ ScriptingSystem statusColorSymbolFor: statusSymbol. statusReadoutButton color: (Color perform: colorSelector) muchLighter. statusReadoutButton label: statusSymbol asString font: Preferences standardButtonFont! ! "Postscript:" PartsBin clearThumbnailCache. Preferences okToReinitializeFlaps ifTrue: [Flaps replaceSuppliesFlap].!