package tv.rocketbeans.supermafiosi.core;

import java.util.ArrayList;
import java.util.List;

import com.badlogic.gdx.InputAdapter;

import tv.rocketbeans.supermafiosi.i18n.Bundle;

public class DialogManager extends InputAdapter {
	
	private List<Dialog> dialogs = new ArrayList<Dialog>();
	
	private Dialog currentDialog;

	public void addDialog(String dialogKey, String avatarKey) {
		dialogs.add(new Dialog(Bundle.translations.get(dialogKey), avatarKey));
	}
	
	@Override
	public boolean touchDown(int screenX, int screenY, int pointer, int button) {
		if (dialogs.size() > 0) {
			currentDialog = dialogs.remove(0);
			return true;
		} else {
			currentDialog = null;
		}
		return false;
	}
	
	public Dialog getCurrentDialog() {
		return currentDialog;
	}
}

@@ -549,16 +549,75 @@
 tton) %7B%0A
+%09%09return nextDialog();%0A%09%7D%0A%09%0A%09public boolean nextDialog() %7B%0A
 %09%09if (di

Add manual method to trigger dialogs