Package com.badlogic.gdx.graphics.g2d

Examples of com.badlogic.gdx.graphics.g2d.BitmapFont


    camera = new OrthographicCamera();
    camera.setToOrtho(false, Constants.SCREEN_WIDTH, Constants.SCREEN_HEIGHT);
    camera.update();
   
    batch = new SpriteBatch();
    font = new BitmapFont();
   
    setScreen(new MainMenuScreen(this));
  }
View Full Code Here


    @Override
    public void create() {
        setScreen(new Screen() {

            private final Stage stage = new Stage(new StretchViewport(GAME_VIEWPORT_WIDTH, GAME_VIEWPORT_HEIGHT));
            private final BitmapFont bitmapFont = new BitmapFont();
            private final Label fps = new Label("", new Label.LabelStyle(bitmapFont, Color.WHITE));
            private final Road road = new Road();

            @Override
            public void render(float v) {
View Full Code Here

    particles.initialize();
    camera = new OrthographicCamera(WORLD_WIDTH, WORLD_HEIGHT);
    camera.position.set(0, (WORLD_HEIGHT / 2) - 1, 0);
    createWorld();
    batch = new SpriteBatch(SIZE);
    font = new BitmapFont();
    Gdx.input.setInputProcessor(this);
  }
View Full Code Here

public class Continue extends Message {
 
  public Continue() {
    super();
    text = "Continue?";
    font = new BitmapFont(Gdx.files.internal("data/fonts/bonzai24.fnt"),
        Gdx.files.internal("data/fonts/bonzai24.png"), false);
   
    LabelStyle ls = new LabelStyle(Configuration.bonzai24,Color.WHITE);
    label = new Label(text, ls);
    label.setAlignment(Align.center);
View Full Code Here

  public void show() {
    batch = new SpriteBatch();
    skin = new Skin();
    atlas = new TextureAtlas("data/buttons/button.pack");
    skin.addRegions(atlas);
    bonzai = new BitmapFont(Gdx.files.internal("data/fonts/bonzai32.fnt"),
        Gdx.files.internal("data/fonts/bonzai32.png"), false);
  }
View Full Code Here

  }

  private TextButton getContinueNoButton() {
    TextButtonStyle style = new TextButtonStyle();

    BitmapFont font = Configuration.bonzai24;

    style.font = font;

    TextButton no = new TextButton("No", style);
    no.setWidth(4 * Configuration.gameScale);
 
View Full Code Here

  }

  private TextButton getContinueYesButton() {
    TextButtonStyle style = new TextButtonStyle();

    BitmapFont font = Configuration.bonzai24;

    style.font = font;

    TextButton yes = new TextButton("Yes", style);
    yes.setWidth(4 * Configuration.gameScale);
 
View Full Code Here

   * @param size the size in pixels
   * @param characters the characters the font should contain
   * @param flip whether to flip the font horizontally, see {@link BitmapFont#BitmapFont(FileHandle, TextureRegion, boolean)} */
  public BitmapFont generateFont (int size, String characters, boolean flip) {
    FreeTypeBitmapFontData data = generateData(size, characters, flip, null);
    BitmapFont font = new BitmapFont(data, data.getTextureRegions(), false);
    font.setOwnsTexture(true);
    return font;
  }
View Full Code Here

  public void show() {
    batch = new SpriteBatch();
    atlas = new TextureAtlas("data/button.pack");
    skin = new Skin();
    skin.addRegions(atlas);
    white = new BitmapFont(Gdx.files.internal("data/whitefont.fnt"), false);
    black = new BitmapFont(Gdx.files.internal("data/font.fnt"), false);
  }
View Full Code Here

   * @param characters the characters the font should contain
   * @param flip whether to flip the font horizontally, see {@link BitmapFont#BitmapFont(FileHandle, TextureRegion, boolean)}
   * @deprecated use {@link #generateFont(FreeTypeFontParameter)} instead */
  public BitmapFont generateFont (int size, String characters, boolean flip) {
    FreeTypeBitmapFontData data = generateData(size, characters, flip, null);
    BitmapFont font = new BitmapFont(data, data.getTextureRegions(), false);
    font.setOwnsTexture(true);
    return font;
  }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.g2d.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.