Пример #1
0
bool GamePageAppLobby::SetUp(MkDataNode& sharingNode)
{
	if (!GamePageBase::SetUp(sharingNode))
		return false;

	m_RootSceneNode->SetLocalDepth(10.f);

	// window factory
	MkWindowFactory winFactory;
	winFactory.SetFrameType(MkWindowThemeData::eFT_Large);
	winFactory.SetMinClientSizeForButton(MkFloat2(200.f, 50.f));

	// window mgr
	GPAppLobbyWinMgr* winMgrNode = new GPAppLobbyWinMgr(L"WinMgr");
	if (winMgrNode != NULL)
	{
		m_RootSceneNode->AttachChildNode(winMgrNode);

		// battle
		MkWindowBaseNode* battleBtn = winFactory.CreateNormalButtonNode(BattleBtnName, L"ÀüÅõ »ùÇÃ");
		if (winMgrNode->AttachWindow(battleBtn))
		{
			winMgrNode->ActivateWindow(battleBtn->GetNodeName());
			battleBtn->SetLocalPosition(MkFloat2(600.f, 300.f));
		}
	}
	
	return true;
}
Пример #2
0
bool GamePageAppBriefingRoom::SetUp(MkDataNode& sharingNode)
{
	if (!GamePageBase::SetUp(sharingNode))
		return false;

	m_RootSceneNode->SetLocalDepth(10.f);

	MkFloat2 screenSize = MkFloat2(static_cast<float>(MK_DEVICE_MGR.GetCurrentResolution().x), static_cast<float>(MK_DEVICE_MGR.GetCurrentResolution().y));

	// window factory
	MkWindowFactory winFactory;
	winFactory.SetFrameType(MkWindowThemeData::eFT_Large);
	winFactory.SetMinClientSizeForButton(MkFloat2(200.f, 50.f));

	// window mgr
	GPAppBriefingRoomWinMgr* winMgrNode = new GPAppBriefingRoomWinMgr(L"WinMgr");
	if (winMgrNode != NULL)
	{
		m_RootSceneNode->AttachChildNode(winMgrNode);

		// battle
		MkWindowBaseNode* battleBtn = winFactory.CreateNormalButtonNode(BattleBtnName, L"ÀüÅõ ½ÃÀÛ");
		if (winMgrNode->AttachWindow(battleBtn))
		{
			winMgrNode->ActivateWindow(battleBtn->GetNodeName());
			MkFloat2 pos;
			pos.x = screenSize.x - winFactory.GetMinClientSizeForButton().x - 30.f;
			pos.y = 20.f;
			battleBtn->SetLocalPosition(pos);
		}
	}
	
	return true;
}