Java Code Examples for com.kotcrab.vis.ui.widget.color.ColorPicker#padRight()

The following examples show how to use com.kotcrab.vis.ui.widget.color.ColorPicker#padRight() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UIStage.java    From talos with Apache License 2.0 5 votes vote down vote up
public void init () {
	fullScreenTable = new Table();
	fullScreenTable.setFillParent(true);

	stage.addActor(fullScreenTable);

	defaults();
	constructMenu();
	constructTabPane();
	constructSplitPanes();

	initFileChoosers();

	batchConvertDialog = new BatchConvertDialog();
	settingsDialog = new SettingsDialog();

	FileHandle list = Gdx.files.internal("modules.xml");
	XmlReader xmlReader = new XmlReader();
	XmlReader.Element root = xmlReader.parse(list);
	WrapperRegistry.map.clear();
	moduleListPopup = new ModuleListPopup(root);

	colorPicker = new ColorPicker();
	colorPicker.padTop(32);
	colorPicker.padLeft(16);
	colorPicker.setHeight(330);
	colorPicker.setWidth(430);
	colorPicker.padRight(26);
}
 
Example 2
Source File: GradientColorModuleWrapper.java    From talos with Apache License 2.0 5 votes vote down vote up
@Override
protected void configureSlots() {
    addInputSlot("alpha (0 to 1)", InterpolationModule.ALPHA);
    addOutputSlot("output", 0);

    gradientWidget = new GradientWidget(getSkin());
    contentWrapper.add(gradientWidget).expandX().fillX().growX().height(60).padTop(25).padRight(3).padBottom(3);

    leftWrapper.add(new Table()).expandY();
    rightWrapper.add(new Table()).expandY();

    picker = new ColorPicker();

    gradientWidget.setListener(new GradientWidget.GradientWidgetListener() {
        @Override
        public void colorPickerShow(final ColorPoint point) {
            picker.setListener(null);
            picker.setColor(point.color);

            TalosMain.Instance().UIStage().getStage().addActor(picker.fadeIn());

            picker.setListener(new ColorPickerAdapter() {
                @Override
                public void changed(Color newColor) {
                    super.changed(newColor);

                    point.color.set(newColor);
                    gradientWidget.updateGradientData();
                }
            });
        }
    });

    picker.padTop(32);
    picker.padLeft(16);
    picker.setHeight(330);
    picker.setWidth(430);
    picker.padRight(26);
}