mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 06:40:18 +00:00
Display OSD messages in cocoatouch
This commit is contained in:
parent
5e57b96225
commit
18d157acea
@ -42,6 +42,7 @@
|
||||
@property (nonatomic) NSMutableArray* sections;
|
||||
@property (nonatomic) BOOL hidesHeaders;
|
||||
@property (nonatomic) RAMenuBase* last_menu;
|
||||
@property (nonatomic) UILabel *osdmessage;
|
||||
|
||||
- (id)initWithStyle:(UITableViewStyle)style;
|
||||
- (id)itemForIndexPath:(NSIndexPath*)indexPath;
|
||||
|
@ -599,6 +599,13 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
[message show];
|
||||
}
|
||||
|
||||
|
||||
-(void)msgQueuePush:(NSString *)msg
|
||||
{
|
||||
self.osdmessage.text = msg;
|
||||
}
|
||||
|
||||
|
||||
- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
|
||||
{
|
||||
switch (buttonIndex)
|
||||
@ -612,7 +619,6 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
@end
|
||||
|
||||
@interface RAMainMenu : RAMenuBase<RAMenuActioner>
|
||||
@property(nonatomic) UILabel *osdmessage;
|
||||
@end
|
||||
|
||||
@implementation RAMainMenu
|
||||
|
@ -567,6 +567,17 @@ static void ui_companion_cocoatouch_render_messagebox(const char *msg)
|
||||
}
|
||||
}
|
||||
|
||||
static void ui_companion_cocoatouch_msg_queue_push(const char *msg,
|
||||
unsigned priority, unsigned duration, bool flush)
|
||||
{
|
||||
RetroArch_iOS *ap = (RetroArch_iOS *)apple_platform;
|
||||
|
||||
if (ap && msg)
|
||||
{
|
||||
[ap.mainmenu msgQueuePush: [NSString stringWithUTF8String:msg]];
|
||||
}
|
||||
}
|
||||
|
||||
const ui_companion_driver_t ui_companion_cocoatouch = {
|
||||
ui_companion_cocoatouch_init,
|
||||
ui_companion_cocoatouch_deinit,
|
||||
@ -576,7 +587,7 @@ const ui_companion_driver_t ui_companion_cocoatouch = {
|
||||
ui_companion_cocoatouch_notify_content_loaded,
|
||||
ui_companion_cocoatouch_notify_list_pushed,
|
||||
ui_companion_cocoatouch_notify_refresh,
|
||||
NULL,
|
||||
ui_companion_cocoatouch_msg_queue_push,
|
||||
ui_companion_cocoatouch_render_messagebox,
|
||||
"cocoatouch",
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user