Balancing / Renamed palettes file

This commit is contained in:
Anuken
2019-02-07 15:33:56 -05:00
parent 7b90044544
commit 7e35de3c33
55 changed files with 272 additions and 271 deletions

View File

@@ -2,7 +2,7 @@ package io.anuke.mindustry.ui;
import io.anuke.arc.graphics.Texture;
import io.anuke.arc.graphics.g2d.TextureRegion;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.arc.graphics.g2d.Draw;
import io.anuke.arc.graphics.g2d.Lines;
import io.anuke.arc.scene.ui.Image;
@@ -36,7 +36,7 @@ public class BorderImage extends Image{
float scaleX = getScaleX();
float scaleY = getScaleY();
Draw.color(Palette.accent);
Draw.color(Pal.accent);
Lines.stroke(Unit.dp.scl(thickness));
Lines.rect(x + imageX, y + imageY, imageWidth * scaleX, imageHeight * scaleY);
Draw.reset();

View File

@@ -6,7 +6,7 @@ import io.anuke.arc.graphics.Color;
import io.anuke.arc.scene.ui.layout.Table;
import io.anuke.arc.util.Strings;
import io.anuke.mindustry.type.UnitType;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.Liquid;
import io.anuke.mindustry.type.Mech;
@@ -49,7 +49,7 @@ public class ContentDisplay{
if(map.size == 0) continue;
table.add("$category." + cat.name()).color(Palette.accent).fillX();
table.add("$category." + cat.name()).color(Pal.accent).fillX();
table.row();
for(BlockStat stat : map.keys()){

View File

@@ -1,6 +1,7 @@
package io.anuke.mindustry.ui;
import io.anuke.arc.collection.ObjectIntMap;
import io.anuke.arc.graphics.Color;
import io.anuke.arc.scene.ui.layout.Table;
import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.ItemType;
@@ -29,7 +30,7 @@ public class ItemsDisplay extends Table{
if(item.type == ItemType.material && data.isUnlocked(item)){
t.label(() -> format.format(items.get(item, 0))).left();
t.addImage(item.region).size(8*3).padLeft(4).padRight(4);
t.add("[LIGHT_GRAY]" + item.localizedName()).left();
t.add(item.localizedName()).color(Color.LIGHT_GRAY).left();
t.row();
}
}

View File

@@ -4,7 +4,7 @@ import io.anuke.arc.Core;
import io.anuke.arc.graphics.Color;
import io.anuke.arc.collection.Array;
import io.anuke.arc.collection.ObjectSet;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.io.Contributors;
import io.anuke.mindustry.io.Contributors.Contributor;
import io.anuke.mindustry.ui.Links;
@@ -103,7 +103,7 @@ public class AboutDialog extends FloatingDialog{
dialog.cont.add("$credits.text");
dialog.cont.row();
if(!contributors.isEmpty()){
dialog.cont.addImage("blank").color(Palette.accent).fillX().height(3f).pad(3f);
dialog.cont.addImage("blank").color(Pal.accent).fillX().height(3f).pad(3f);
dialog.cont.row();
dialog.cont.add("$contributors");
dialog.cont.row();

View File

@@ -5,7 +5,7 @@ import io.anuke.arc.input.KeyCode;
import io.anuke.arc.scene.ui.Image;
import io.anuke.arc.scene.ui.KeybindDialog;
import io.anuke.arc.util.Align;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
public class ControlsDialog extends KeybindDialog{
@@ -16,7 +16,7 @@ public class ControlsDialog extends KeybindDialog{
title.setAlignment(Align.center);
titleTable.row();
titleTable.add(new Image("white"))
.growX().height(3f).pad(4f).get().setColor(Palette.accent);
.growX().height(3f).pad(4f).get().setColor(Pal.accent);
}
@Override

View File

@@ -4,7 +4,7 @@ import io.anuke.arc.collection.Array;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.game.Content;
import io.anuke.mindustry.game.UnlockableContent;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.type.ContentType;
import io.anuke.arc.scene.event.HandCursorListener;
import io.anuke.arc.scene.ui.Image;
@@ -41,9 +41,9 @@ public class DatabaseDialog extends FloatingDialog{
Array<Content> array = allContent[j].select(c -> c instanceof UnlockableContent && !((UnlockableContent)c).isHidden());
if(array.size == 0) continue;
table.add("$content." + type.name() + ".name").growX().left().color(Palette.accent);
table.add("$content." + type.name() + ".name").growX().left().color(Pal.accent);
table.row();
table.addImage("white").growX().pad(5).padLeft(0).padRight(0).height(3).color(Palette.accent);
table.addImage("white").growX().pad(5).padLeft(0).padRight(0).height(3).color(Pal.accent);
table.row();
table.table(list -> {
list.left();

View File

@@ -13,7 +13,7 @@ import io.anuke.arc.util.Structs;
import io.anuke.mindustry.content.Zones;
import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.game.Saves.SaveSlot;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.io.SaveIO.SaveException;
import io.anuke.mindustry.type.ItemStack;
import io.anuke.mindustry.type.Zone;
@@ -251,7 +251,7 @@ public class DeployDialog extends FloatingDialog{
for(ZoneNode node : nodes){
for(ZoneNode child : node.children){
Lines.stroke(3f, node.zone.locked() || child.zone.locked() ? Palette.locked : Palette.accent);
Lines.stroke(3f, node.zone.locked() || child.zone.locked() ? Pal.locked : Pal.accent);
Lines.line(node.x + offsetX, node.y + offsetY, child.x + offsetX, child.y + offsetY);
}
}

View File

@@ -2,7 +2,7 @@ package io.anuke.mindustry.ui.dialogs;
import io.anuke.arc.Core;
import io.anuke.arc.graphics.Color;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.arc.scene.ui.Dialog;
import static io.anuke.mindustry.Vars.discordURL;
@@ -33,7 +33,7 @@ public class DiscordDialog extends Dialog{
i.addImage("icon-discord").size(14 * 3);
}).size(h).left();
t.add("$discord").color(Palette.accent).growX().padLeft(10f);
t.add("$discord").color(Pal.accent).growX().padLeft(10f);
}).size(470f, h).pad(10f);
buttons.defaults().size(170f, 50);

View File

@@ -5,7 +5,7 @@ import io.anuke.arc.input.KeyCode;
import io.anuke.arc.util.Align;
import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.game.EventType.ResizeEvent;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.net.Net;
import io.anuke.arc.Events;
import io.anuke.arc.scene.ui.Dialog;
@@ -22,7 +22,7 @@ public class FloatingDialog extends Dialog{
setFillParent(true);
this.title.setAlignment(Align.center);
titleTable.row();
titleTable.addImage("white", Palette.accent)
titleTable.addImage("white", Pal.accent)
.growX().height(3f).pad(4f);
hidden(() -> {

View File

@@ -14,7 +14,7 @@ import io.anuke.arc.scene.ui.layout.Table;
import io.anuke.arc.util.Align;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.net.Net;
import static io.anuke.mindustry.Vars.*;
@@ -49,7 +49,7 @@ public class SettingsMenuDialog extends SettingsDialog{
title.setAlignment(Align.center);
titleTable.row();
titleTable.add(new Image("white"))
.growX().height(3f).pad(4f).get().setColor(Palette.accent);
.growX().height(3f).pad(4f).get().setColor(Pal.accent);
cont.clearChildren();
cont.remove();

View File

@@ -18,7 +18,7 @@ import io.anuke.arc.util.Log;
import io.anuke.arc.util.Structs;
import io.anuke.mindustry.content.TechTree;
import io.anuke.mindustry.content.TechTree.TechNode;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.type.ItemStack;
import io.anuke.mindustry.ui.ItemsDisplay;
import io.anuke.mindustry.ui.TreeLayout;
@@ -254,7 +254,7 @@ public class TechTreeDialog extends FloatingDialog{
for(TechTreeNode node : nodes){
for(TechTreeNode child : node.children){
Lines.stroke(3f, locked(node.node) || locked(child.node) ? Palette.locked : Palette.accent);
Lines.stroke(3f, locked(node.node) || locked(child.node) ? Pal.locked : Pal.accent);
Lines.line(node.x + offsetX, node.y + offsetY, child.x + offsetX, child.y + offsetY);
}

View File

@@ -23,7 +23,7 @@ import io.anuke.mindustry.game.EventType.StateChangeEvent;
import io.anuke.mindustry.game.Team;
import io.anuke.mindustry.game.UnlockableContent;
import io.anuke.mindustry.gen.Call;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.input.Binding;
import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.net.Packets.AdminAction;
@@ -97,11 +97,11 @@ public class HudFragment extends Fragment{
}
}).get();
select.addImage("blank").color(Palette.accent).width(6f).fillY();
select.addImage("blank").color(Pal.accent).width(6f).fillY();
});
cont.row();
cont.addImage("blank").height(6f).color(Palette.accent).fillX();
cont.addImage("blank").height(6f).color(Pal.accent).fillX();
cont.row();
}
@@ -237,7 +237,7 @@ public class HudFragment extends Fragment{
button.setText(Core.bundle.get(state.enemies() > 0 ? "launch.unable" : "launch") + "\n" +
Core.bundle.format("launch.next", state.wave + world.getZone().launchPeriod));
button.getLabel().setColor(Tmp.c1.set(Color.WHITE).lerp(state.enemies() > 0 ? Color.WHITE : Palette.accent,
button.getLabel().setColor(Tmp.c1.set(Color.WHITE).lerp(state.enemies() > 0 ? Color.WHITE : Pal.accent,
Mathf.absin(Time.time(), 7f, 1f)));
});

View File

@@ -1,6 +1,6 @@
package io.anuke.mindustry.ui.fragments;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.arc.scene.Group;
import io.anuke.arc.scene.event.Touchable;
import io.anuke.arc.scene.ui.Label;
@@ -18,11 +18,11 @@ public class LoadingFragment extends Fragment{
t.touchable(Touchable.enabled);
t.add().height(70f).row();
t.addImage("white").growX().height(3f).pad(4f).growX().get().setColor(Palette.accent);
t.addImage("white").growX().height(3f).pad(4f).growX().get().setColor(Pal.accent);
t.row();
t.add("$loading").name("namelabel").pad(10f);
t.row();
t.addImage("white").growX().height(3f).pad(4f).growX().get().setColor(Palette.accent);
t.addImage("white").growX().height(3f).pad(4f).growX().get().setColor(Pal.accent);
t.row();
button = t.addButton("$cancel", () -> {}).pad(20).size(250f, 70f).visible(false).get();

View File

@@ -18,7 +18,7 @@ import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.entities.type.TileEntity;
import io.anuke.mindustry.game.EventType.UnlockEvent;
import io.anuke.mindustry.game.EventType.WorldLoadEvent;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.input.Binding;
import io.anuke.mindustry.input.InputHandler;
import io.anuke.mindustry.type.Category;
@@ -243,7 +243,7 @@ public class PlacementFragment extends Fragment{
});
}).colspan(3).fillX().visible(() -> getSelected() != null || tileDisplayBlock() != null).touchable(Touchable.enabled);
frame.row();
frame.addImage("blank").color(Palette.accent).colspan(3).height(3).growX();
frame.addImage("blank").color(Pal.accent).colspan(3).height(3).growX();
frame.row();
frame.table("pane-2", blocksSelect -> {
blocksSelect.margin(4).marginTop(0);

View File

@@ -11,7 +11,7 @@ import io.anuke.arc.scene.ui.layout.Unit;
import io.anuke.arc.util.Interval;
import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.gen.Call;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.net.NetConnection;
import io.anuke.mindustry.net.Packets.AdminAction;
@@ -82,7 +82,7 @@ public class PlayerListFragment extends Fragment{
@Override
public void draw(){
super.draw();
Draw.color(Palette.accent);
Draw.color(Pal.accent);
Draw.alpha(parentAlpha);
Lines.stroke(Unit.dp.scl(3f));
Lines.rect(x, y, width, height);
@@ -136,7 +136,7 @@ public class PlayerListFragment extends Fragment{
content.add(button).padBottom(-6).width(350f).maxHeight(h + 14);
content.row();
content.addImage("blank").height(3f).color(state.rules.pvp ? player.getTeam().color : Palette.accent).growX();
content.addImage("blank").height(3f).color(state.rules.pvp ? player.getTeam().color : Pal.accent).growX();
content.row();
});