]> Dogcows Code - chaz/thecheat/blobdiff - AboutBoxController.m
The Cheat 1.2
[chaz/thecheat] / AboutBoxController.m
index 6211a41862446460dca7566b3f8e791e8633b5f1..7e1b5fd1a8c3684554cbca3be4ab12be7a8f0bc8 100644 (file)
@@ -1,17 +1,25 @@
 
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Project:   The Cheat
-//
-// File:      AboutBoxController.m
-// Created:   Mon Nov 24 2003
-//
-// Copyright: 2003 Chaz McGarvey.  All rights reserved.
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// **********************************************************************
+// The Cheat - A universal game cheater for Mac OS X
+// (C) 2003-2005 Chaz McGarvey (BrokenZipper)
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 1, or (at your option)
+// any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// 
 
 #import "AboutBoxController.h"
 
-#include "cheat_shared.h"
-
 
 @implementation AboutBoxController
 
 
 - (void)windowDidLoad
 {
-       [nameVersionText setStringValue:[NSString stringWithFormat:@"%@ %@", [CMUpdateCheck appName], [CMUpdateCheck appVersion]]];
-       [aboutWindow center];
+       NSDictionary *attributes;
+       NSAttributedString *string;
+       
+       // set the version string
+       [ibNameVersionText setStringValue:[NSString stringWithFormat:@"Version %@", ChazAppVersion()]];
+       // set the built string
+       [ibDateText setStringValue:[NSString stringWithFormat:@"Built %@", [ChazAppBuildDate() description]]];
+       
+       // set the attributes for the website and email links
+       attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSColor blueColor], NSForegroundColorAttributeName,
+               [NSNumber numberWithBool:YES], NSUnderlineStyleAttributeName,
+               [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]], NSFontAttributeName, nil];
+       
+       string = [[NSAttributedString alloc] initWithString:[ibWebsiteButton title] attributes:attributes];
+       [ibWebsiteButton setAttributedTitle:string];
+       [string release];
+       string = [[NSAttributedString alloc] initWithString:[ibEmailButton title] attributes:attributes];
+       [ibEmailButton setAttributedTitle:string];
+       [string release];
+       
+       attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSColor redColor], NSForegroundColorAttributeName,
+               [NSNumber numberWithBool:YES], NSUnderlineStyleAttributeName,
+               [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]], NSFontAttributeName, nil];
+       
+       string = [[NSAttributedString alloc] initWithString:[ibWebsiteButton title] attributes:attributes];
+       [ibWebsiteButton setAttributedAlternateTitle:string];
+       [string release];
+       string = [[NSAttributedString alloc] initWithString:[ibEmailButton title] attributes:attributes];
+       [ibEmailButton setAttributedAlternateTitle:string];
+       [string release];
+       
+       [[self window] center];
 }
 
-- (IBAction)launchWebsiteButton:(id)sender
+
+- (IBAction)ibWebsiteButton:(id)sender
 {
        LaunchWebsite();
 }
 
-- (IBAction)launchEmailButton:(id)sender
+- (IBAction)ibEmailButton:(id)sender
 {
        LaunchEmail();
 }
This page took 0.020635 seconds and 4 git commands to generate.