Package mdesl.graphics.text

Examples of mdesl.graphics.text.BitmapFont


    try {
      tex = new Texture(Util.getResource("res/tiles.png"), Texture.NEAREST);
      tex2 = new Texture(Util.getResource("res/ptsans_00.png"));
      tile = new TextureRegion(tex, 128, 64, 64, 64);
     
      font = new BitmapFont(Util.getResource("res/ptsans.fnt"), Util.getResource("res/ptsans_00.png"));
     
    } catch (IOException e) {
      // ... do something here ...
      Sys.alert("Error", "Could not decode images!");
      e.printStackTrace();
View Full Code Here


  protected void create() throws LWJGLException {
    super.create();

    //Load some textures
    try {
      font = new BitmapFont(Util.getResource("res/ptsans.fnt"), Util.getResource("res/ptsans_00.png"));
    } catch (IOException e) {
      // ... do something here ...
      Sys.alert("Error", "Could not decode font!");
      e.printStackTrace();
      System.exit(0);
View Full Code Here

     
      //in Photoshop, we included a small white box at the bottom right of our font sheet
      //we will use this to draw lines and rectangles within the same batch as our text
      rect = new TextureRegion(fontTex, fontTex.getWidth()-2, fontTex.getHeight()-2, 1, 1);
     
      font = new BitmapFont(Util.getResource("res/ptsans.fnt"), fontTex);
    } catch (IOException e) {
      throw new RuntimeException("couldn't decode texture");
    }
   
    glClearColor(0.5f, .5f, .5f, 1f);
View Full Code Here

    grid = prefs.getBoolean("grid", true);
    checkBG = prefs.getBoolean("checkBG", true);
    polling = prefs.getBoolean("polling", true);
    try {
      Texture fontTex = new Texture(Util.getResource("res/ptsans_00.png"));
      font = new BitmapFont(Util.getResource("res/ptsans.fnt"), fontTex);
     
      String path = prefs.get("url", null);
      if (path!=null&&path.length()!=0) {
        try {
          File file = new File(URLDecoder.decode(path, "UTF-8"));
View Full Code Here

TOP

Related Classes of mdesl.graphics.text.BitmapFont

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.