2 // **********************************************************************
3 // The Cheat - A universal game cheater for Mac OS X
4 // (C) 2003-2005 Chaz McGarvey (BrokenZipper)
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 1, or (at your option)
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #import "AboutBoxController.h"
24 @implementation AboutBoxController
29 return [super initWithWindowNibName
:@
"AboutBox"];
34 NSDictionary
*attributes
;
35 NSAttributedString
*string
;
37 // set the version string
38 [ibNameVersionText setStringValue
:[NSString stringWithFormat
:@
"Version %@", ChazAppVersion()]];
39 // set the built string
40 [ibDateText setStringValue
:[NSString stringWithFormat
:@
"Built %@", [ChazAppBuildDate() description
]]];
42 // set the attributes for the website and email links
43 attributes
= [NSDictionary dictionaryWithObjectsAndKeys
:[NSColor blueColor
], NSForegroundColorAttributeName
,
44 [NSNumber numberWithBool
:YES
], NSUnderlineStyleAttributeName
,
45 [NSFont systemFontOfSize
:[NSFont systemFontSizeForControlSize
:NSSmallControlSize
]], NSFontAttributeName
, nil];
47 string
= [[NSAttributedString alloc
] initWithString
:[ibWebsiteButton title
] attributes
:attributes
];
48 [ibWebsiteButton setAttributedTitle
:string
];
50 string
= [[NSAttributedString alloc
] initWithString
:[ibEmailButton title
] attributes
:attributes
];
51 [ibEmailButton setAttributedTitle
:string
];
54 attributes
= [NSDictionary dictionaryWithObjectsAndKeys
:[NSColor redColor
], NSForegroundColorAttributeName
,
55 [NSNumber numberWithBool
:YES
], NSUnderlineStyleAttributeName
,
56 [NSFont systemFontOfSize
:[NSFont systemFontSizeForControlSize
:NSSmallControlSize
]], NSFontAttributeName
, nil];
58 string
= [[NSAttributedString alloc
] initWithString
:[ibWebsiteButton title
] attributes
:attributes
];
59 [ibWebsiteButton setAttributedAlternateTitle
:string
];
61 string
= [[NSAttributedString alloc
] initWithString
:[ibEmailButton title
] attributes
:attributes
];
62 [ibEmailButton setAttributedAlternateTitle
:string
];
65 [[self window
] center
];
69 - (IBAction
)ibWebsiteButton
:(id)sender
74 - (IBAction
)ibEmailButton
:(id)sender