add changelog dialog and display_file api (implemented in osx and ios)

This commit is contained in:
2018-09-24 16:03:43 +02:00
parent c6f8bf7b9f
commit f1ff142d91
12 changed files with 152 additions and 3 deletions

View File

@@ -62,6 +62,21 @@ NSThread* lock_thread;
[self.context presentRenderbuffer:GL_RENDERBUFFER];
}
-(void)display_file:(std::string)filename
{
NSString* filePath = [NSString stringWithUTF8String:filename.c_str()];
NSURL *url = [NSURL fileURLWithPath:filePath];
UIDocumentInteractionController *popup = [UIDocumentInteractionController interactionControllerWithURL:url];
[popup setDelegate:self];
[popup presentPreviewAnimated:YES];
}
-(UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller
{
return self;
}
- (void)pick_photo:(std::function<void(std::string)>) callback
{
GameImagePicker *picker = [[GameImagePicker alloc] init];