
package com.quexten.ravtech.dk.ui.packaging;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.Array;
import com.kotcrab.vis.ui.VisUI;
import com.kotcrab.vis.ui.widget.VisTable;
import com.kotcrab.vis.ui.widget.VisTextArea;

public class BuildReporterDialog extends VisTable {

	public Array<PrinterListener> printerListeners = new Array<PrinterListener>();
	VisTextArea textArea;

	public BuildReporterDialog () {
		textArea = new VisTextArea() {
			@Override
			protected boolean continueCursor (int index, int offset) {
				return false;
			}
		};
		textArea.setDisabled(true);
		this.add(textArea).grow();
	}

	public void log (String string) {
		Gdx.app.log("BuildReporterDialog", string);
		for (int i = 0; i < printerListeners.size; i++)
			printerListeners.get(i).onPrint(string);
		textArea.setText(textArea.getText() + string + "\n");
	}

	public void logError (String message) {
		Gdx.app.error("BuildReporterDialog", message);
		textArea.setText(textArea.getText() + "[Error]" + message + "\n");
	}

	@Override
	public float getPrefHeight () {
		return textArea.getLines() * VisUI.getSkin().getFont("default-font").getLineHeight();
	}

}

@@ -69,16 +69,56 @@
 dx.Gdx;%0A
+import com.badlogic.gdx.graphics.Color;%0A
 import c
@@ -179,16 +179,235 @@
 .VisUI;%0A
+import com.kotcrab.vis.ui.util.highlight.Highlighter;%0Aimport com.kotcrab.vis.ui.util.highlight.WordHighlightRule;%0Aimport com.kotcrab.vis.ui.widget.HighlightTextArea;%0Aimport com.kotcrab.vis.ui.widget.ScrollableTextArea;%0A
 import c
@@ -622,19 +622,25 @@
 er%3E();%0A%09
-Vis
+Highlight
 TextArea
@@ -705,154 +705,224 @@
 new 
-VisTextArea() %7B%0A%09%09%09@Override%0A%09%09%09protected boolean continueCursor (int index, int offset) %7B%0A%09%09%09%09return false;%0A%09%09%09%7D%0A%09%09%7D;%0A%09%09textArea.setDisabled(true
+HighlightTextArea(%22%22);%0A%09%09textArea.setDisabled(true);%0A%09%09Highlighter highlighter = new Highlighter();%0A%09%09highlighter.addRule(new WordHighlightRule(Color.GREEN, %22BUILD SUCCESSFUL%22));%0A%09%09textArea.setHighlighter(highlighter
 );%0A%09

Add Buildreporterdialog Coloring