Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 72 lines (53 sloc) 2.258 kb
42cf7bb @chazmcgarvey The Cheat 1.0b3
chazmcgarvey authored
1
556707a @chazmcgarvey The Cheat 1.2.5
chazmcgarvey authored
2 /*
3 * The Cheat - The legendary universal game trainer for Mac OS X.
1654f21 @chazmcgarvey update contact information and project URL
chazmcgarvey authored
4 * http://www.brokenzipper.com/trac/wiki/TheCheat
556707a @chazmcgarvey The Cheat 1.2.5
chazmcgarvey authored
5 *
1654f21 @chazmcgarvey update contact information and project URL
chazmcgarvey authored
6 * Copyright (c) 2003-2011, Charles McGarvey et al.
556707a @chazmcgarvey The Cheat 1.2.5
chazmcgarvey authored
7 *
8 * Distributable under the terms and conditions of the 2-clause BSD
9 * license; see the file COPYING for the legal text of the license.
10 */
42cf7bb @chazmcgarvey The Cheat 1.0b3
chazmcgarvey authored
11
12 #import "AboutBoxController.h"
13
14
15 @implementation AboutBoxController
16
17
18 - (id)init
19 {
20 return [super initWithWindowNibName:@"AboutBox"];
21 }
22
23 - (void)windowDidLoad
24 {
d27548f @chazmcgarvey The Cheat 1.2
chazmcgarvey authored
25 NSDictionary *attributes;
26 NSAttributedString *string;
27
28 // set the version string
29 [ibNameVersionText setStringValue:[NSString stringWithFormat:@"Version %@", ChazAppVersion()]];
30 // set the built string
31 [ibDateText setStringValue:[NSString stringWithFormat:@"Built %@", [ChazAppBuildDate() description]]];
32
33 // set the attributes for the website and email links
34 attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSColor blueColor], NSForegroundColorAttributeName,
35 [NSNumber numberWithBool:YES], NSUnderlineStyleAttributeName,
36 [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]], NSFontAttributeName, nil];
37
38 string = [[NSAttributedString alloc] initWithString:[ibWebsiteButton title] attributes:attributes];
39 [ibWebsiteButton setAttributedTitle:string];
40 [string release];
41 string = [[NSAttributedString alloc] initWithString:[ibEmailButton title] attributes:attributes];
42 [ibEmailButton setAttributedTitle:string];
43 [string release];
44
45 attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSColor redColor], NSForegroundColorAttributeName,
46 [NSNumber numberWithBool:YES], NSUnderlineStyleAttributeName,
47 [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]], NSFontAttributeName, nil];
48
49 string = [[NSAttributedString alloc] initWithString:[ibWebsiteButton title] attributes:attributes];
50 [ibWebsiteButton setAttributedAlternateTitle:string];
51 [string release];
52 string = [[NSAttributedString alloc] initWithString:[ibEmailButton title] attributes:attributes];
53 [ibEmailButton setAttributedAlternateTitle:string];
54 [string release];
55
56 [[self window] center];
42cf7bb @chazmcgarvey The Cheat 1.0b3
chazmcgarvey authored
57 }
58
d27548f @chazmcgarvey The Cheat 1.2
chazmcgarvey authored
59
60 - (IBAction)ibWebsiteButton:(id)sender
42cf7bb @chazmcgarvey The Cheat 1.0b3
chazmcgarvey authored
61 {
62 LaunchWebsite();
63 }
64
d27548f @chazmcgarvey The Cheat 1.2
chazmcgarvey authored
65 - (IBAction)ibEmailButton:(id)sender
42cf7bb @chazmcgarvey The Cheat 1.0b3
chazmcgarvey authored
66 {
67 LaunchEmail();
68 }
69
70
71 @end
Something went wrong with that request. Please try again.