aboutsummaryrefslogtreecommitdiff
path: root/misc/osxfe/ioquake3fe/ErrorWindow.m
diff options
context:
space:
mode:
Diffstat (limited to 'misc/osxfe/ioquake3fe/ErrorWindow.m')
-rw-r--r--misc/osxfe/ioquake3fe/ErrorWindow.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/misc/osxfe/ioquake3fe/ErrorWindow.m b/misc/osxfe/ioquake3fe/ErrorWindow.m
new file mode 100644
index 0000000..93a8d91
--- /dev/null
+++ b/misc/osxfe/ioquake3fe/ErrorWindow.m
@@ -0,0 +1,18 @@
+#import "ErrorWindow.h"
+
+@implementation ErrorWindow
+
+- (void)bitch:(NSString *)errorlog {
+ NSLog(errorlog);
+
+ NSNib *nib = [[NSNib alloc] initWithNibNamed:@"ErrorWindow.nib" bundle:[NSBundle mainBundle]];
+ [nib instantiateNibWithOwner:self topLevelObjects:nil];
+
+ [errorWindow makeKeyWindow];
+ [errorTextField setFont:[NSFont userFixedPitchFontOfSize:12.0]];
+ [errorTextField setString:@""];
+ [[errorTextField textStorage] appendAttributedString:[[[NSAttributedString alloc] initWithString:errorlog] autorelease]];
+ [errorTextField scrollRangeToVisible:NSMakeRange([[errorTextField string] length], 0)];
+}
+
+@end