Ejemplo n.º 1
0
void Game::run() {

	window->GetMainLayer().addObject(mapSprite, 0);

	addCharacter(getMainCharacter().getId(), getMainCharacter());

	if(isFrameratePrinted) {
		window->GetInterfaceLayer().addObject(framerate, 1);
	}

	if(isLatencyPrinted) {
		window->GetInterfaceLayer().addObject(latency, 1);
	}

	window->Launch();

	if (connection->auth()) {

		std::cout << "Authenticated !" << std::endl;

		while (window->IsOpened()) {

			//main game loop

			sf::Sleep(0.01);

			updateCharacters();
			updateMainView();
			updateInterfaceView();

		}
	}

	window->Wait();
}
Ejemplo n.º 2
0
void LogViewer::onEntitySelected(const QModelIndex &index)
{
    Tpl::EntityPtr entity = index.data(EntityModel::EntityRole).value<Tpl::EntityPtr>();
    Tp::AccountPtr account = index.data(EntityModel::AccountRole).value<Tp::AccountPtr>();

    ui->datePicker->setEntity(account, entity);

    updateMainView();
}
Ejemplo n.º 3
0
void LogViewer::onDateSelected()
{
    updateMainView();
}