23 #if SDL_VIDEO_DRIVER_UIKIT
33 @interface UIKit_UIAlertViewDelegate : NSObject <UIAlertViewDelegate> {
35 int *clickedButtonIndex;
38 - (
id)initWithButtonIndex:(
int *)_buttonIndex;
39 - (
void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex;
43 @implementation UIKit_UIAlertViewDelegate
45 - (
id)initWithButtonIndex:(
int *)buttonIndex
51 self->clickedButtonIndex = buttonIndex;
56 - (
void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex;
58 *clickedButtonIndex = buttonIndex;
65 UIKit_ShowingMessageBox()
67 return s_showingMessageBox;
75 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
77 UIAlertView* alert = [[UIAlertView alloc] init];
79 alert.title = [NSString stringWithUTF8String:messageboxdata->title];
80 alert.message = [NSString stringWithUTF8String:messageboxdata->message];
81 alert.delegate = [[UIKit_UIAlertViewDelegate alloc] initWithButtonIndex:&clicked];
85 for (i = 0; i < messageboxdata->
numbuttons; ++i) {
86 [alert addButtonWithTitle:[[NSString alloc] initWithUTF8String:buttons[i].text]];
97 while (clicked == messageboxdata->
numbuttons) {
98 [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
104 [alert.delegate release];
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
const SDL_MessageBoxButtonData * buttons
MessageBox structure containing title, text, window, etc.