use of org.shadebob.skineditor.screens.MainScreen in project gdx-skineditor by cobolfoo.
the class SkinEditorGame method create.
@Override
public void create() {
opt = new OptionalChecker();
fm = new SystemFonts();
fm.refreshFonts();
// Create projects folder if not already here
FileHandle dirProjects = new FileHandle("projects");
if (dirProjects.isDirectory() == false) {
dirProjects.mkdirs();
}
// Rebuild from raw resources, kind of overkill, might disable it for production
TexturePacker.Settings settings = new TexturePacker.Settings();
settings.combineSubdirectories = true;
TexturePacker.process(settings, "resources/raw/", ".", "resources/uiskin");
batch = new SpriteBatch();
skin = new Skin();
atlas = new TextureAtlas(Gdx.files.internal("resources/uiskin.atlas"));
skin.addRegions(new TextureAtlas(Gdx.files.local("resources/uiskin.atlas")));
skin.load(Gdx.files.local("resources/uiskin.json"));
screenMain = new MainScreen(this);
screenWelcome = new WelcomeScreen(this);
setScreen(screenWelcome);
}
Aggregations