Exemplo n.º 1
0
void render() 
{
	clear();
	switch(getState())
	{
		case MAIN_MENU:
			renderMainMenu();
			break;
		case GAME:
			renderGame();
			break;
		case BATTLE:
			renderBattle();
			break;
		case INSTRUCTIONS:
			renderInstructions();
			break;
		case OPTIONS:
			renderOptions();
			break;
		case STATUS:
			renderStatus();
			break;
		default:
			break;
	}
	refresh(); // call curses's refresh funct to update screen
}
Exemplo n.º 2
0
void MainWindow::on_actionRender_to_file_triggered()
{
	QString path = QFileDialog::getSaveFileName(this, tr("Render Board"));
	if (path.isEmpty())
		return;

	RenderOptionsDialog renderOptions(this);
	if (renderOptions.exec() != QDialog::Accepted)
		return;

	renderBoard(
	            game->getMoveHistory(),
	            path,
	            renderOptions.getRemoveLast(),
	            renderOptions.getRenderOpenTiles(),
	            renderOptions.getRenderFrames(),
	            renderOptions.getRenderPlayers(),
	            renderOptions.getRenderNextTile()
	            );
}