예제 #1
0
파일: UILib.cpp 프로젝트: jijinlong/SyGame
/**
* 展示panel 
*/
int UILib::showpanel(UIStub* stub,script::tixmlCodeNode * node)
{
	if (stub && stub->base)
	{
		UIWindow *window = stub->base->getDepthWindow();
		if (window)
		{
			UIPanel *panel = window->showPanel(node->getAttr("name"));
			std::string tag = node->getAttr("model");
			if (tag == "true" && panel)
			{
				window->pushModel(panel);
			}
			if (panel)
			panel->setVisible(true);
		}
	}
	return 1;
}
예제 #2
0
파일: UILib.cpp 프로젝트: jijinlong/SyGame
/**
 * 展示所有文件
 */
int UILib::files_show(UIStub* stub,script::tixmlCodeNode * node)
{
	if (stub && stub->base)
	{
		UIWindow *window = stub->base->getDepthWindow();
		if (window)
		{
			UIFileList *list = UIFileList::create(window,node->getAttr("showxml"));
			if (list)
			{
				std::string dirShowName = node->getAttr("dirshow");
				std::string fileShowName = node->getAttr("fileshow");
				list->showes.push_back(node->getAttr("showfile"));
				list->show(".","list",dirShowName.c_str(),fileShowName.c_str());
				window->pushModel(list);
			}
		}
	}
	return 1;
}