Package MineGod

Source Code of MineGod.GUILabelScore

package MineGod;

import java.awt.Font;
import java.io.IOException;

import org.lwjgl.opengl.GL11;
import org.newdawn.slick.TrueTypeFont;
import org.newdawn.slick.opengl.Texture;
import org.newdawn.slick.opengl.TextureLoader;
import org.newdawn.slick.util.ResourceLoader;

public class GUILabelScore extends GUILabel{

       
        public static TrueTypeFont font;
        int distance = 0;
        static String filler = "                    ";
        String name = "Bobby";
       
       
        public GUILabelScore(int y){
                x = 257;
                this.y = y;
                width = 64;
                height = 64;
                active = true;
                hidden = false;
        }
       
        public static void loadTexture(){
                Font awtFont = new Font("Times New Roman", Font.BOLD, 24);
                font = new TrueTypeFont(awtFont, true);
        }
       
       
        @Override
        public Texture getTexture() {
                return null;
        }
       
        public void render(double zIndex){
                if (!hidden){
                        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
                        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
                        font.drawString((float)x + 20, (float)y, distance+filler+name);
               
                }
        }
               
       
       
       
}
TOP

Related Classes of MineGod.GUILabelScore

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.