Package de.chaoswg.gui
Klasse GUI.UILabelTimer
java.lang.Object
net.risingworld.api.ui.UIElement
net.risingworld.api.ui.UILabel
de.chaoswg.gui.GUI.UILabelTimer
- Alle implementierten Schnittstellen:
Serializable,net.risingworld.api.events.Listener
- Umschließende Klasse:
GUI
public final class GUI.UILabelTimer
extends net.risingworld.api.ui.UILabel
implements net.risingworld.api.events.Listener
Label Timer
UILabelTimer lTimer = new GUI().new UILabelTimer( "...", 30 );
lTimer.setPivot(Pivot.UpperLeft);
lTimer.setPosition(5.0f, 5.0f, false);
lTimer.setFontColor(new ColorRGBA(0.0f, 1.0f, 0.0f, 1.0f).toIntRGBA() );
lTimer.setFontSize(sizeFont);
if (status==0) {
uiLabelTimer.setFontColor(1.0f, 1.0f, 1.0f, 1.0f);
uiLabelTimer.setText("~:~");
uiLabelTimer.pause();
}else{
if (status < 0.5f) {
uiLabelTimer.setFontColor( (new ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f)).interpolateLocal( new ColorRGBA(1.0f, 1.0f, 0.0f, 1.0f), status*2).toIntRGBA() );
}else{
uiLabelTimer.setFontColor( (new ColorRGBA(1.0f, 1.0f, 0.0f, 1.0f)).interpolateLocal( new ColorRGBA(0.0f, 1.0f, 0.0f, 1.0f), (status*2)-1 ).toIntRGBA() );
}
}
lTimer.start();
- Seit:
- 0.0.4
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Feldübersicht
Von Klasse geerbte Felder net.risingworld.api.ui.UIElement
hoverStyle, style -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfloatStatus von [1.0 - 0.0]longlongvoidkill()voidpause()voidvoidvoidsetStartText(String text) voidsetTimerCound(long timerCounter) voidsetTimerMaxCound(long timerCound) voidstart()voidstart(float intervalDelay) Von Klasse geerbte Methoden net.risingworld.api.ui.UILabel
getText, isRichTextEnabled, setFont, setFontColor, setFontColor, setFontSize, setFontSize, setPivot, setRichTextEnabled, setText, setTextAlign, setTextWrapVon Klasse geerbte Methoden net.risingworld.api.ui.UIElement
addChild, addStyleSheet, addToClassList, getChildCount, getChilds, getID, getParent, isClickable, onClick, removeAllChilds, removeChild, removeFromClassList, removeFromParent, removeStyleSheet, resetPivot, resetPosition, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBorderEdgeRadius, setClickable, setOpacity, setPickable, setPosition, setSize, setVisible, updateStyle
-
Konstruktordetails
-
UILabelTimer
public UILabelTimer() -
UILabelTimer
-
UILabelTimer
-
-
Methodendetails
-
setStartText
-
getTimerMaxCound
public long getTimerMaxCound() -
setTimerMaxCound
public void setTimerMaxCound(long timerCound) -
getTimerCound
public long getTimerCound() -
setTimerCound
public void setTimerCound(long timerCounter) -
getStatus
public float getStatus()Status von [1.0 - 0.0]- Gibt zurück:
- Seit:
- 0.0.4
-
resetTimerCound
public void resetTimerCound() -
getOnTimer
-
setOnTimer
-
start
public void start() -
start
public void start(float intervalDelay) -
pause
public void pause() -
kill
public void kill()
-