コード例 #1
0
ファイル: LookAndFeel.cpp プロジェクト: lazarev-pv/robot-game
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);
}
コード例 #2
0
    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);
    }
コード例 #3
0
	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;
	}
コード例 #4
0
    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);
    }