Esempio n. 1
0
 @Override
 protected synchronized void createCustomUI(GLEx g, int x, int y, int w, int h) {
   if (!visible) {
     return;
   }
   LFont oldFont = g.getFont();
   g.setFont(messageFont);
   print.draw(g, fontColor);
   g.setFont(oldFont);
   if (print.isComplete() && animation != null) {
     if (animation.getSpriteImage() != null) {
       g.setAlpha(1.0F);
       updateIcon();
       g.drawTexture(animation.getSpriteImage(), dx, dy);
     }
   }
   g.resetColor();
 }
Esempio n. 2
0
 public void setPauseIconAnimation(Animation animation) {
   this.animation = animation;
   if (animation != null) {
     LTexture image = animation.getSpriteImage(0);
     if (image != null) {
       this.dw = image.getWidth();
       this.dh = image.getHeight();
       this.updateIcon();
     }
   }
 }
Esempio n. 3
0
 @Override
 public void dispose() {
   super.dispose();
   if (print != null) {
     print.dispose();
     print = null;
   }
   if (animation != null) {
     animation.dispose();
     animation = null;
   }
 }
Esempio n. 4
0
 @Override
 public void update(long elapsedTime) {
   if (!visible) {
     return;
   }
   super.update(elapsedTime);
   if (print.isComplete()) {
     animation.update(elapsedTime);
   }
   printTime += elapsedTime;
   if (printTime >= totalDuration) {
     printTime = printTime % totalDuration;
     print.next();
   }
 }