From 76011a9781ee9a78d674d28dbddff1ea92b3d070 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Thu, 7 May 2015 10:32:42 +0200 Subject: [PATCH] (iOS/CocoaTouch) Set Resume on righthand side --- ui/drivers/cocoa/cocoatouch_menu.m | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/drivers/cocoa/cocoatouch_menu.m b/ui/drivers/cocoa/cocoatouch_menu.m index 4a6cb7e694..6175a08e11 100644 --- a/ui/drivers/cocoa/cocoatouch_menu.m +++ b/ui/drivers/cocoa/cocoatouch_menu.m @@ -742,8 +742,8 @@ static void RunActionSheet(const char* title, const struct string_list* items, U [self set_leftbutton:BOXSTRING("Back") target:weakSelf action:@selector(menuBack)]; - else - [self set_leftbutton:BOXSTRING("Resume") + + [self set_rightbutton:BOXSTRING("Resume") target:[RetroArch_iOS get] action:@selector(showGameView)]; @@ -761,6 +761,16 @@ static void RunActionSheet(const char* title, const struct string_list* items, U action:action]; } +- (void) set_rightbutton:(NSString *)title target:(id)target action:(SEL)action +{ + self.navigationItem.rightBarButtonItem = + [[UIBarButtonItem alloc] + initWithTitle:title + style:UIBarButtonItemStyleBordered + target:target + action:action]; +} + // JM: This could go down into RA void get_core_title(char *title_msg, size_t title_msg_len) {