Exemple #1
0
/**
* 隐藏Panel
*/
int UILib::hidepanel(UIStub* stub,script::tixmlCodeNode * node)
{
	if (stub && stub->base)
	{
		UIWindow *window = stub->base->getDepthWindow();
		if (window)
		{
			UIPanel *target = window->getPanel(node->getAttr("name"));
			if (target)
			{
				target->hide();
			}
		}
	}
	return 1;
}
Exemple #2
0
/**
 * 绑定自身panel 的处理逻辑 C++ 写的逻辑
 */
int UILib::panelbind(UIStub* stub,script::tixmlCodeNode * node)
{
	if (stub && stub->base)
	{
		UIPanel *panel = stub->base->getPanel();
		if (panel)
		{
			UIWindow *window = panel->getWindow();
			if (window)
			{
				UIPanel *target = window->getPanel(node->getAttr("name"));
				if (target)
					target->bindBtnClick(node->getAttr("btnname"),UICALLBACK(node->getAttr("event")));
			}	
		}
	}
	return 1;
}
Exemple #3
0
/**
 * 设置panel 上UILabel 的值
 */
int UILib::panel_label_set_value(UIStub* stub,script::tixmlCodeNode * node)
{
	if (stub && stub->base)
	{
		UIPanel *panel = stub->base->getPanel();
		if (panel)
		{
			UIWindow *window = panel->getWindow();
			if (window)
			{
				UIPanel *target = window->getPanel(node->getAttr("name"));
				if (target)
				{
					target->setUILabelvalue(node->getAttr("labelname"),node->getAttr("value"));
				}
			}	
		}
	}
	return 1;
}