Skip to content

Color Picker

Paweł Pastuszak edited this page Feb 16, 2015 · 10 revisions

Color Picker allows user to choose color. Picker was added in VisUI 0.6.0

Color Picker SS

Color picker is a heavy widget and should be reused whenever possible, picker unlike other VisUI widgets must be disposed (by calling picker.dispose()) when no longer needed.

Usage

ColorPicker picker = new ColorPicker(new ColorPickerAdapter() {
	@Override
	public void finished (Color newColor) {
		image.setColor(newColor);
	}
});

//...

showPickerButton.addListener(new ChangeListener() {
	@Override
	public void changed (ChangeEvent event, Actor actor) {
		getStage().addActor(picker.fadeIn());
	}
});