[SUBMISSION] The Quinto Game.

Ned Konz ned at bike-nomad.com
Thu Aug 15 01:54:42 UTC 2002


On Tuesday 13 August 2002 11:37 pm, Edmund Ronald wrote:

> BTW I would be willing to write a tutorial  for layout myself, if
> someone would just tell me what the keywords etc are supposed to
> do.

There is a good layout tutorial on BSS called MorphLayoutArticle.

and a page on layout at:
http://minnow.cc.gatech.edu/squeak/2141

> A couple of one-line comments in the code would be appropriate
> here.

Yes. Or in the class comment, though the class comment in TableLayout 
might be helpful.

If you have a custom layout (like a board game, for instance), you 
might want to consider making your own LayoutPolicy class (which more 
or less just has to be able to do #layout:in:).

Or you might use a ProportionalLayout; this lets you provide a frame 
for each submorph whose bounds can be located using both proportional 
and absolute measurements (i.e. you can place the top edge of a 
submorph 10 pixels below the horizontal centerline of its parent).

The attached change set shows how you might dispense with the 
AlignmentMorphs and TableLayouts altogether by using a 
ProportionalLayout.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QuintoLayout-nk.1.cs
Type: text/x-squeak-changeset
Size: 2068 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020814/4cf66f2c/QuintoLayout-nk.1.bin


More information about the Squeak-dev mailing list