Drawing a rectangular matrix of circles - an NSMatrix?
Drawing a rectangular matrix of circles - an NSMatrix?
- Subject: Drawing a rectangular matrix of circles - an NSMatrix?
- From: Scott Ellsworth <email@hidden>
- Date: Thu, 01 Dec 2005 11:49:43 -0800
Hi, all.
I am working on a puzzle game, sort of like minesweeper, and I am
trying to figure out how best to draw the display. Should I draw it
all in one NSView's drawRect, should I figure out an NSMatrix, or
should I use a whole passel of much simpler NSView subclasses for
each dot?
The puzzle consists of an n x n matrix of dots, each listing the
number of network links it has to its neighbors. Lines may not
cross, and may go only to the eight neighbors around it.
The problem and solution will be in different windows, but the draw
code will be quite similar.
See <
http://homepage.mac.com/fuz/dots.png> for the look I am after.
Eventually, I want the user to be able to click on a dot and drag a
line to the next dot, so I can draw a line. This is not hard a
priori - I have done stuff like this with one big DotView before, but
I am wondering if this is really the best way to handle this
situation. As mentioned above, the draw code would be simpler with a
whole passel of simpler NSViews as subviews of the main view, and
there is always NSMatrix.
Suggestions?
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden