//------------------------------------------------------------------------------
#include <dali/dali.h>
+#include <dali/devel-api/adaptor-framework/file-loader.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/devel-api/builder/builder.h>
#include <dali-toolkit/devel-api/builder/tree-node.h>
std::time_t mLastTime;
std::string mstringPath;
- std::string GetFileContents(const std::string &fn)
+ std::string GetFileContents(const std::string &filename)
{
- std::ifstream t(fn.c_str());
- return std::string((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());
+ std::streampos bufferSize = 0;
+ Dali::Vector<char> fileBuffer;
+ if( !Dali::FileLoader::ReadFile( filename, bufferSize, fileBuffer, FileLoader::FileType::BINARY ) )
+ {
+ return std::string();
+ }
+
+ return std::string( &fileBuffer[0], bufferSize );
};
};
if(!layer)
{
layer = Layer::New();
- layer.SetParentOrigin(ParentOrigin::CENTER);
- layer.SetAnchorPoint(AnchorPoint::CENTER);
- layer.SetSize( stage.GetRootLayer().GetCurrentSize() );
+ layer.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ layer.SetSize( stage.GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) );
stage.GetRootLayer().Add(layer);
// render tasks may have been setup last load so remove them