I am working on TACKLE, and in version 1.1, I would like people to shift click the logo, instead. How can I change that?
Offline
First you will need:
developersMenu
| t1 |
self world activeHand toolType: nil.
Cursor normal show.
t1 _ CustomMenu new.
fillScreenFlag
ifTrue: [t1 add: 'turn fill screen off' action: #fillScreenOff]
ifFalse: [t1 add: 'turn fill screen on' action: #fillScreenOn].
UseErrorCatcher
ifTrue: [t1 add: 'turn error catching off' action: #toggleErrorCatcher]
ifFalse: [t1 add: 'turn error catching on' action: #toggleErrorCatcher].
t1 addLine.
t1 add: 'save image for end-user' action: #saveImageForEndUser.
t1 invokeOn: selfIn scratch frame morph menu/button actions.
Now in event handling::
mouseDown: t1
| t2 |
t1 hand toolType: nil.
t2 _ self position + (ScratchFrameMorph isXO
ifTrue: [72 @ 26]
ifFalse: [38 @ 10]).
(((t2 extent: 10 @ 12)
containsPoint: t1 cursorPoint)
and: [t1 shiftPressed])
ifTrue: [^ self developersMenu].
t1 cursorPoint y - self top < topPane height
ifTrue: [fillScreenFlag ifFalse: [t1 hand grabMorph: self]](the last one will replace the first mouse down method)
Offline
Pecola1 wrote:
First you will need:
Code:
developersMenu | t1 | self world activeHand toolType: nil. Cursor normal show. t1 _ CustomMenu new. fillScreenFlag ifTrue: [t1 add: 'turn fill screen off' action: #fillScreenOff] ifFalse: [t1 add: 'turn fill screen on' action: #fillScreenOn]. UseErrorCatcher ifTrue: [t1 add: 'turn error catching off' action: #toggleErrorCatcher] ifFalse: [t1 add: 'turn error catching on' action: #toggleErrorCatcher]. t1 addLine. t1 add: 'save image for end-user' action: #saveImageForEndUser. t1 invokeOn: selfIn scratch frame morph menu/button actions.
Now in event handling::Code:
mouseDown: t1 | t2 | t1 hand toolType: nil. t2 _ self position + (ScratchFrameMorph isXO ifTrue: [72 @ 26] ifFalse: [38 @ 10]). (((t2 extent: 10 @ 12) containsPoint: t1 cursorPoint) and: [t1 shiftPressed]) ifTrue: [^ self developersMenu]. t1 cursorPoint y - self top < topPane height ifTrue: [fillScreenFlag ifFalse: [t1 hand grabMorph: self]](the last one will replace the first mouse down method)
So, will this change it to the logo?
Offline
thebuilderdd wrote:
Pecola1 wrote:
First you will need:
Code:
developersMenu | t1 | self world activeHand toolType: nil. Cursor normal show. t1 _ CustomMenu new. fillScreenFlag ifTrue: [t1 add: 'turn fill screen off' action: #fillScreenOff] ifFalse: [t1 add: 'turn fill screen on' action: #fillScreenOn]. UseErrorCatcher ifTrue: [t1 add: 'turn error catching off' action: #toggleErrorCatcher] ifFalse: [t1 add: 'turn error catching on' action: #toggleErrorCatcher]. t1 addLine. t1 add: 'save image for end-user' action: #saveImageForEndUser. t1 invokeOn: selfIn scratch frame morph menu/button actions.
Now in event handling::Code:
mouseDown: t1 | t2 | t1 hand toolType: nil. t2 _ self position + (ScratchFrameMorph isXO ifTrue: [72 @ 26] ifFalse: [38 @ 10]). (((t2 extent: 10 @ 12) containsPoint: t1 cursorPoint) and: [t1 shiftPressed]) ifTrue: [^ self developersMenu]. t1 cursorPoint y - self top < topPane height ifTrue: [fillScreenFlag ifFalse: [t1 hand grabMorph: self]](the last one will replace the first mouse down method)
So, will this change it to the logo?
yes
Offline