Esempio n. 1
0
CEGUI::Window* InitShopCity()
{
    CEGUI::Window* wnd = LoadUI(SHOPCITY_PAGE_NAME);
    SubEventShopCity(wnd);
    //先注册事件,再设置初始化状态,因为初始化时调用了事件
    SetInitProShopCity(wnd);
    GetInst(ShopCityMsgMgr).SetPageState(true);
    return wnd;
}
Esempio n. 2
0
		void OnResetDevice(D3DPRESENT_PARAMETERS* presentation_parameters)
		{
			if(!g_ui_package_present)
			{
				return;
			}

			LoadUI(DX9::Direct3DDevice(), presentation_parameters);
		}
Esempio n. 3
0
		void Initialize3D(IDirect3DDevice9* device, D3DPRESENT_PARAMETERS* presentation_parameters)
		{
			if(!g_ui_package_present)
			{
				return;
			}

			LoadUI(device, presentation_parameters);
		}
Esempio n. 4
0
CEGUI::Window* InitAuction()
{
	//加载界面
	CEGUI::Window* wnd = LoadUI("Auction");
	//设置UI控件的初始化属性
	SetInitializedAHUIProperty(wnd);
	//事件注册函数
	SubscriberAHEvent(wnd);
	//默认打开出售求购UI,请求一次所有数据,更新出售求购UI显示
	AHdata& ahd = GetInst(AHdata);
	ahd.Send_AH_REQUEST_ALL();
	return wnd;
}
CEGUI::Window* InitPlayerShopPage(void)
{
#ifdef _DEBUG
	CEGUI::Logger::getSingleton().setLogFilename("PlayerShop.log");
#endif

	CEGUI::Window* wnd = LoadUI("PlayerShop");

#ifdef _DEBUG
	CEGUI::Logger::getSingleton().setLogFilename("CEGUI.log",true);
#endif

	SubscribePlayerShopPageEvent(wnd);

	wnd->setVisible(false);
	return wnd;
}
CEGUI::Window* InitPetStrengthen()
{
#ifdef _DEBUG
	CEGUI::Logger::getSingleton().setLogFilename("PetStrenthenLayout.log");
#endif

	CEGUI::Window* wnd = LoadUI("PetStrengthen");

#ifdef _DEBUG
	CEGUI::Logger::getSingleton().setLogFilename("CEGUI.log",true);
#endif

	InitPetSelectWnd(wnd);
	SubscribePetStrenthenEvent(wnd);

	wnd->setVisible(false);
	return wnd;
}
Esempio n. 7
0
CEGUI::Window* InitGameExit()
{
    CEGUI::Window* wnd = LoadUI("GameExit");
	wnd->setVisible(false);
    CEGUI::PushButton* btn = WPushButton(wnd->getChild("GameExit/CharSel"));
    btn->subscribeEvent(CEGUI::PushButton::EventClicked,
        CEGUI::Event::Subscriber(OnReturnCharSel));
    btn = WPushButton(wnd->getChild("GameExit/ServerSel"));
    btn->subscribeEvent(CEGUI::PushButton::EventClicked,
        CEGUI::Event::Subscriber(OnReturnServerSel));
    btn = WPushButton(wnd->getChild("GameExit/Login"));
    btn->subscribeEvent(CEGUI::PushButton::EventClicked,
        CEGUI::Event::Subscriber(OnReturnLogin));
    btn = WPushButton(wnd->getChild("GameExit/Exit"));
    btn->subscribeEvent(CEGUI::PushButton::EventClicked,
        CEGUI::Event::Subscriber(OnReturnExit));

    return wnd;
}
Esempio n. 8
0
TileMap::TileMap(Game &game, Model model, char* tileSetPath, Camera* camera)
{
	this->tileModel = model;
	this->camera = camera;
	std::cout << "Loading Tiles, this may take a while..." << std::endl;
	LoadTileSet(tileSetPath);
	for (int y = 0; y < MAP_SIZE_IN_TILES_HEIGHT; y++)
	{
		for (int x = 0; x < MAP_SIZE_IN_TILES_WIDTH; x++)
		{
			map[x][y] = Tile(game, model, glm::vec3(x * TILE_SIZE_WIDTH, (y * TILE_SIZE_HEIGHT) + TILE_SIZE_HEIGHT, 0.0f));
		}
	}
	for (int x = 0; x < MAP_SIZE_IN_TILES_WIDTH; x++)
	{
		UI[x] = Tile(game, model, glm::vec3(x * TILE_SIZE_WIDTH, 0.0f, 0.1f));
	}
	LoadUI();
	LoadMap("content/levels/map1.lvl");
	std::cout << MAP_SIZE_IN_TILES_WIDTH * MAP_SIZE_IN_TILES_HEIGHT << " Tiles Loaded! " << std::endl;
}
void MyPS2Application::GameLoad()
{
	// Set Game Background
	if(!_background_texture.LoadBitmap("GameBackground.bmp", true, false))
	{
		printf("Can't load Game Texture\n");
		quitting_ = true;
	}
	
	LoadUI();
	
	// Initialize game objects.
	player = new Player();
	ball = new Ball(player->get_ball_x_position(), player->get_ball_z_position());
	SetupBlocks();

	if (game_music) // If music was enabled.
	{
		BGM.PlayLoop();
	}
	
	game_loaded = true;
}