LookAndFeel LookAndFeel::create(const std::string& fileName){ auto root(createRoot<LafParserRoot>(fileName)); Resources* r = Game::getResources(); r->load(root.lookAndFeel->resources, fileName, true); return LookAndFeel(root.lookAndFeel,r); }
void ThreadLoader::_threadFunc() { for (resources::iterator i = _resources.begin(); i != _resources.end(); ++i) { Resources* res = *i; res->load(); } for (ress::iterator i = _ress.begin(); i != _ress.end(); ++i) { Resource* res = *i; //log::messageln("loading res: %s", res->getName().c_str()); res->load(); } core::getMainThreadMessages().postCallback(0, 0, 0, threadDone, this); }
void ThreadLoading::_threadFunc(LoadResourcesContextMT *ctx) { for (resources::iterator i = _resources.begin(); i != _resources.end(); ++i) { Resources *res = *i; res->load(ctx); } for (ress::iterator i = _ress.begin(); i != _ress.end(); ++i) { Resource *res = *i; //log::messageln("loading res: %s", res->getName().c_str()); res->load(ctx); } MutexAutoLock k(_m); _threadDone = true; }
void ThreadLoader::_threadFunc() { for (resources::iterator i = _resources.begin(); i != _resources.end(); ++i) { Resources* res = *i; res->load(); } for (ress::iterator i = _ress.begin(); i != _ress.end(); ++i) { Resource* res = *i; //log::messageln("loading res: %s", res->getName().c_str()); res->load(); } #ifndef __S3E__ for (funcs::iterator i = _funcs.begin(); i != _funcs.end(); ++i) { (*i)(); } #endif core::getMainThreadDispatcher().postCallback(0, 0, 0, threadDone, this); }