src/video/cocoa/SDL_cocoamessagebox.m
changeset 6836 b0ca1571caf3
parent 6832 156e608ec4ef
child 6848 478ecc8a58b3
equal deleted inserted replaced
6835:c259f0817583 6836:b0ca1571caf3
    54         [alert setInformativeText:[NSString stringWithUTF8String:messageboxdata->message]];
    54         [alert setInformativeText:[NSString stringWithUTF8String:messageboxdata->message]];
    55 
    55 
    56         const SDL_MessageBoxButtonData *buttons = messageboxdata->buttons;
    56         const SDL_MessageBoxButtonData *buttons = messageboxdata->buttons;
    57         int i;
    57         int i;
    58         for (i = 0; i < messageboxdata->numbuttons; ++i) {
    58         for (i = 0; i < messageboxdata->numbuttons; ++i) {
    59             NSButton *button = [alert addButtonWithTitle:[[NSString alloc] initWithUTF8String:buttons[i].text]];
    59             NSButton *button = [alert addButtonWithTitle:[NSString stringWithUTF8String:buttons[i].text]];
    60             if (buttons[i].flags & SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT) {
    60             if (buttons[i].flags & SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT) {
    61                 [button setKeyEquivalent:@"\r"];
    61                 [button setKeyEquivalent:@"\r"];
    62             } else if (buttons[i].flags & SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT) {
    62             } else if (buttons[i].flags & SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT) {
    63                 [button setKeyEquivalent:@"\033"];
    63                 [button setKeyEquivalent:@"\033"];
    64             } else {
    64             } else {