add file picking for osx and ios and implement equirectangular import

This commit is contained in:
2017-12-09 09:07:42 +00:00
parent d18b1103bb
commit f4cd7fdc62
20 changed files with 218 additions and 8 deletions

View File

@@ -22,6 +22,7 @@ void App::showKeyboard()
LOG("show keyboard");
redraw = true;
#ifdef __IOS__
[ios_view registerForKeyboardNotifications];
[ios_view becomeFirstResponder];
#elif __ANDROID__
displayKeyboard(and_app, true);
@@ -34,11 +35,25 @@ void App::hideKeyboard()
redraw = true;
#ifdef __IOS__
[ios_view resignFirstResponder];
[ios_view unregisterForKeyboardNotifications];
#elif __ANDROID__
displayKeyboard(and_app, false);
#endif
}
void App::pick_image(std::function<void(std::string path)> callback)
{
redraw = true;
#ifdef __IOS__
[ios_view pick_photo:callback];
#elif __OSX__
std::string path = [osx_view pick_file];
callback(path);
#elif __ANDROID__
//displayKeyboard(and_app, false);
#endif
}
bool App::mouse_down(int button, float x, float y, float pressure, kEventSource source)
{
redraw = true;