mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 19:50:45 +00:00
09f0c239b6
git-svn-id: https://svn.eduke32.com/eduke32@5 1a8010ca-5511-0410-912e-c29ae57300e0
37 lines
788 B
Objective-C
37 lines
788 B
Objective-C
#include "osxbits.h"
|
|
#include <Cocoa/Cocoa.h>
|
|
|
|
int osx_msgbox(char *name, char *msg)
|
|
{
|
|
NSAlert *alert = [[NSAlert alloc] init];
|
|
NSString *mmsg = [[NSString alloc] initWithCString: msg];
|
|
[alert addButtonWithTitle: @"OK"];
|
|
[alert setMessageText: mmsg];
|
|
[alert setAlertStyle: NSInformationalAlertStyle];
|
|
|
|
[alert runModal];
|
|
|
|
[alert release];
|
|
[mmsg release];
|
|
|
|
return 0;
|
|
}
|
|
|
|
int osx_ynbox(char *name, char *msg)
|
|
{
|
|
NSAlert *alert = [[NSAlert alloc] init];
|
|
NSString *mmsg = [[NSString alloc] initWithCString: msg];
|
|
int r;
|
|
|
|
[alert addButtonWithTitle:@"Yes"];
|
|
[alert addButtonWithTitle:@"No"];
|
|
[alert setMessageText: mmsg];
|
|
[alert setAlertStyle: NSInformationalAlertStyle];
|
|
|
|
r = ([alert runModal] == NSAlertFirstButtonReturn);
|
|
|
|
[alert release];
|
|
[mmsg release];
|
|
|
|
return r;
|
|
}
|