add changelog dialog and display_file api (implemented in osx and ios)
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user