Package org.newdawn.slick

Examples of org.newdawn.slick.Image.draw()


    // Robots
    List<PreparationAction> robotActions = GameData.getSelectedColony()
        .getPreparationActions();
    for (PreparationAction a : robotActions) {
      Image gfx = ImageManager.getGfx(a.getGfxKey());
      gfx.draw(getScreenX(a.getX()), getScreenY(a.getY()));

      // Render the construction progress bar
      int progress = a.getProgression();
      int x = getScreenX(a.getX());
      int y = getScreenY(a.getY());
View Full Code Here


  private void renderRobots(Graphics g) throws SlickException {
    List<PreparationAction> actions = GameData.getSelectedColony()
        .getPreparationActions();
    for (PreparationAction a : actions) {
      Image gfx = ImageManager.getGfx("terrabot");
      gfx.draw(getScreenX(a.getX()), getScreenY(a.getY()));
    }
  }

  /**
   * This method handles resource rendering. For each resource, a progress bar
View Full Code Here

    BigDecimal modifier;

    // Progress bar of robots use
    UIHelper.drawDarkBox(g, x + padding, oy + padding, 24, 20);
    Image img = ImageManager.getGfx("robot-small");
    img.draw(x + padding + 2, oy + padding);
    BigDecimal maxVal = BigDecimal.valueOf(GameData.getSelectedColony()
        .getTotalRobots());
    BigDecimal curVal = BigDecimal.valueOf(GameData.getSelectedColony()
        .getAvailableRobots());
    this.robotBar.setMaxValue(maxVal);
View Full Code Here

      max = GameData.getSelectedColony().getStorSpace(r);
      final int availableSpace = max.subtract(inStore).intValue();

      UIHelper.drawDarkBox(g, x + padding, oy + padding, 24, 20);
      img = ImageManager.getGfx(r.getGfxBase() + "-small");
      img.draw(x + padding + 2, oy + padding);
      // Creating and rendering the progress bar
      pb = this.resourceBars.get(r);
      pb.setX(x + padding + 24);
      pb.setY(oy + padding);
      pb.setMaxValue(max);
View Full Code Here

    UIHelper.drawDarkBox(g, ox + PADDING, oy + PADDING * 2 + 32, 33, 33);

    Image gfx = ImageManager.getGfx(this.selectedBuilding.getType()
        .toString().toLowerCase());
    gfx.draw(ox + PADDING + 1, oy + PADDING * 2 + 32);

    // Building name
    Font fontBig = FontHelper
        .getFont(FontHelper.HEMI_HEAD, Color.white, 30);
    Font fontNormal = FontHelper.getFont(FontHelper.HEMI_HEAD, Color.white,
View Full Code Here

    Image img;
    x += 3;
    for (Resource r : resources) {
      UIHelper.drawDarkBox(g, x, y += 3, 24, 20);
      img = ImageManager.getGfx(r.getGfxBase() + "-small");
      img.draw(x + 3, y, r.getColor());

      String value = costMap.get(r).toString();
      Label lbl = this.upgradeLabels.get(r);
      drawResourceData(g, x + 24, y, value, lbl);
View Full Code Here

    int dx = x + padd + 3;
    Label lbl;
    for (Resource r : resources) {
      UIHelper.drawDarkBox(g, dx, dy, 24, 20);
      img = ImageManager.getGfx(r.getGfxBase() + "-small");
      img.draw(dx + 3, dy, r.getColor());

      lbl = labels.get(r);
      UIHelper.drawDarkBox(g, dx + 24, dy, lbl.getWidth() + 4, 15);

      dy += 23;
View Full Code Here

    x += 3;
    Map<Resource, BigDecimal> resourceMap = this.colony.getResources();
    for (Resource r : resources) {
      UIHelper.drawDarkBox(g, x, y += 3, 24, 20);
      img = ImageManager.getGfx(r.getGfxBase() + "-small");
      img.draw(x + 3, y, r.getColor());

      String value = resourceMap.get(r).toString();
      Label lbl = this.labels.get(r);

      final int zoneHeight = 15;
View Full Code Here

    Image img;
    for (Resource r : resources) {
      img = ImageManager.getGfx(r.getGfxBase() + "-small");

      UIHelper.drawBlackBox(g, x, y, 20, 20);
      img.draw(x, y, r.getColor());

      y += 20 + 5;
    }
  }
View Full Code Here

    int x = sx + 45;
    final int rsx = x;
    for (Resource r : resources) {
      UIHelper.drawDarkBox(g, x, y += 3, 24, 20);
      img = ImageManager.getGfx(r.getGfxBase() + "-small");
      img.draw(x + 3, y, r.getColor());

      String value = resourceMap.get(r).toString();
      Label lbl = this.storeLabels.get(r);

      final int zoneHeight = 15;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.