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(); }
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(); }
void LogViewer::onDateSelected() { updateMainView(); }