1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-14 10:09:11 +00:00

(svn r3375) -Add: [ FS#29 ] show an error dialog for OSX cocoa driver (egladil)

This commit is contained in:
truelight
2006-01-06 21:27:44 +00:00
parent b542f784f9
commit 10a2787fd5
2 changed files with 65 additions and 2 deletions

View File

@@ -8,11 +8,33 @@
* To insure that the crosscompiler still works, let him try any changes before they are committed
*/
#ifdef WITH_SDL
void ShowMacDialog ( const char *title, const char *message, const char *buttonLabel )
{
NSRunAlertPanel([NSString stringWithCString: title], [NSString stringWithCString: message], [NSString stringWithCString: buttonLabel], nil, nil);
}
#elif defined WITH_COCOA
void CocoaDialog ( const char *title, const char *message, const char *buttonLabel );
void ShowMacDialog ( const char *title, const char *message, const char *buttonLabel )
{
CocoaDialog(title, message, buttonLabel);
}
#else
void ShowMacDialog ( const char *title, const char *message, const char *buttonLabel )
{
fprintf(stderr, "%s: %s\n", title, message);
}
#endif
void ShowMacAssertDialog ( const char *function, const char *file, const int line, const char *expression )
{
const char *buffer =