Package org.newdawn.slick

Examples of org.newdawn.slick.Font.drawString()


    if (this.state == HOVERED) {
      // The progressbar is hovered. If there is a title, it is shown in
      // place of the percentage
      if (this.title != null) {
        g.setColor(this.filledColor);
        font.drawString(this.ox + 2, this.oy + 2, this.title);
        return;
      }
    }
    int percentage;
    if (this.maxValue.equals(BigDecimal.ZERO)) {
View Full Code Here


    }

    if (this.displayValues) {
      Font sfont = FontHelper.getFont(FontHelper.VISITOR,
          FontHelper.convert(Color.white), midHeight);
      sfont.drawString(this.ox + 2, this.oy + midHeight + 1, this.value
          + "/" + this.maxValue);
    }

  }
View Full Code Here

        .get(this.selectedBuilding.getI18n())));

    // Building level
    String temp = I18n.get("global.level") + " : "
        + this.selectedBuilding.getLevel();
    fontNormal.drawString(x, y += 40, FontHelper.firstToUpper(temp));

    // Current action
    String title = null;
    BigDecimal maxValue = null;
    BigDecimal value = null;
View Full Code Here

      maxValue = BigDecimal.valueOf(sa.getDuration());
      value = BigDecimal.valueOf(sa.getCurrentValue());
    }

    if (a != null) {
      fontNormal.drawString(x, y += 35, title);

      // Action progress
      this.selectedBuildingPB.setMaxValue(maxValue);
      this.selectedBuildingPB.setValue(value);
      this.selectedBuildingPB.setOX(x);
View Full Code Here

    renderProgressBars(g, x + TOGGLE_BUTTON_ZONE_WIDTH, y);

    // Render the colony name
    UIHelper.drawWindow(g, Settings.WIDTH - 140, 0, 140, 46, 5);
    Font font = FontHelper.getFont(FontHelper.HEMI_HEAD, Color.white, 20);
    font.drawString(Settings.WIDTH - 130, 15, GameData.getSelectedColony()
        .getName());
  }
}
View Full Code Here

    // Colony name
    bigFont.drawString(x + 2, y + 2, this.colony.getName());

    // The planet name
    y += 20;
    smallFont.drawString(x + 12, y + 2, this.colony.getPlanetName());

    UIHelper.drawDarkBox(g, x, y + 35, 175, 40);

    ResearchAction research = this.colony.getResearch();
    if (research != null) {
View Full Code Here

    UIHelper.drawDarkBox(g, x, y + 35, 175, 40);

    ResearchAction research = this.colony.getResearch();
    if (research != null) {
      // The colony's current research name
      smallFont.drawString(x + 4, y + 45, research.getTechnology()
          .getName());

      // The colony's current research progress
      this.researchPB.setMaxValue(BigDecimal.valueOf(research
          .getDuration()));
View Full Code Here

    g.setColor(Style.BORDER_COLOR);
    g.drawLine(x, y, this.getOX() + this.width - padding, y);

    y += 10;
    g.setColor(Color.black);
    font.drawString(this.getOX() + 10, y, this.name);

    y += 20;
    font.drawString(x + 100, y, I18n.getFirstToUpper("resource.price"));
    font.drawString(x + 200, y, I18n.getFirstToUpper("resource.income"));
    font.drawString(x + 300, y, I18n.getFirstToUpper("resource.store"));
View Full Code Here

    y += 10;
    g.setColor(Color.black);
    font.drawString(this.getOX() + 10, y, this.name);

    y += 20;
    font.drawString(x + 100, y, I18n.getFirstToUpper("resource.price"));
    font.drawString(x + 200, y, I18n.getFirstToUpper("resource.income"));
    font.drawString(x + 300, y, I18n.getFirstToUpper("resource.store"));

    y += 20;
    g.drawLine(x, y, this.getOX() + 400, y);
View Full Code Here

    g.setColor(Color.black);
    font.drawString(this.getOX() + 10, y, this.name);

    y += 20;
    font.drawString(x + 100, y, I18n.getFirstToUpper("resource.price"));
    font.drawString(x + 200, y, I18n.getFirstToUpper("resource.income"));
    font.drawString(x + 300, y, I18n.getFirstToUpper("resource.store"));

    y += 20;
    g.drawLine(x, y, this.getOX() + 400, y);
    final int pitch = 20;
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.