Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.420.mcz ==================== Summary ==================== Name: EToys-mt.420 Author: mt Time: 17 February 2021, 3:46:09.320168 pm UUID: 6869819a-56f8-9042-aa5d-33f1522d7376 Ancestors: EToys-dtl.419 Removes some long-read-and-replaced code. =============== Diff against EToys-dtl.419 =============== Item was removed: - ----- Method: HaloMorph>>addSmallHandle:on:send:to: (in category '*Etoys-Squeakland-private') ----- - addSmallHandle: handleSpec on: eventName send: selector to: recipient - "Add a handle within the halo box as per the haloSpec, and set it up to respond to the given event by sending the given selector to the given recipient. Return the handle. This is the 5/17/04 version of HaloMorph>>addHandle:on:send:to:" - - | handle aPoint iconName colorToUse | - aPoint := self positionIn: haloBox horizontalPlacement: handleSpec horizontalPlacement verticalPlacement: handleSpec verticalPlacement. - handle := EllipseMorph - newBounds: (Rectangle center: aPoint extent: self handleSize asPoint) - color: (colorToUse := Color colorFrom: handleSpec color). - handle borderColor: colorToUse muchDarker. - self addMorph: handle. - (iconName := handleSpec iconSymbol) ifNotNil: - [ | form | - form := ScriptingSystem formAtKey: iconName. - form ifNotNil: - [handle addMorphCentered: (ImageMorph new - image: form; - color: colorToUse makeForegroundColor; - lock)]]. - handle on: #mouseUp send: #endInteraction: to: self. - handle on: eventName send: selector to: recipient. - self isMagicHalo ifTrue:[ - handle on: #mouseEnter send: #handleEntered to: self. - handle on: #mouseLeave send: #handleLeft to: self]. - handle setBalloonText: (target balloonHelpTextForHandle: handle) translated. - ^ handle - ! Item was removed: - ----- Method: HaloMorph>>dragTarget: (in category '*Etoys-Squeakland-events') ----- - dragTarget: event - "Begin dragging the target" - - | thePoint | - event controlKeyPressed ifTrue: [^self growTarget: event]. - growingOrRotating := false. - innerTarget aboutToBeBrownDragged. - self setProperty: #conclusionSelector toValue: #brownDragConcluded. - thePoint := target point: event position - positionOffset from: owner. - target setConstrainedPosition: thePoint hangOut: true. - event hand newMouseFocus: self! Item was removed: - ----- Method: HaloMorph>>growTarget: (in category '*Etoys-Squeakland-events') ----- - growTarget: event - "Begin resizing the target" - growingOrRotating := true. - positionOffset := event position. - originalExtent := target extent. - self removeAllHandlesBut: nil. - event hand newMouseFocus: self. - event hand addMouseListener: self. "add handles back on mouse-up"! Item was removed: - ----- Method: HaloMorph>>highlight:handleName:state: (in category '*Etoys-Squeakland-private') ----- - highlight: handle handleName: handleName state: state - "Change color of handles. Need refactoring later..." - | form highlightName | - handle class == ThreePhaseButtonMorph - ifTrue: [form := ScriptingSystem formPressedAtKey: handleName. - state == #on - ifTrue: [highlightName := (handleName , 'Highlighted') asSymbol. - form := ScriptingSystem formAtKey: highlightName. - form - ifNil: [ScriptingSystem saveForm: (form := (ScriptingSystem formAtKey: handleName) - blendColor: (Color white alpha: 0.5)) colorReduced atKey: highlightName]]. - handle offImage: form. - handle pressedImage: form. - ^ self]. - handleName == #'Halo-Rot' - ifTrue: [state == #on - ifTrue: [handle color: Color lightBlue] - ifFalse: [handle color: Color blue]. - handle - submorphsDo: [:m | m color: handle color makeForegroundColor]]. - handleName == #'Halo-Scale' - ifTrue: [state == #on - ifTrue: [handle color: Color yellow] - ifFalse: [handle color: Color orange]]! |
Free forum by Nabble | Edit this page |