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

com.github.czyzby.autumn.mvc.component.ui.dto.SkinData Maven / Gradle / Ivy

Go to download

MVC framework based on LibGDX using Autumn for components management and LML as view templates.

There is a newer version: 1.9.1.9.6
Show newest version
package com.github.czyzby.autumn.mvc.component.ui.dto;

import com.github.czyzby.kiwi.util.gdx.file.CommonFileExtension;

/** Data holder of a single skin.
 *
 * @author MJ */
public class SkinData {
    private final String path;
    private final String[] fonts;
    private final String[] fontsNames;

    public SkinData(final String path, final String[] fonts, final String[] fontNames) {
        if (path.endsWith(CommonFileExtension.JSON)) {
            this.path = path.substring(0, path.length() - CommonFileExtension.JSON.length());
        } else {
            this.path = path;
        }
        this.fonts = fonts;
        fontsNames = fontNames;
    }

    /** @return internal path to the skin. */
    public String getPath() {
        return path;
    }

    /** @return internal paths to the fonts. */
    public String[] getFonts() {
        return fonts;
    }

    /** @return names of the fonts as they appear in the skin, in the order matching {@link #getFonts()} array. */
    public String[] getFontsNames() {
        return fontsNames;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy