Fixed performance regression / Removed useless fallback sprites
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
duplicatePadding: true,
|
|
||||||
combineSubdirectories: true,
|
|
||||||
flattenPaths: true,
|
|
||||||
maxWidth: 1024,
|
|
||||||
maxHeight: 1024,
|
|
||||||
fast: true
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 71 B After Width: | Height: | Size: 71 B |
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
duplicatePadding: true,
|
|
||||||
combineSubdirectories: true,
|
|
||||||
flattenPaths: true,
|
|
||||||
maxWidth: 1024,
|
|
||||||
maxHeight: 1024,
|
|
||||||
fast: true
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 70 B |
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
duplicatePadding: true,
|
|
||||||
combineSubdirectories: true,
|
|
||||||
flattenPaths: true,
|
|
||||||
maxWidth: 1024,
|
|
||||||
maxHeight: 1024,
|
|
||||||
fast: true
|
|
||||||
}
|
|
||||||
|
After Width: | Height: | Size: 71 B |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 236 KiB |
|
Before Width: | Height: | Size: 277 KiB |
|
Before Width: | Height: | Size: 374 KiB |
|
Before Width: | Height: | Size: 278 KiB |
@@ -9,15 +9,15 @@
|
|||||||
},
|
},
|
||||||
TintedDrawable: {
|
TintedDrawable: {
|
||||||
dialogDim: {
|
dialogDim: {
|
||||||
name: white,
|
name: whiteui,
|
||||||
color: { r: 0, g: 0, b: 0, a: 0.9 }
|
color: { r: 0, g: 0, b: 0, a: 0.9 }
|
||||||
},
|
},
|
||||||
guideDim: {
|
guideDim: {
|
||||||
name: white,
|
name: whiteui,
|
||||||
color: { r: 0, g: 0, b: 0, a: 0.3 }
|
color: { r: 0, g: 0, b: 0, a: 0.3 }
|
||||||
},
|
},
|
||||||
invis: {
|
invis: {
|
||||||
name: white,
|
name: whiteui,
|
||||||
color: { r: 0, g: 0, b: 0, a: 0 }
|
color: { r: 0, g: 0, b: 0, a: 0 }
|
||||||
}
|
}
|
||||||
loadDim: {
|
loadDim: {
|
||||||
@@ -25,27 +25,27 @@
|
|||||||
color: { r: 0, g: 0, b: 0, a: 0.8 }
|
color: { r: 0, g: 0, b: 0, a: 0.8 }
|
||||||
},
|
},
|
||||||
chatfield: {
|
chatfield: {
|
||||||
name: white,
|
name: whiteui,
|
||||||
color: { r: 0, g: 0, b: 0, a: 0.2 }
|
color: { r: 0, g: 0, b: 0, a: 0.2 }
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
name: white,
|
name: whiteui,
|
||||||
color: { hex: "#000000ff" }
|
color: { hex: "#000000ff" }
|
||||||
},
|
},
|
||||||
none: {
|
none: {
|
||||||
name: white,
|
name: whiteui,
|
||||||
color: { r: 0, g: 0, b: 0, a: 0 }
|
color: { r: 0, g: 0, b: 0, a: 0 }
|
||||||
},
|
},
|
||||||
flat: {
|
flat: {
|
||||||
name: white,
|
name: whiteui,
|
||||||
color: { r: 0.0, g: 0.0, b: 0.0, a: 0.6 }
|
color: { r: 0.0, g: 0.0, b: 0.0, a: 0.6 }
|
||||||
},
|
},
|
||||||
flat-over: {
|
flat-over: {
|
||||||
name: white,
|
name: whiteui,
|
||||||
color: { hex: "#ffffff82" }
|
color: { hex: "#ffffff82" }
|
||||||
},
|
},
|
||||||
flat-down: {
|
flat-down: {
|
||||||
name: white,
|
name: whiteui,
|
||||||
color: { hex: "#ffd37fff" }
|
color: { hex: "#ffd37fff" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
up: info-banner
|
up: info-banner
|
||||||
},
|
},
|
||||||
clear-partial: {
|
clear-partial: {
|
||||||
down: white,
|
down: whiteui,
|
||||||
up: button-select,
|
up: button-select,
|
||||||
over: flat-down,
|
over: flat-down,
|
||||||
font: default-font,
|
font: default-font,
|
||||||
@@ -199,7 +199,7 @@
|
|||||||
over: flat-over
|
over: flat-over
|
||||||
},
|
},
|
||||||
clear-full: {
|
clear-full: {
|
||||||
down: white,
|
down: whiteui,
|
||||||
up: button-select,
|
up: button-select,
|
||||||
over: flat-down
|
over: flat-down
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package io.anuke.mindustry.core;
|
|||||||
|
|
||||||
import io.anuke.arc.*;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.graphics.Color;
|
import io.anuke.arc.graphics.Color;
|
||||||
import io.anuke.arc.graphics.GL20;
|
|
||||||
import io.anuke.arc.graphics.g2d.Draw;
|
import io.anuke.arc.graphics.g2d.Draw;
|
||||||
import io.anuke.arc.graphics.g2d.TextureAtlas;
|
import io.anuke.arc.graphics.g2d.TextureAtlas;
|
||||||
import io.anuke.arc.input.KeyCode;
|
import io.anuke.arc.input.KeyCode;
|
||||||
@@ -23,7 +22,6 @@ import io.anuke.mindustry.ui.dialogs.FloatingDialog;
|
|||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.IntBuffer;
|
|
||||||
|
|
||||||
import static io.anuke.arc.Core.scene;
|
import static io.anuke.arc.Core.scene;
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
@@ -43,10 +41,6 @@ public class Control implements ApplicationListener{
|
|||||||
private InputHandler input;
|
private InputHandler input;
|
||||||
|
|
||||||
public Control(){
|
public Control(){
|
||||||
IntBuffer buf = BufferUtils.newIntBuffer(1);
|
|
||||||
Core.gl.glGetIntegerv(GL20.GL_MAX_TEXTURE_SIZE, buf);
|
|
||||||
int maxSize = buf.get(0);
|
|
||||||
|
|
||||||
saves = new Saves();
|
saves = new Saves();
|
||||||
data = new GlobalData();
|
data = new GlobalData();
|
||||||
|
|
||||||
@@ -55,7 +49,7 @@ public class Control implements ApplicationListener{
|
|||||||
Effects.setShakeFalloff(10000f);
|
Effects.setShakeFalloff(10000f);
|
||||||
|
|
||||||
content.initialize(Content::init);
|
content.initialize(Content::init);
|
||||||
Core.atlas = new TextureAtlas(maxSize < 2048 ? "sprites/sprites_fallback.atlas" : "sprites/sprites.atlas");
|
Core.atlas = new TextureAtlas("sprites/sprites.atlas");
|
||||||
Draw.scl = 1f / Core.atlas.find("scale_marker").getWidth();
|
Draw.scl = 1f / Core.atlas.find("scale_marker").getWidth();
|
||||||
content.initialize(Content::load, true);
|
content.initialize(Content::load, true);
|
||||||
|
|
||||||
|
|||||||
@@ -511,7 +511,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for(Team team : Team.all){
|
for(Team team : Team.all){
|
||||||
ImageButton button = new ImageButton("white", "clear-toggle-partial");
|
ImageButton button = new ImageButton("whiteui", "clear-toggle-partial");
|
||||||
button.margin(4f);
|
button.margin(4f);
|
||||||
button.getImageCell().grow();
|
button.getImageCell().grow();
|
||||||
button.getStyle().imageUpColor = team.color;
|
button.getStyle().imageUpColor = team.color;
|
||||||
@@ -636,7 +636,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
if(!Core.atlas.isFound(region)) continue;
|
if(!Core.atlas.isFound(region)) continue;
|
||||||
|
|
||||||
ImageButton button = new ImageButton("white", "clear-toggle");
|
ImageButton button = new ImageButton("whiteui", "clear-toggle");
|
||||||
button.getStyle().imageUp = new TextureRegionDrawable(region);
|
button.getStyle().imageUp = new TextureRegionDrawable(region);
|
||||||
button.clicked(() -> editor.drawBlock = block);
|
button.clicked(() -> editor.drawBlock = block);
|
||||||
button.resizeImage(8 * 4f);
|
button.resizeImage(8 * 4f);
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class Shapes{
|
|||||||
Draw.rect(edge, x, y, edge.getWidth() * scale * Draw.scl, edge.getHeight() * scale * Draw.scl, rotation + 180);
|
Draw.rect(edge, x, y, edge.getWidth() * scale * Draw.scl, edge.getHeight() * scale * Draw.scl, rotation + 180);
|
||||||
Draw.rect(edge, x2, y2, edge.getWidth() * scale * Draw.scl, edge.getHeight() * scale * Draw.scl, rotation);
|
Draw.rect(edge, x2, y2, edge.getWidth() * scale * Draw.scl, edge.getHeight() * scale * Draw.scl, rotation);
|
||||||
|
|
||||||
Lines.stroke(10f * scale);
|
Lines.stroke(12f * scale);
|
||||||
Lines.line(line, x + Tmp.v1.x, y + Tmp.v1.y, x2 - Tmp.v1.x, y2 - Tmp.v1.y, CapStyle.none, 0f);
|
Lines.line(line, x + Tmp.v1.x, y + Tmp.v1.y, x2 - Tmp.v1.x, y2 - Tmp.v1.y, CapStyle.none, 0f);
|
||||||
Lines.stroke(1f);
|
Lines.stroke(1f);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class ContentDisplay{
|
|||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.addImage("white").height(3).color(Color.LIGHT_GRAY).pad(8).padLeft(0).padRight(0).fillX();
|
table.addImage("whiteui").height(3).color(Color.LIGHT_GRAY).pad(8).padLeft(0).padRight(0).fillX();
|
||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ public class ContentDisplay{
|
|||||||
table.add(block.description).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
table.add(block.description).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.addImage("white").height(3).color(Color.LIGHT_GRAY).pad(8).padLeft(0).padRight(0).fillX();
|
table.addImage("whiteui").height(3).color(Color.LIGHT_GRAY).pad(8).padLeft(0).padRight(0).fillX();
|
||||||
table.row();
|
table.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ public class ContentDisplay{
|
|||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.addImage("white").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
table.addImage("whiteui").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ public class ContentDisplay{
|
|||||||
table.add(item.description).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
table.add(item.description).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.addImage("white").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
table.addImage("whiteui").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
||||||
table.row();
|
table.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ public class ContentDisplay{
|
|||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.addImage("white").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
table.addImage("whiteui").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ public class ContentDisplay{
|
|||||||
table.add(liquid.description).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
table.add(liquid.description).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.addImage("white").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
table.addImage("whiteui").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
||||||
table.row();
|
table.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ public class ContentDisplay{
|
|||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.addImage("white").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
table.addImage("whiteui").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ public class ContentDisplay{
|
|||||||
table.add(mech.description).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
table.add(mech.description).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.addImage("white").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
table.addImage("whiteui").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
||||||
table.row();
|
table.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ public class ContentDisplay{
|
|||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.addImage("white").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
table.addImage("whiteui").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ public class ContentDisplay{
|
|||||||
table.add(unit.description).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
table.add(unit.description).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.addImage("white").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
table.addImage("whiteui").height(3).color(Color.LIGHT_GRAY).pad(15).padLeft(0).padRight(0).fillX();
|
||||||
table.row();
|
table.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ public class AboutDialog extends FloatingDialog{
|
|||||||
Table table = new Table("underline");
|
Table table = new Table("underline");
|
||||||
table.margin(0);
|
table.margin(0);
|
||||||
table.table(img -> {
|
table.table(img -> {
|
||||||
img.addImage("white").height(h - 5).width(40f).color(link.color);
|
img.addImage("whiteui").height(h - 5).width(40f).color(link.color);
|
||||||
img.row();
|
img.row();
|
||||||
img.addImage("white").height(5).width(40f).color(link.color.cpy().mul(0.8f, 0.8f, 0.8f, 1f));
|
img.addImage("whiteui").height(5).width(40f).color(link.color.cpy().mul(0.8f, 0.8f, 0.8f, 1f));
|
||||||
}).expandY();
|
}).expandY();
|
||||||
|
|
||||||
table.table(i -> {
|
table.table(i -> {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class ColorPickDialog extends Dialog{
|
|||||||
for(int i = 0; i < playerColors.length; i++){
|
for(int i = 0; i < playerColors.length; i++){
|
||||||
Color color = playerColors[i];
|
Color color = playerColors[i];
|
||||||
|
|
||||||
ImageButton button = table.addImageButton("white", "clear-toggle", 34, () -> {
|
ImageButton button = table.addImageButton("whiteui", "clear-toggle", 34, () -> {
|
||||||
cons.accept(color);
|
cons.accept(color);
|
||||||
hide();
|
hide();
|
||||||
}).size(48).get();
|
}).size(48).get();
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class ControlsDialog extends KeybindDialog{
|
|||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
title.setAlignment(Align.center);
|
title.setAlignment(Align.center);
|
||||||
titleTable.row();
|
titleTable.row();
|
||||||
titleTable.add(new Image("white"))
|
titleTable.add(new Image("whiteui"))
|
||||||
.growX().height(3f).pad(4f).get().setColor(Pal.accent);
|
.growX().height(3f).pad(4f).get().setColor(Pal.accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class DatabaseDialog extends FloatingDialog{
|
|||||||
|
|
||||||
table.add("$content." + type.name() + ".name").growX().left().color(Pal.accent);
|
table.add("$content." + type.name() + ".name").growX().left().color(Pal.accent);
|
||||||
table.row();
|
table.row();
|
||||||
table.addImage("white").growX().pad(5).padLeft(0).padRight(0).height(3).color(Pal.accent);
|
table.addImage("whiteui").growX().pad(5).padLeft(0).padRight(0).height(3).color(Pal.accent);
|
||||||
table.row();
|
table.row();
|
||||||
table.table(list -> {
|
table.table(list -> {
|
||||||
list.left();
|
list.left();
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ public class DiscordDialog extends Dialog{
|
|||||||
t.background("button").margin(0);
|
t.background("button").margin(0);
|
||||||
|
|
||||||
t.table(img -> {
|
t.table(img -> {
|
||||||
img.addImage("white").height(h - 5).width(40f).color(color);
|
img.addImage("whiteui").height(h - 5).width(40f).color(color);
|
||||||
img.row();
|
img.row();
|
||||||
img.addImage("white").height(5).width(40f).color(color.cpy().mul(0.8f, 0.8f, 0.8f, 1f));
|
img.addImage("whiteui").height(5).width(40f).color(color.cpy().mul(0.8f, 0.8f, 0.8f, 1f));
|
||||||
}).expandY();
|
}).expandY();
|
||||||
|
|
||||||
t.table(i -> {
|
t.table(i -> {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class FloatingDialog extends Dialog{
|
|||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
this.title.setAlignment(Align.center);
|
this.title.setAlignment(Align.center);
|
||||||
titleTable.row();
|
titleTable.row();
|
||||||
titleTable.addImage("white", Pal.accent)
|
titleTable.addImage("whiteui", Pal.accent)
|
||||||
.growX().height(3f).pad(4f);
|
.growX().height(3f).pad(4f);
|
||||||
|
|
||||||
hidden(() -> {
|
hidden(() -> {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class HostDialog extends FloatingDialog{
|
|||||||
ui.listfrag.rebuild();
|
ui.listfrag.rebuild();
|
||||||
}).grow().pad(8).get().setMaxLength(40);
|
}).grow().pad(8).get().setMaxLength(40);
|
||||||
|
|
||||||
ImageButton button = t.addImageButton("white", "clear-full", 40, () -> {
|
ImageButton button = t.addImageButton("whiteui", "clear-full", 40, () -> {
|
||||||
new ColorPickDialog().show(color -> {
|
new ColorPickDialog().show(color -> {
|
||||||
player.color.set(color);
|
player.color.set(color);
|
||||||
Core.settings.put("color-0", Color.rgba8888(color));
|
Core.settings.put("color-0", Color.rgba8888(color));
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ public class JoinDialog extends FloatingDialog{
|
|||||||
Core.settings.save();
|
Core.settings.save();
|
||||||
}).grow().pad(8).get().setMaxLength(maxNameLength);
|
}).grow().pad(8).get().setMaxLength(maxNameLength);
|
||||||
|
|
||||||
ImageButton button = t.addImageButton("white", "clear-full", 40, () -> {
|
ImageButton button = t.addImageButton("whiteui", "clear-full", 40, () -> {
|
||||||
new ColorPickDialog().show(color -> {
|
new ColorPickDialog().show(color -> {
|
||||||
player.color.set(color);
|
player.color.set(color);
|
||||||
Core.settings.put("color-0", Color.rgba8888(color));
|
Core.settings.put("color-0", Color.rgba8888(color));
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class MapsDialog extends FloatingDialog{
|
|||||||
button.margin(9);
|
button.margin(9);
|
||||||
button.add(map.name()).width(mapsize - 18f).center().get().setEllipsis(true);
|
button.add(map.name()).width(mapsize - 18f).center().get().setEllipsis(true);
|
||||||
button.row();
|
button.row();
|
||||||
button.addImage("white").growX().pad(4).color(Color.GRAY);
|
button.addImage("whiteui").growX().pad(4).color(Color.GRAY);
|
||||||
button.row();
|
button.row();
|
||||||
button.stack(new Image(map.texture).setScaling(Scaling.fit), new BorderImage(map.texture).setScaling(Scaling.fit)).size(mapsize - 20f);
|
button.stack(new Image(map.texture).setScaling(Scaling.fit), new BorderImage(map.texture).setScaling(Scaling.fit)).size(mapsize - 20f);
|
||||||
button.row();
|
button.row();
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
title.setAlignment(Align.center);
|
title.setAlignment(Align.center);
|
||||||
titleTable.row();
|
titleTable.row();
|
||||||
titleTable.add(new Image("white")).growX().height(3f).pad(4f).get().setColor(Pal.accent);
|
titleTable.add(new Image("whiteui")).growX().height(3f).pad(4f).get().setColor(Pal.accent);
|
||||||
|
|
||||||
cont.clearChildren();
|
cont.clearChildren();
|
||||||
cont.remove();
|
cont.remove();
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class ZoneInfoDialog extends FloatingDialog{
|
|||||||
}else{
|
}else{
|
||||||
cont.add(zone.localizedName()).color(Pal.accent).growX().center();
|
cont.add(zone.localizedName()).color(Pal.accent).growX().center();
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.addImage("white").color(Pal.accent).height(3).pad(6).growX();
|
cont.addImage("whiteui").color(Pal.accent).height(3).pad(6).growX();
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.addButton(zone.canConfigure() ? "$configure" : Core.bundle.format("configure.locked", zone.configureWave), () -> loadout.show(zone, rebuildItems)).fillX().pad(3).disabled(b -> !zone.canConfigure());
|
cont.addButton(zone.canConfigure() ? "$configure" : Core.bundle.format("configure.locked", zone.configureWave), () -> loadout.show(zone, rebuildItems)).fillX().pad(3).disabled(b -> !zone.canConfigure());
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|||||||
@@ -532,7 +532,7 @@ public class HudFragment extends Fragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showLaunch(){
|
public void showLaunch(){
|
||||||
Image image = new Image("white");
|
Image image = new Image("whiteui");
|
||||||
image.getColor().a = 0f;
|
image.getColor().a = 0f;
|
||||||
image.setFillParent(true);
|
image.setFillParent(true);
|
||||||
image.actions(Actions.fadeIn(40f / 60f));
|
image.actions(Actions.fadeIn(40f / 60f));
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ public class LoadingFragment extends Fragment{
|
|||||||
t.touchable(Touchable.enabled);
|
t.touchable(Touchable.enabled);
|
||||||
t.add().height(70f).row();
|
t.add().height(70f).row();
|
||||||
|
|
||||||
t.addImage("white").growX().height(3f).pad(4f).growX().get().setColor(Pal.accent);
|
t.addImage("whiteui").growX().height(3f).pad(4f).growX().get().setColor(Pal.accent);
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$loading").name("namelabel").pad(10f);
|
t.add("$loading").name("namelabel").pad(10f);
|
||||||
t.row();
|
t.row();
|
||||||
t.addImage("white").growX().height(3f).pad(4f).growX().get().setColor(Pal.accent);
|
t.addImage("whiteui").growX().height(3f).pad(4f).growX().get().setColor(Pal.accent);
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
button = t.addButton("$cancel", () -> {
|
button = t.addButton("$cancel", () -> {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class ItemSelection{
|
|||||||
for(Item item : items){
|
for(Item item : items){
|
||||||
if(!data.isUnlocked(item) && world.isZone()) continue;
|
if(!data.isUnlocked(item) && world.isZone()) continue;
|
||||||
|
|
||||||
ImageButton button = cont.addImageButton("white", "clear-toggle", 24, () -> control.input().frag.config.hideConfig()).group(group).get();
|
ImageButton button = cont.addImageButton("whiteui", "clear-toggle", 24, () -> control.input().frag.config.hideConfig()).group(group).get();
|
||||||
button.changed(() -> consumer.accept(button.isChecked() ? item : null));
|
button.changed(() -> consumer.accept(button.isChecked() ? item : null));
|
||||||
button.getStyle().imageUp = new TextureRegionDrawable(item.icon(Icon.medium));
|
button.getStyle().imageUp = new TextureRegionDrawable(item.icon(Icon.medium));
|
||||||
button.update(() -> button.setChecked(holder.get() == item));
|
button.update(() -> button.setChecked(holder.get() == item));
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
|
|
||||||
for(int i = 0; i < entity.power.links.size; i++){
|
for(int i = 0; i < entity.power.links.size; i++){
|
||||||
Tile link = world.tile(entity.power.links.get(i));
|
Tile link = world.tile(entity.power.links.get(i));
|
||||||
if(link != null && (link.pos() < tile.pos() || !Core.camera.bounds(Tmp.r1).contains(tile.drawx(), tile.drawy()))){
|
if(link != null && (link.pos() < tile.pos() || !(link.block() instanceof PowerNode) || !Core.camera.bounds(Tmp.r1).contains(link.drawx(), link.drawy()))){
|
||||||
drawLaser(tile, link);
|
drawLaser(tile, link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -257,13 +257,8 @@ public class PowerNode extends PowerBlock{
|
|||||||
y2 -= t1.y;
|
y2 -= t1.y;
|
||||||
|
|
||||||
Draw.color(Pal.powerLight, Color.WHITE, Mathf.absin(Time.time(), 8f, 0.3f) + 0.2f);
|
Draw.color(Pal.powerLight, Color.WHITE, Mathf.absin(Time.time(), 8f, 0.3f) + 0.2f);
|
||||||
//Lines.stroke(2f);
|
Shapes.laser(laser, laserEnd, x1, y1, x2, y2, 0.6f);
|
||||||
//Lines.line(x1, y1, x2, y2);
|
Draw.color();
|
||||||
Lines.stroke(1f);
|
|
||||||
Lines.line(x1, y1, x2, y2);
|
|
||||||
Draw.reset();
|
|
||||||
|
|
||||||
//Shapes.laser(laser, laserEnd, x1, y1, x2, y2, 0.6f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,7 +300,16 @@ task pack(dependsOn: classes){
|
|||||||
workingDir = "../core/assets-raw/sprites_out/ui/icons"
|
workingDir = "../core/assets-raw/sprites_out/ui/icons"
|
||||||
}
|
}
|
||||||
|
|
||||||
//antialias everything except UI elements (...for some reason)
|
copy{
|
||||||
|
from "../core/assets-raw/sprites_out/ui/icons"
|
||||||
|
into "../core/assets-raw/sprites_out/ui/"
|
||||||
|
}
|
||||||
|
|
||||||
|
delete{
|
||||||
|
delete "../core/assets-raw/sprites_out/ui/icons"
|
||||||
|
}
|
||||||
|
|
||||||
|
//antialias everything except UI elements
|
||||||
fileTree(dir: '../core/assets-raw/sprites_out/', include: "**/*.png").visit{ file ->
|
fileTree(dir: '../core/assets-raw/sprites_out/', include: "**/*.png").visit{ file ->
|
||||||
if(file.isDirectory() || (file.toString().replace("\\", "/").contains("/ui/"))) return
|
if(file.isDirectory() || (file.toString().replace("\\", "/").contains("/ui/"))) return
|
||||||
|
|
||||||
@@ -309,21 +318,6 @@ task pack(dependsOn: classes){
|
|||||||
|
|
||||||
//pack normal sprites
|
//pack normal sprites
|
||||||
TexturePacker.process("core/assets-raw/sprites_out/", "core/assets/sprites/", "sprites.atlas")
|
TexturePacker.process("core/assets-raw/sprites_out/", "core/assets/sprites/", "sprites.atlas")
|
||||||
|
|
||||||
//delete old pack defintions
|
|
||||||
delete{
|
|
||||||
delete fileTree(dir: '../core/assets-raw/sprites_out/', include: '**/pack.json')
|
|
||||||
}
|
|
||||||
|
|
||||||
//rename pack definitions, generate fallback 1024x sprites
|
|
||||||
copy{
|
|
||||||
from '../core/assets-raw/sprites_out/'
|
|
||||||
into '../core/assets-raw/sprites_out/'
|
|
||||||
include '**/*.json'
|
|
||||||
rename 'pack_fallback.json', "pack.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
TexturePacker.process("core/assets-raw/sprites_out/", "core/assets/sprites/", "sprites_fallback.atlas")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||