Package org.newdawn.slick

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


   */
  public static void drawBox(Graphics g, int x, int y, int width, int height)
      throws SlickException {
    Image bg = ImageManager.getGfx("metal_texture").getSubImage(0, 0,
        width, height);
    bg.draw(x, y);
    g.setColor(Style.BORDER_COLOR);
    g.drawRect(x, y, width, height);
  }

  public static void drawDarkBox(Graphics g, int x, int y, int width, int height) throws SlickException{
View Full Code Here


  }

  public static void drawDarkBox(Graphics g, int x, int y, int width, int height) throws SlickException{
    Image bg = ImageManager.getGfx("metal_texture").getSubImage(0, 0,
        width, height);
    bg.draw(x, y, Style.BORDER_COLOR);
    g.setColor(Style.BORDER_COLOR);
    g.drawRect(x, y, width, height);
  }
 
  /**
 
View Full Code Here

      final int tileX = this.squareXOnMap;
      final int tileY = this.squareYOnMap;
      if (this.selectedAction instanceof PreparationAction) {
        // Preparation action
        if (TileHelper.tileIsPreparable(tileX, tileY)) {
          gfx.draw(this.squareXOnScreen, this.squareYOnScreen);
        } else {
          gfx.draw(this.squareXOnScreen, this.squareYOnScreen,
              Color.red);
        }
View Full Code Here

      if (this.selectedAction instanceof PreparationAction) {
        // Preparation action
        if (TileHelper.tileIsPreparable(tileX, tileY)) {
          gfx.draw(this.squareXOnScreen, this.squareYOnScreen);
        } else {
          gfx.draw(this.squareXOnScreen, this.squareYOnScreen,
              Color.red);
        }

      } else if (this.selectedAction instanceof BuildingAction) {
        // Building action
View Full Code Here

          int x = getScreenX(tileX - 1);
          int y = getScreenY(tileY - 1);
          g.fillRect(x, y, Settings.TILE_SIZE * 3,
              Settings.TILE_SIZE * 3);
          gfx.draw(this.squareXOnScreen, this.squareYOnScreen);
          // The command center construction is an exception
        } else if (TileHelper.tileIsBuildable(tileX, tileY, ba
            .getBuilding().getType())) {
          // Can build here
          gfx.draw(this.squareXOnScreen, this.squareYOnScreen);
View Full Code Here

          gfx.draw(this.squareXOnScreen, this.squareYOnScreen);
          // The command center construction is an exception
        } else if (TileHelper.tileIsBuildable(tileX, tileY, ba
            .getBuilding().getType())) {
          // Can build here
          gfx.draw(this.squareXOnScreen, this.squareYOnScreen);
        } else {
          // Cannot build here
          gfx.draw(this.squareXOnScreen, this.squareYOnScreen,
              Color.red);
        }
View Full Code Here

            .getBuilding().getType())) {
          // Can build here
          gfx.draw(this.squareXOnScreen, this.squareYOnScreen);
        } else {
          // Cannot build here
          gfx.draw(this.squareXOnScreen, this.squareYOnScreen,
              Color.red);
        }
      }
    }
View Full Code Here

    for (Building b : buildings) {
      Image gfx = null;
      if (BuildingType.ROAD.equals(b.getType())) {
        // Road are rendered according to the neighbors buildings
        gfx = UIHelper.getRoadGfx(b);
        gfx.draw(getScreenX(b.getX()), getScreenY(b.getY()));
      } else {
        gfx = ImageManager.getGfx(b.getType().toString());
        gfx.draw(getScreenX(b.getX()), getScreenY(b.getY()));
        if (b.equals(this.selectedBuilding)) {
          highlightBuilding(g, b);
View Full Code Here

        // Road are rendered according to the neighbors buildings
        gfx = UIHelper.getRoadGfx(b);
        gfx.draw(getScreenX(b.getX()), getScreenY(b.getY()));
      } else {
        gfx = ImageManager.getGfx(b.getType().toString());
        gfx.draw(getScreenX(b.getX()), getScreenY(b.getY()));
        if (b.equals(this.selectedBuilding)) {
          highlightBuilding(g, b);
        }
      }
View Full Code Here

        // Road are rendered according to the neighbors buildings
        gfx = UIHelper.getRoadGfx(b);
      } else {
        gfx = ImageManager.getGfx(b.getType().toString());
      }
      gfx.draw(getScreenX(b.getX()), getScreenY(b.getY()), new Color(
          0.5F, 0.5F, 0.5F, 0.5F));

      // Render the construction progress bar
      int progress = action.getProgression();
      int x = getScreenX(b.getX());
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.