3 * The Cheat - The legendary universal game trainer for Mac OS X.
4 * http://www.dogcows.com/chaz/wiki/TheCheat
6 * Copyright (c) 2003-2010, Charles McGarvey et al.
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.
12 #import "AboutBoxController.h"
15 @implementation AboutBoxController
20 return [super initWithWindowNibName
:@
"AboutBox"];
25 NSDictionary
*attributes
;
26 NSAttributedString
*string
;
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
]]];
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];
38 string
= [[NSAttributedString alloc
] initWithString
:[ibWebsiteButton title
] attributes
:attributes
];
39 [ibWebsiteButton setAttributedTitle
:string
];
41 string
= [[NSAttributedString alloc
] initWithString
:[ibEmailButton title
] attributes
:attributes
];
42 [ibEmailButton setAttributedTitle
:string
];
45 attributes
= [NSDictionary dictionaryWithObjectsAndKeys
:[NSColor redColor
], NSForegroundColorAttributeName
,
46 [NSNumber numberWithBool
:YES
], NSUnderlineStyleAttributeName
,
47 [NSFont systemFontOfSize
:[NSFont systemFontSizeForControlSize
:NSSmallControlSize
]], NSFontAttributeName
, nil];
49 string
= [[NSAttributedString alloc
] initWithString
:[ibWebsiteButton title
] attributes
:attributes
];
50 [ibWebsiteButton setAttributedAlternateTitle
:string
];
52 string
= [[NSAttributedString alloc
] initWithString
:[ibEmailButton title
] attributes
:attributes
];
53 [ibEmailButton setAttributedAlternateTitle
:string
];
56 [[self window
] center
];
60 - (IBAction
)ibWebsiteButton
:(id)sender
65 - (IBAction
)ibEmailButton
:(id)sender