|
|
NSButton
|
|
|
|
Mac Elite
Join Date: May 2002
Location: New York City
Status:
Offline
|
|
I need a little help here.
How do I draw an NSButton using three images?
For example, in iPhoto, the Import, Organize, etc. buttons are actually three separate images functioning as a single button.
Any suggestions?
Thanks.
(
Last edited by zachs; May 23, 2003 at 02:53 AM.
)
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: 'round the corner
Status:
Offline
|
|
yeah, i wanna know to
there is the DOWN, UP, and INACTIVE state for the buttons
how do you do that?
I DEMAND TO KNOW AS WELL!
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Dec 2001
Status:
Offline
|
|
Originally posted by Nebagakid:
yeah, i wanna know to
there is the DOWN, UP, and INACTIVE state for the buttons
how do you do that?
I DEMAND TO KNOW AS WELL!
Nebagakid, you are not only a jerk, but an idiot as well.
The types of buttons used in iPhoto (the "plastic" ones) are made up of a lot of images. There are normal, pressed, selected, and disabled states for each, and each of those has a left cap, right cap, left divider cap, right divider cap, and a "stretch" piece. That's 20 images in all. To make these in your own app, you'll need to subclass NSControl and NSCell and draw your buttons manually. Why not just use normal buttons?
|
"Think Different. Like The Rest Of Us."
iBook G4/1.2GHz | 1.25GB | 60GB | Mac OS X 10.4.2
Athlon XP 2500+/1.83GHz | 1GB PC3200 | 120GB | Windows XP
|
|
|
|
|
|
|
|
Banned
Join Date: Apr 2002
Location: -
Status:
Offline
|
|
Originally posted by Nebagakid:
yeah, i wanna know to
there is the DOWN, UP, and INACTIVE state for the buttons
how do you do that?
I DEMAND TO KNOW AS WELL!
uh? NSButtons do that too. relax man.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: 'round the corner
Status:
Offline
|
|
Originally posted by ambush:
uh? NSButtons do that too. relax man.
but these are custom non-system wide buttons
|
|
|
|
|
|
|
|
|
Banned
Join Date: Apr 2002
Location: -
Status:
Offline
|
|
Originally posted by Nebagakid:
but these are custom non-system wide buttons
Nope. I've seen non subclass implementation on the net.
http://www.buzzlabs.com/aquataxx/
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: May 2001
Location: 127.0.0.1
Status:
Offline
|
|
Kinda OT but...
Wow... thanks for that link! I followed it and found it to be a very cool game with full source code. The best part -- the source is Java + Cocoa. The game is *very* slick and is a great example of what can be accomplished by mixing Java & Cocoa.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|