Additional Button Styles for OS X
BlitzMax Forums/BlitzMax Module Tweaks/Additional Button Styles for OS X
| ||
There are many additional button styles on OS X than what is available as standard in MaxGui. I've been able to get some of the additional button styles to work. The following is the procedure I used to accomplish this: maxgui.h Start a new line after line 41 and paste the following: #define BUTTON_ICON 6 #define BUTTON_CIRCLE 7 #define BUTTON_METAL 8 #define BUTTON_HELP 9 #define BUTTON_INSETSQUARE 10 #define BUTTON_INSETROUND 11 #define BUTTON_RECTROUND 12 #define BUTTON_RECESSED 13 gadget.bmx Start a new line after line 73 and paste the following: Const BUTTON_ICON=6 Const BUTTON_CIRCLE=7 Const BUTTON_METAL=8 Const BUTTON_HELP=9 Const BUTTON_INSETSQUARE=10 Const BUTTON_INSETROUND=11 Const BUTTON_RECTROUND=12 Const BUTTON_RECESSED=13 cocoa.macos.m Start a new line after line 1621 and paste the following: (If line 1621 is not "if (style==BUTTON_CANCEL) [button setKeyEquivalent:@"\x1b"];")", then do a find for "case GADGET_BUTTON:". Scroll down until you see the above code and start a new line after that.) if (style==BUTTON_ICON) [button setBezelStyle:NSShadowlessSquareBezelStyle]; if (style==BUTTON_CIRCLE) [button setBezelStyle:NSCircularBezelStyle]; if (style==BUTTON_METAL) [button setBezelStyle:NSTexturedSquareBezelStyle]; if (style==BUTTON_HELP) [button setBezelStyle:NSHelpButtonBezelStyle]; if (style==BUTTON_INSETSQUARE) [button setBezelStyle:NSSmallSquareBezelStyle]; if (style==BUTTON_INSETROUND) [button setBezelStyle:NSTexturedRoundedBezelStyle]; if (style==BUTTON_RECTROUND) [button setBezelStyle:NSRoundRectBezelStyle]; if (style==BUTTON_RECESSED) [button setBezelStyle:NSRecessedBezelStyle]; Save all the changes and rebuild all modules. Now the following constants will be available to your CreateButton(): BUTTON_ICON BUTTON_CIRCLE BUTTON_METAL BUTTON_HELP BUTTON_INSETSQUARE BUTTON_INSETROUND BUTTON_RECTROUND BUTTON_RECESSED Some of the new styles are not resizable, such as BUTTON_CIRCLE and BUTTON_HELP. They are fixed size circular buttons. The BUTTON_INSETSQUARE is resizable in it's width only and not it's height. All the other styles are completely resizable. Credits: Thanks goes to skidracer for giving me help on this. -Garrett |
| ||
All very useful too! Thanks :-) |
| ||
Believe it or not there is a Mac OS X forum here but it's hard to find. I'm trying to get the forum administrator to move the Mac os X forum from the very bottom of the forum lists to the BlitzMax list. Considering the only Blitz product available for Mac os X is BlitzMax it makes sense. Currently Mac topics end up in the general forum and disappear very quickly. I urge all Mac users who would like to see the forum promoted and visible to all to contact the Blitz webmaster using this link http://www.blitzbasic.com/Contact/_index_.php |