Splitting UI atlas

This commit is contained in:
Anuken 2019-07-03 15:59:50 -04:00
parent b7008072f8
commit d3c8678f80
11 changed files with 7011 additions and 7379 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

View file

@ -0,0 +1,8 @@
{
duplicatePadding: true,
combineSubdirectories: true,
flattenPaths: true,
maxWidth: 2048,
maxHeight: 2048,
fast: true
}

View file

@ -0,0 +1,8 @@
{
duplicatePadding: true,
combineSubdirectories: true,
flattenPaths: true,
maxWidth: 1024,
maxHeight: 1024,
fast: true
}

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,019 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 276 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 KiB

After

Width:  |  Height:  |  Size: 254 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View file

@ -2,12 +2,9 @@ package io.anuke.mindustry;
import io.anuke.arc.*;
import io.anuke.arc.graphics.Color;
import io.anuke.arc.graphics.Texture;
import io.anuke.arc.graphics.g2d.Draw;
import io.anuke.arc.graphics.g2d.SpriteBatch;
import io.anuke.arc.graphics.g2d.*;
import io.anuke.arc.math.Mathf;
import io.anuke.arc.util.Log;
import io.anuke.arc.util.Time;
import io.anuke.arc.util.*;
import io.anuke.mindustry.core.*;
import io.anuke.mindustry.game.EventType.GameLoadEvent;
import io.anuke.mindustry.io.BundleLoader;
@ -64,12 +61,12 @@ public class Mindustry extends ApplicationCore{
Core.graphics.clear(Color.BLACK);
Draw.proj().setOrtho(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight());
Texture icon = new Texture("sprites/logotext.png");
float width = Math.min(Core.graphics.getWidth() - 10f, icon.getWidth());
Draw.rect(Draw.wrap(icon), Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, width, (float)icon.getHeight() / icon.getWidth() * width);
Draw.flush();
//Texture icon = new Texture("sprites/logotext.png");
//float width = Math.min(Core.graphics.getWidth() - 10f, icon.getWidth());
//Draw.rect(Draw.wrap(icon), Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, width, (float)icon.getHeight() / icon.getWidth() * width);
//Draw.flush();
icon.dispose();
//icon.dispose();
}
}

View file

@ -264,7 +264,7 @@ task tileImages(){
}
}
task pack(){
task pack(dependsOn: classes){
doLast{
//cleanup old sprites
@ -281,7 +281,6 @@ task pack(){
//run generation task; generate all needed sprites
file(genFolder).mkdirs()
javaexec{
main = "io.anuke.mindustry.ImagePacker"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in