add support for Apple Pencil and build for iOS

This commit is contained in:
2017-07-28 20:35:59 +01:00
parent e32329ea98
commit 0907429a60
15 changed files with 236 additions and 35 deletions

View File

@@ -3,6 +3,10 @@
#include "node_panel_brush.h"
#include "asset.h"
#ifdef __APPLE__
#include <Foundation/Foundation.h>
#endif
Node* NodeButtonBrush::clone_instantiate() const
{
return new NodeButtonBrush();
@@ -99,9 +103,13 @@ std::vector<std::string> NodePanelBrush::FindAllBrushes(std::string folder)
}
AAssetDir_close(dir);
#else
NSString* bundle_path = [[NSBundle mainBundle] resourcePath];
std::string base = [bundle_path cStringUsingEncoding:1];
std::string abs_path = base + "/" + folder;
DIR *dp;
struct dirent *ep;
dp = opendir(folder.c_str());
dp = opendir(abs_path.c_str());
if (dp != NULL)
{