Changing the shape of NSButton
Changing the shape of NSButton
- Subject: Changing the shape of NSButton
- From: Kevin C Stevens <email@hidden>
- Date: Mon, 29 Jul 2002 20:51:33 -0400 (EDT)
I am working on my first Cocoa application, specifically a user interface.
To minimize mouse movement while maximizing clickable area, I am basing
part of the interface on hex maps (familiar to all of us who played D&D).
Poking around the API, it seems that I need to do one of two things,
neither of which do I have the knowledge to pull off: (the third thing,
the good idea I missed, will hopefully be supplied by someone else)
1. Overload the draw methods for NSButton in a subclass in order to create
a hexagon. Sounds good, but the only draw methods I saw were strictly
related to rectangles. Can I do this?
2. Create a custom class that aggregates three NSButtons configured to
rectangles, then rotate two of them 60 degrees (one positive and one
negative).
Assuming I can do either of these two things, can I put the new button
object on a palette in IB?
Many thanks,
Kevin Stevens
Dept. of Computer Science and Engineering
University of Buffalo, SUNY
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.