Morph suggestion?
Ned Konz
ned at bike-nomad.com
Thu Aug 15 00:06:41 UTC 2002
On Wednesday 14 August 2002 03:47 pm, Jason Dufair wrote:
> I'm not asking for much, am I? :-) I suspect that I'll need to
> build my own morph, especially to do the last two things. Can
> anyone give me a suggestion of what to start with for a superclass?
Morph. It's got *plenty* of behavior, believe me.
Or maybe ScrollPane if you want scroll bars. Though the model of the
ScrollPane pretty much leaves it in charge of translating a number of
other morphs. If you just want a scroll bar, you might want to just
add one as an input widget and draw everything else yourself.
I don't think that any of the other Morph subclasses gives you enough
behavior to matter (unless I'm missing one, there's none that does
the centered selection and variable transparency).
You'll have to have custom event handling code for keystrokes and
mouse events.
And you'll have to have a custom drawOn: method to do the
transparency. Look at the various drawing methods in the Canvas
subclasses.
A UI question that you'll have to answer:
What happens when someone clicks on a choice that's not in the middle?
does it suddenly jump to the center and become darker? That would be
disconcerting...
I'd probably want to make the selected item do a smooth scroll to the
center, but...
Actually, it sounds pretty simple to implement, with the most
complicated part being the animations and list drawing logic (where
to position the entries given a certain list and selection).
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|