public final class ProgressBarTimer
extends be.yildizgames.common.frame.EndFrameListener
| Constructor | Description |
|---|---|
ProgressBarTimer(BaseProgressBar bar,
TimeTextLine text,
Duration time) |
Full constructor, will update the progress bar and print the remaining time.
|
ProgressBarTimer(BaseProgressBar bar,
Duration time) |
Full constructor, will only update the progress bar and wont print anything.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
frameEnded(long frameTime) |
Update the progress bar and print the remaining time if the text widget has been passed in constructor.
|
void |
neverStop() |
|
ProgressBarTimer |
setElapsedTime(long time) |
Set the current elapsed time.
|
void |
setValues(long total,
long timeLeft) |
|
void |
setVisible(boolean visible) |
public ProgressBarTimer(BaseProgressBar bar, Duration time)
bar - Associated bar.time - Total time to complete the bar.public ProgressBarTimer(BaseProgressBar bar, TimeTextLine text, Duration time)
bar - Associated progress bar.text - Widget where result will be printed.time - Total time to complete the bar.public void neverStop()
public boolean frameEnded(long frameTime)
frameEnded in class be.yildizgames.common.frame.FrameListenerframeTime - Time elapsed since the last call.true while the total time has not been reached.public ProgressBarTimer setElapsedTime(long time)
time - Time elapsed.public void setVisible(boolean visible)
public void setValues(long total,
long timeLeft)
Copyright © 2014–2018. All rights reserved.