I can use a radarView to move around the world by pressing buttons - is there a way to enable moving around with the arrow keys?
I did a quick hack and got something working using normal keys but I couldn't work out how to ask a key down event if it's one of the arrow keys. What I got working was to modify 'handleAndForward:To:' in the handMorph traits. I added code on the keydown check with something like:
e metaIsDown && [ e keystrokes includes: 'j' ] ifTrue: [ world moveHand: self InWorldBy: -500@0. ^self. ]
I repeated this for the four keys I wanted for up, down, left and right. Ideally I'd like to use the arrow keys though since I'm clashing with some of the editor meta keys.
Chris. -- http://www.bluishcoder.co.nz
Have you tried using the scroller on your mouse/trackpad? This should scroll the entire world up and down. On the mac it also allows scrolling left and right (using two fingers on my macbook trackpad)
- Russell
On 22/07/2009, at 9:42 PM, Chris Double wrote:
I can use a radarView to move around the world by pressing buttons - is there a way to enable moving around with the arrow keys?
I did a quick hack and got something working using normal keys but I couldn't work out how to ask a key down event if it's one of the arrow keys. What I got working was to modify 'handleAndForward:To:' in the handMorph traits. I added code on the keydown check with something like:
e metaIsDown && [ e keystrokes includes: 'j' ] ifTrue: [ world moveHand: self InWorldBy: -500@0. ^self. ]
I repeated this for the four keys I wanted for up, down, left and right. Ideally I'd like to use the arrow keys though since I'm clashing with some of the editor meta keys.
Chris.
self-interest@lists.selflanguage.org