Beispiel #1
0
bool savegame::save_game_interactive(CVideo& video, const std::string& message,
									 gui::DIALOG_TYPE dialog_type)
{
	show_confirmation_ = true;
	create_filename();

	int res = gui2::twindow::OK;
	bool exit = true;

	do{
		try{
			res = show_save_dialog(video, message, dialog_type);
			exit = true;

			if (res == gui2::twindow::OK){
				exit = check_overwrite(video);
			}
		}
		catch (illegal_filename_exception){
			exit = false;
		}
	}
	while (!exit);

	if (res == 2) //Quit game
		throw end_level_exception(QUIT);

	if (res != gui2::twindow::OK)
		return false;

	return save_game(&video);
}
void xslt_save_file (GtkWidget *source, xsltTransformer * ttt)
{
	gchar *filepath = NULL;
	filepath = show_save_dialog();

	g_return_if_fail(filepath != NULL);
	
	gtk_entry_set_text(ttt->results_entry, filepath);
	ttt->results_path = g_strdup(filepath);

	g_free(filepath);

}
Beispiel #3
0
bool savegame::save_game_interactive(CVideo& video, const std::string& message,
									 gui::DIALOG_TYPE dialog_type)
{
	show_confirmation_ = true;
	create_filename();

	const int res = show_save_dialog(video, message, dialog_type);

	if (res == 2) { 
		throw_quit_game_exception(); //Quit game
	}

	if (res == gui2::twindow::OK && check_overwrite(video)) {
		return save_game(&video);
	}

	return false;
}