Package games.stendhal.client.gui.j2d

Examples of games.stendhal.client.gui.j2d.RemovableSprite


   */
  public StendhalCursor getCursor(Point point) {
    StendhalCursor cursor = null;

    // is the cursor aiming at a text box?
    final RemovableSprite text = screen.getTextAt(point.x, point.y);
    if (text != null) {
      return StendhalCursor.NORMAL;
    }

    Point2D point2 = screen.convertScreenViewToWorld(point);
View Full Code Here


      || (Math.abs(point.getY() - yOnMousePressed) > 10)) {
      return false;
    }
   
    // for the text pop up....
    final RemovableSprite text = screen.getTextAt(point.x, point.y);
    if (text != null) {
      screen.removeText(text);
      return true;
    }
View Full Code Here

          }
        }
      }
    }

    texts.add(new RemovableSprite(sprite, sx, sy, Math.max(
        RemovableSprite.STANDARD_PERSISTENCE_TIME, textLength
            * RemovableSprite.STANDARD_PERSISTENCE_TIME / 50)));
  }
View Full Code Here

    // lists are above preceding texts
    synchronized (staticSprites) {
      final ListIterator<RemovableSprite> it = staticSprites.listIterator(staticSprites.size());

      while (it.hasPrevious()) {
        final RemovableSprite text = it.previous();

        if (text.getArea().contains(x, y)) {
          return text;
        }
      }
    }
    // map pixel coordinates
    final int tx = x + svx;
    final int ty = y + svy;
    synchronized (texts) {
      final ListIterator<RemovableSprite> it = texts.listIterator(texts.size());

      while (it.hasPrevious()) {
        final RemovableSprite text = it.previous();

        if (text.getArea().contains(tx, ty)) {
          return text;
        }
      }
    }
View Full Code Here

   *   removed
   */
  private void addStaticSprite(Sprite sprite, long persistTime) {
    int x = (getWidth() - sprite.getWidth()) / 2;
    int y = getHeight() - sprite.getHeight();
    staticSprites.add(new RemovableSprite(sprite, x, y, persistTime));
  }
View Full Code Here

TOP

Related Classes of games.stendhal.client.gui.j2d.RemovableSprite

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.