'From Squeak3.5 of ''11 April 2003'' [latest update: #5180] on 15 December 2003 at 5:19:19 pm'! "Change Set: AllScriptsToolAndBabel-dgd Date: 15 December 2003 Author: Diego Gomez Deck Some missing #translated sends in AllScriptsTool"! !ScriptInstantiation methodsFor: 'misc' stamp: 'dgd 12/15/2003 10:11'! offerMenuIn: aStatusViewer "Put up a menu." | aMenu | ActiveHand showTemporaryCursor: nil. aMenu _ MenuMorph new defaultTarget: self. aMenu title: player knownName, ' ', selector. aMenu addStayUpItem. (player class instanceCount > 1) ifTrue: [aMenu add: 'propagate status to siblings' translated selector: #assignStatusToAllSiblingsIn: argument: aStatusViewer. aMenu balloonTextForLastItem: 'Make the status of this script in all of my sibling instances be the same as the status you see here' translated]. aMenu add: 'reveal this object' translated target: player selector: #revealPlayerIn: argument: ActiveWorld. aMenu balloonTextForLastItem: 'Make certain this object is visible on the screen; flash its image for a little while, and give it the halo.' translated. aMenu add: 'open this script''s Scriptor' translated target: player selector: #grabScriptorForSelector:in: argumentList: {selector. aStatusViewer world}. aMenu balloonTextForLastItem: 'Open up the Scriptor for this script' translated. aMenu add: 'open this object''s Viewer' translated target: player selector: #beViewed. aMenu balloonTextForLastItem: 'Open up a Viewer for this object' translated. aMenu addLine. aMenu add: 'more...' translated target: self selector: #offerShiftedMenuIn: argument: aStatusViewer. aMenu balloonTextForLastItem: 'The "more..." branch offers you menu items that are less frequently used.' translated. aMenu popUpInWorld: ActiveWorld! ! !ScriptInstantiation methodsFor: 'misc' stamp: 'dgd 12/15/2003 10:12'! offerShiftedMenuIn: aStatusViewer "Put up the shifted menu" | aMenu | aMenu _ MenuMorph new defaultTarget: self. aMenu title: player knownName, ' ', selector. aMenu add: 'grab this object' translated target: player selector: #grabPlayerIn: argument: self currentWorld. aMenu balloonTextForLastItem: 'Wherever this object currently is, the "grab" command will rip it out, and place it in your "hand". This is a very drastic step, that can disassemble things that may be very hard to put back together!!' translated. aMenu add: 'destroy this script' translated target: player selector: #removeScriptWithSelector: argument: selector. aMenu balloonTextForLastItem: 'Caution!! This is irreversibly destructive -- it removes the script from the system.' translated. aMenu addLine. aMenu add: 'inspect morph' translated target: player costume selector: #inspect. aMenu add: 'inspect player' translated target: player selector: #inspect. aMenu popUpInWorld: ActiveWorld! ! !ScriptInstantiation methodsFor: 'misc' stamp: 'dgd 12/15/2003 10:09'! statusControlRowIn: aStatusViewer "Answer an object that reports my status and lets the user change it" | aRow aMorph buttonWithPlayerName | aRow _ ScriptStatusLine newRow beTransparent. buttonWithPlayerName _ UpdatingSimpleButtonMorph new. buttonWithPlayerName on: #mouseEnter send: #menuButtonMouseEnter: to: buttonWithPlayerName; on: #mouseLeave send: #menuButtonMouseLeave: to: buttonWithPlayerName. buttonWithPlayerName target: self; wordingSelector: #playersExternalName; actionSelector: #offerMenuIn:; arguments: {aStatusViewer}; beTransparent; actWhen: #buttonDown. buttonWithPlayerName setBalloonText: 'This is the name of the player to which this script belongs; if you click here, you will get a menu of interesting options pertaining to this player and script' translated. buttonWithPlayerName borderWidth: 1; borderColor: Color blue. aRow addMorphBack: buttonWithPlayerName. aRow addTransparentSpacerOfSize: 10@0. aRow addMorphBack: AlignmentMorph newVariableTransparentSpacer. aMorph _ UpdatingStringMorph on: self selector: #selector. aMorph color: Color brown lighter; useStringFormat. aMorph setBalloonText: 'This is the name of the script to which this entry pertains.' translated. aRow addMorphBack: aMorph. aRow addMorphBack: AlignmentMorph newVariableTransparentSpacer. aRow addTransparentSpacerOfSize: 10@0. aRow addMorphBack: self statusControlMorph. aRow submorphsDo: [:m | m wantsSteps ifTrue: [m step]]. ^ aRow! !