Klasse UILabelTimer

java.lang.Object
net.risingworld.api.ui.UIElement
net.risingworld.api.ui.UILabel
de.chaoswg.gui.UILabelTimer
Alle implementierten Schnittstellen:
Serializable, net.risingworld.api.events.Listener

public final class 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:
  • Konstruktordetails

    • UILabelTimer

      public UILabelTimer()
    • UILabelTimer

      public UILabelTimer(String text)
    • UILabelTimer

      public UILabelTimer(String text, long timerCound)
  • Methodendetails

    • setStartText

      public void setStartText(String text)
    • 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

      public UILabelTimer.CallbackOnTimer getOnTimer()
    • setOnTimer

      public void setOnTimer(UILabelTimer.CallbackOnTimer onTimer)
    • start

      public void start()
    • start

      public void start(float intervalDelay)
    • pause

      public void pause()
    • kill

      public void kill()