Exemplo n.º 1
0
 @Override
 public void createUI(GLEx g, int x, int y, LComponent component, LTexture[] buttonImage) {
   LFont font = g.getFont();
   int color = g.getColorARGB();
   if (batch != null) {
     batch.begin();
     draw(batch, mainX + x, mainY + y);
     batch.end();
   }
   g.setColor(color);
   g.setFont(font);
 }
Exemplo n.º 2
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();
 }
Exemplo n.º 3
0
 public synchronized void draw(GLEx g) {
   if (isExist()) {
     int i = index;
     if (max <= i) {
       i = max - 1;
     }
     SRPGMessage mes = getMessage(i);
     if (listener != null) {
       listener.drawBackground(i, g);
     }
     if (character != null) {
       g.drawTexture(character, chara_x, chara_y);
     }
     LFont font = g.getFont();
     if (face != null) {
       int w = face.getWidth();
       int h = face.getHeight();
       int x = mes.getX();
       int y = mes.getY() - h;
       g.setColor(LColor.black);
       g.fillRect(x, y, w, h);
       g.drawTexture(face, x, y);
     }
     g.setFont(mes.getFont());
     if (background == null) {
       LGradation.getInstance(LColor.white, LColor.black, mes.getWidth(), mes.getHeight())
           .drawHeight(g, mes.getX(), mes.getY());
       g.setColor(LColor.black);
       g.drawRect(mes.getX(), mes.getY(), mes.getWidth(), mes.getHeight());
     } else {
       g.drawTexture(background, mes.getX(), mes.getY());
     }
     mes.update(delay);
     g.setColor(LColor.white);
     mes.draw(g);
     if (listener != null) {
       listener.drawForeground(i, g);
     }
     g.setFont(font);
     g.resetColor();
   }
 }