Package com.golden.gamedev.object

Examples of com.golden.gamedev.object.GameFont


    put("Text Color", Color.BLACK);
    put("Text Over Color", Color.BLACK);
    put("Text Pressed Color", Color.BLACK);
    put("Text Disabled Color", Color.BLACK);

    GameFont font = new SystemFont(new Font("Dialog", Font.BOLD, 15));
    put("Text Font", font);
    put("Text Over Font", font);
    put("Text Pressed Font", font);
    put("Text Disabled Font", font);
View Full Code Here


    put("Background Color", new Color(204,204,255));

    put("Text Color", Color.BLACK);
    put("Text Disabled Color", Color.GRAY);

    GameFont font = new SystemFont(new Font("DIALOG", Font.BOLD, 14));
    put("Text Font", font);
    put("Text Disabled Font", font);

    put("Text Vertical Alignment Integer", UIConstants.CENTER);
    put("Text Insets", new Insets(2, 6, 2, 0));
View Full Code Here

    if (tooltip == null) return null;

    String tipText = tooltip.getToolTipText();
    String[] document = GraphicsUtil.parseString(tipText);

    GameFont font = (GameFont) get("Text Font", component);
    Insets inset = (Insets) get("Text Insets", component);
    int space = ((Integer) get("Text Vertical Space Integer", component)).intValue();
    int width = 0;
    for (int i=0;i < document.length;i++) {
      w = font.getWidth(document[i]) + inset.left + inset.right;
      if (w > width) width = w;
    }
    int height = (document.length * (font.getHeight()+space)) - space +
           inset.top + inset.bottom;


    BufferedImage[] ui = GraphicsUtil.createImage(1, width, height, Transparency.OPAQUE);
    Graphics2D g = ui[0].createGraphics();
View Full Code Here

    put("Background Disabled Color", null);

    put("Text Color", Color.BLACK);
    put("Text Disabled Color", Color.GRAY);

    GameFont font = new SystemFont(new Font("Verdana", Font.PLAIN, 12));
    put("Text Font", font);
    put("Text Disabled Font", font);

    put("Text Horizontal Alignment Integer", UIConstants.LEFT);
    put("Text Vertical Alignment Integer", UIConstants.CENTER);
View Full Code Here

    try {
      URL fontURL = com.golden.gamedev.Game.class.getResource("Game.fnt");
      BufferedImage fpsImage = ImageUtil.getImage(fontURL);
     
      this.fontManager = new GameFontManager();
      GameFont font = this.fontManager.getFont(fpsImage);
     
      // clear background with red color
      // and write cracked version!
      Graphics2D g = this.bsGraphics.getBackBuffer();
     
      g.setColor(Color.RED.darker());
      g.fillRect(0, 0, this.getWidth(), this.getHeight());
      font.drawString(g, "THIS GAME IS USING", 10, 10);
      font.drawString(g, "GTGE CRACKED VERSION!!", 10, 30);
      font.drawString(g, "PLEASE REPORT THIS GAME TO", 10, 50);
      font.drawString(g, "WWW.GOLDENSTUDIOS.OR.ID", 10, 70);
      font.drawString(g, "THANK YOU....", 10, 105);
     
      this.bsGraphics.flip();
     
      // wait for 8 seconds
      this.bsInput = new AWTInput(this.bsGraphics.getComponent());
View Full Code Here

  /** ************************************************************************* */
  /** ************************** TEXT RENDERING ******************************* */
  /** ************************************************************************* */
 
  public void drawString(String str, int x, int y) {
    GameFont font = this.getGameFont();
   
    font.drawString(this, str, x, y + this.gap);
  }
View Full Code Here

    GL11.glEnable(GL11.GL_TEXTURE_2D);
  }
 
  private GameFont getGameFont() {
    Font f = this.getFont();
    GameFont gameFont = (GameFont) this.fontMap.get(f);
   
    if (gameFont == null) {
      BufferedImage bitmap = FontUtil.createBitmapFont(f, Color.BLACK);
     
      int delimiter = bitmap.getRGB(0, 0); // pixel <0,0> : delimiter
View Full Code Here

  /** ************************************************************************* */
  /** ************************** TEXT RENDERING ******************************* */
  /** ************************************************************************* */
 
  public void drawString(String str, int x, int y) {
    GameFont font = this.getGameFont();
   
    font.drawString(this, str, x, y + this.gap);
  }
View Full Code Here

    this.GL11.glEnable(GL.GL_TEXTURE_2D);
  }
 
  private GameFont getGameFont() {
    Font f = this.getFont();
    GameFont gameFont = (GameFont) this.fontMap.get(f);
   
    if (gameFont == null) {
      BufferedImage bitmap = FontUtil.createBitmapFont(f, Color.BLACK);
     
      int delimiter = bitmap.getRGB(0, 0); // pixel <0,0> : delimiter
View Full Code Here

    this.put("Text Color", Color.BLACK);
    this.put("Text Over Color", Color.BLACK);
    this.put("Text Pressed Color", Color.BLACK);
    this.put("Text Disabled Color", Color.BLACK);
   
    GameFont font = new SystemFont(new Font("Dialog", Font.BOLD, 15));
    this.put("Text Font", font);
    this.put("Text Over Font", font);
    this.put("Text Pressed Font", font);
    this.put("Text Disabled Font", font);
   
View Full Code Here

TOP

Related Classes of com.golden.gamedev.object.GameFont

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.