public void setProgress(float progress, String activity) { if (statusText != null) { statusText.setText(activity); setProgress(progress);
public void setProgress(float progress) { int percentage = (int) (progress * 100); if (percentageText != null) { statusText.updateRenderState(); statusText.updateModelBound(); statusText.setLocalTranslation(new Vector3f((DisplaySystem.getDisplaySystem().getWidth() / 2) - (statusText.getWidth() / 2), (DisplaySystem.getDisplaySystem().getHeight() / 2) - (statusText.getHeight() / 2) + 20.0f, 0.0f));  progressBar.setLocalScale(new Vector3f(progress, 1.0f, 1.0f)); float xPosition = (DisplaySystem.getDisplaySystem().getWidth() / 2.0f) - 50.0f + (percentage / 2.0f); progressBar.setLocalTranslation(new Vector3f(xPosition, DisplaySystem.getDisplaySystem().getHeight() / 2, 0.0f));  percentageText.setText(percentage + "%"); percentageText.updateRenderState(); percentageText.updateModelBound(); percentageText.setLocalTranslation(new Vector3f((DisplaySystem.getDisplaySystem().getWidth() / 2) - (percentageText.getWidth() / 2), (DisplaySystem.getDisplaySystem().getHeight() / 2) - (percentageText.getHeight() / 2) - 20.0f, 0.0f)); } if (percentage == 100) { LoaderFadeOut fader = new LoaderFadeOut(2.0f, this); rootNode.addController(fader); fader.setActive(true);
	public void setProgress(float progress, String activity) {		if (statusText != null) {			statusText.setText(activity);			setProgress(progress);		}	}