Arrow Keys to control movement of a Morph
Karl Ramberg
karl.ramberg at chello.se
Wed Jul 7 06:44:23 UTC 2004
Milan Zimmermann wrote:
>
> Karl,
>
> Using your changeset (thanks again) I am playing with moving a Morph, in eToys
> using: "MyEllips's's keyHit a", which I added in a script.
>
> I do not know how to replace the "a" with another Character using "drag" so I
> revert to textual form and have, as a first test, something like
>
> arrowResponse
> (self wasCharacterHit: Character arrowLeft)
> ifTrue: [self forward: 5. ].
> (self wasCharacterHit: Character arrowRight)
> ifTrue: [self forward: -5].
>
> And that works nicely.
>
> Just for curiosity, is there some way to drag Characters from somewhere in
> eToy's, something like a "Character table"
>
There is not one I know of. You can replace the characters by clicking
on them
so they get hi-lighted and then hitting the key you want. But keys
without visible
characters do not work at the moment.Maybe a little hacking in the input
field could resolve invisible chars to something like 'Character
arrowLeft',
and make the tile look right.
Karl
More information about the Squeak-dev
mailing list
|