This commit is contained in:
2019-10-14 15:32:47 +02:00
9 changed files with 64 additions and 15 deletions

View File

@@ -22,6 +22,7 @@
#if defined(__OBJC__) && defined(__IOS__)
#import <Foundation/Foundation.h>
#import "GameViewController.h"
#import "AppDelegate.h"
#endif
#if defined(__OBJC__) && defined(__OSX__)
@@ -152,6 +153,7 @@ public:
#if defined(__IOS__) && defined(__OBJC__)
GameViewController* ios_view;
AppDelegate* ios_app;
#elif defined(__OSX__) && defined(__OBJC__)
View* osx_view;
AppOSX* osx_app;

View File

@@ -1012,6 +1012,13 @@ void App::init_menu_tools()
popup_exp->destroy();
};
#if __IOS__
popup_exp->find<NodeButtonCustom>("sonarpen")->on_click = [this, popup_exp](Node*) {
[ios_app sonarpen_start];
popup_exp->mouse_release();
popup_exp->destroy();
};
#endif
};
}
}

View File

@@ -145,7 +145,8 @@ bool Asset::create_dir(const std::string& path)
return android_create_dir(path);
#elif __IOS__ || __OSX__
return apple_create_dir(path);
else
#else
// TODO: implement for linux and web
return false;
#endif
}