public boolean addDialog(DialogCategory category, Dialog dialog){
		if(editor.controller.dialogs.containsKey(dialog.id)){
			String[] buttons = {"Overwrite", "Increment", "Cancel"};
			int result = JOptionPane.showOptionDialog(this, dialog + "\nDialog found with the same id", "Conflict warning", JOptionPane.WARNING_MESSAGE, 0, null, buttons, buttons[1]);
			if(result == 0)
				editor.controller.removeDialog(editor.controller.dialogs.get(dialog.id));
			if(result == 1)
				dialog.id = editor.controller.getUniqueDialogID();
			if(result == 2)
				return false;
		}
		if(editor.controller.containsDialogName(category, dialog, dialog.getTitle())){
			String[] buttons = {"Overwrite", "Change", "Cancel"};
			int result = JOptionPane.showOptionDialog(this, dialog + "\nDialog found with the same name in this category", "Conflict warning", JOptionPane.WARNING_MESSAGE, 0, null, buttons, buttons[1]);
			if(result == 0)
				editor.controller.removeDialog(editor.controller.getDialogFromName(category, dialog, dialog.getTitle()));
			if(result == 1){
	    		while(editor.controller.containsDialogName(category, dialog, dialog.getTitle()))
	    			dialog.setTitle(dialog.getTitle() + "_");
			}
			if(result == 2)
				return false;
		}
		DialogController.instance.saveDialog(category.getID(), dialog);
		return true;
	}