com.badlogic.gdx.scenes.scene2d.ui.ProgressBar Java Examples

The following examples show how to use com.badlogic.gdx.scenes.scene2d.ui.ProgressBar. 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: TestVertical.java    From vis-ui with Apache License 2.0 6 votes vote down vote up
private void addNormalWidgets () {
	ProgressBar progressbar = new ProgressBar(0, 100, 1, true, VisUI.getSkin());
	Slider slider = new Slider(0, 100, 1, true, VisUI.getSkin());
	Slider sliderDisabled = new Slider(0, 100, 1, true, VisUI.getSkin());

	progressbar.setValue(50);
	slider.setValue(50);
	sliderDisabled.setValue(50);
	sliderDisabled.setDisabled(true);

	VisTable progressbarTable = new VisTable(true);
	progressbarTable.add(progressbar);
	progressbarTable.add(slider);
	progressbarTable.add(sliderDisabled);

	add(progressbarTable);
}
 
Example #2
Source File: PackDialogController.java    From gdx-texture-packer-gui with Apache License 2.0 5 votes vote down vote up
@Override
public void onProcessingFinished() {
    btnClose.setDisabled(false);
    btnClose.setColor(Color.WHITE);

    FocusManager.switchFocus(stage, btnClose);

    window.closeOnEscape();

    if (!errors && cbAutoClose.isChecked()) {
        window.hide();
        showReopenLastDialogNotification();
    }

    // If there is only one pack, show log on error
    if (errors && adapter.size() == 1) {
        adapter.getView(adapter.get(0)).showLogWindow();
    }

    // Indicate total result by changing progress bar color
    {
        ProgressBar.ProgressBarStyle style = new ProgressBar.ProgressBarStyle(progressBar.getStyle());
        Drawable fill = errors ?
                VisUI.getSkin().getDrawable("progressBarErr") :
                VisUI.getSkin().getDrawable("progressBarSucc");
        style.knob = fill;
        style.knobBefore = fill;
        progressBar.setStyle(style);
    }
}
 
Example #3
Source File: WorldLoadingMenu.java    From Cubes with MIT License 4 votes vote down vote up
public WorldLoadingMenu() {
  super(Localization.get("menu.general.loading"), false);

  progressBar = new ProgressBar(0f, 1f, 0.001f, false, PROGRESS_BAR_STYLE);
  stage.addActor(progressBar);
}