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

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

Go to download

Entity Manager module for the CodinGame engine toolkit. Simplify the management of shapes and drawings.

There is a newer version: 4.5.0
Show newest version
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. *

*

* Default is null. *

* * * @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 - 2024 Weber Informatics LLC | Privacy Policy