Пример #1
0
bool SetPanel::init()
{
	bool res = CCNode::init();
	do 
	{
		if(!res)break;
		CWidgetWindow* layout = CWidgetWindow::create();
		layout->setTag(1);
		layout->setTouchPriority(-4);
		addChild(layout);
		m_panel = LoadComponent("SetPanel.xaml");
		
		if(!m_panel) break;
		m_panel->retain();
		m_panel->setPosition(CCSizeCenter(m_panel->getContentSize()));
		this->setContentSize(m_panel->getContentSize());
		this->setAnchorPoint(CCPointCenter);
		layout->addChild(m_panel);
		for(int i = 1; i <=5; ++i)
		{
			CButton* button = (CButton*)m_panel->getChildByTag(i);
			button->setOnClickListener(this,ccw_click_selector(SetPanel::onClick));
		}
		res = true;
	} while (0);
	return res;
}
Пример #2
0
CWidgetWindow *TuiManager::createPanel(float tag, float x, float y, int w, int h,float rotation){
	CWidgetWindow *pPanel = CWidgetWindow::create();
	pPanel->setContentSize(Size(w, h));
	pPanel->setPosition(Point(x,y));
	pPanel->setRotation(rotation);
	pPanel->setTag(tag);
	return pPanel;
}
Пример #3
0
	void LoadScene::onCreate()
	{
		CWidgetWindow* layout = CWidgetWindow::create();
		layout->setTag(1);
		addChild(layout);

		m_ui = LoadComponent("loading.xaml");
		m_ui->setPosition(VCENTER);
		this->addChild(m_ui);

		CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("skill/9049.plist");
		AnimationManager::sharedAction()->ParseAnimation("9049");

	}