use of com.kotcrab.vis.ui.widget.color.internal.AlphaImage in project vis-ui by kotcrab.
the class BasicColorPicker method createColorsPreviewTable.
private VisTable createColorsPreviewTable() {
VisTable table = new VisTable(false);
table.add(currentColorImg = new AlphaImage(commons, 5 * sizes.scaleFactor)).height(25 * sizes.scaleFactor).width(80 * sizes.scaleFactor).expandX().fillX();
table.add(new Image(style.iconArrowRight)).pad(0, 2, 0, 2);
table.add(newColorImg = new AlphaImage(commons, 5 * sizes.scaleFactor)).height(25 * sizes.scaleFactor).width(80 * sizes.scaleFactor).expandX().fillX();
currentColorImg.setColor(color);
newColorImg.setColor(color);
currentColorImg.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
restoreLastColor();
}
});
return table;
}
Aggregations