All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codingame.gameengine.module.entities.BitmapText Maven / Gradle / Ivy

package com.codingame.gameengine.module.entities;

import java.util.Objects;

/**
 * Represents a label on screen, you can use any bitmap font in your asset folder as it's font.
 */
public class BitmapText extends TextBasedEntity {

    private String font;
    
    @Override
    Type getType() {
        return Entity.Type.BITMAPTEXT;
    }

    /**
     * Returns the name of the font of this BitmapText in px.
     * 

* Default is null. * * @return the size of the font of this BitmapText. */ public String getFont() { return font; } /** * Sets the name of the font of this BitmapText. *

* Only fonts available to the browser can be displayed. * * * @param font * the size for the font of this BitmapText. * @return this BitmapText. * @exception NullPointerException * if font is null. */ public BitmapText setFont(String font) { Objects.requireNonNull(font); this.font = font; set("fontFamily", font, null); return this; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy