Exemple #1
0
 public void next() {
   nextIndex();
   boolean exist = listener != null;
   if (exist) {
     listener.next(getMessage(getIndex()));
   }
   if (!messageExist()) {
     setExist(false);
     if (exist) {
       listener.dispose();
     }
   }
 }
Exemple #2
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();
   }
 }
Exemple #3
0
 public void printWait(Screen screen) {
   this.isLock = true;
   for (int i = 0; i < max; i++) {
     for (; !maxCheck(); ) {
       setDelay(screen.elapsedTime);
       try {
         screen.wait(LSystem.SECOND);
       } catch (InterruptedException e) {
       }
     }
     next();
     setDelay(screen.elapsedTime);
     try {
       screen.wait(LSystem.SECOND);
     } catch (InterruptedException e) {
     }
   }
   setExist(false);
   if (exist) {
     listener.dispose();
   }
 }