]> Dogcows Code - chaz/thecheat/blob - AboutBoxController.m
The Cheat 1.2.3
[chaz/thecheat] / AboutBoxController.m
1
2 // **********************************************************************
3 // The Cheat - A universal game cheater for Mac OS X
4 // (C) 2003-2005 Chaz McGarvey (BrokenZipper)
5 //
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)
9 // any later version.
10 //
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.
15 //
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.
19 //
20
21 #import "AboutBoxController.h"
22
23
24 @implementation AboutBoxController
25
26
27 - (id)init
28 {
29 return [super initWithWindowNibName:@"AboutBox"];
30 }
31
32 - (void)windowDidLoad
33 {
34 NSDictionary *attributes;
35 NSAttributedString *string;
36
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]]];
41
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];
46
47 string = [[NSAttributedString alloc] initWithString:[ibWebsiteButton title] attributes:attributes];
48 [ibWebsiteButton setAttributedTitle:string];
49 [string release];
50 string = [[NSAttributedString alloc] initWithString:[ibEmailButton title] attributes:attributes];
51 [ibEmailButton setAttributedTitle:string];
52 [string release];
53
54 attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSColor redColor], NSForegroundColorAttributeName,
55 [NSNumber numberWithBool:YES], NSUnderlineStyleAttributeName,
56 [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]], NSFontAttributeName, nil];
57
58 string = [[NSAttributedString alloc] initWithString:[ibWebsiteButton title] attributes:attributes];
59 [ibWebsiteButton setAttributedAlternateTitle:string];
60 [string release];
61 string = [[NSAttributedString alloc] initWithString:[ibEmailButton title] attributes:attributes];
62 [ibEmailButton setAttributedAlternateTitle:string];
63 [string release];
64
65 [[self window] center];
66 }
67
68
69 - (IBAction)ibWebsiteButton:(id)sender
70 {
71 LaunchWebsite();
72 }
73
74 - (IBAction)ibEmailButton:(id)sender
75 {
76 LaunchEmail();
77 }
78
79
80 @end
This page took 0.032924 seconds and 4 git commands to generate.