Esempio n. 1
0
static int click_save_handler(widget_list *w, int UNUSED(mx), int UNUSED(my),
	Uint32 flags)
{
	// only handle mouse button clicks, not scroll wheels moves
	// Update: don't check when saving on exit (w == NULL)
	if ( (flags & ELW_MOUSE_BUTTON) == 0 && w != NULL) return 0;

	if (notepad_save_file())
		note_static_message = note_saved;
	else
		note_static_message = note_save_failed;

	return 1;
}
Esempio n. 2
0
int save_local_data(char * text, int len){
	save_bin_cfg();
	//Save the quickbar spells
	save_quickspells();
	//Save recipes
	save_recipes();
	// save el.ini if asked
	if (write_ini_on_exit) write_el_ini ();
	// save notepad contents if the file was loaded
	if (notepad_loaded) notepad_save_file();
	save_exploration_map();
	flush_counters();
	// for the new questlog, this actually just saves any pending changes
	// should be renamed when NEW_QUESTLOG #def is removed
	unload_questlog();
	save_item_lists();
	LOG_TO_CONSOLE(c_green1, "Local files saved, asking server to save too...");
	return 0;
}