Deprecated Draw.color(String), switched to type-safe usage
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
package io.anuke.mindustry.ui;
|
||||
|
||||
import com.badlogic.gdx.graphics.Colors;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.Batch;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Lines;
|
||||
import io.anuke.ucore.scene.ui.Image;
|
||||
@@ -36,7 +35,7 @@ public class BorderImage extends Image{
|
||||
float scaleX = getScaleX();
|
||||
float scaleY = getScaleY();
|
||||
|
||||
Draw.color(Colors.get("accent"));
|
||||
Draw.color(Palette.accent);
|
||||
Lines.stroke(Unit.dp.scl(thickness));
|
||||
Lines.rect(x + imageX, y + imageY, imageWidth * scaleX, imageHeight * scaleY);
|
||||
Draw.reset();
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import com.badlogic.gdx.Input.Keys;
|
||||
import com.badlogic.gdx.graphics.Colors;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.ucore.scene.ui.Image;
|
||||
import io.anuke.ucore.scene.ui.KeybindDialog;
|
||||
|
||||
@@ -16,7 +15,7 @@ public class ControlsDialog extends KeybindDialog{
|
||||
title().setAlignment(Align.center);
|
||||
getTitleTable().row();
|
||||
getTitleTable().add(new Image("white"))
|
||||
.growX().height(3f).pad(4f).get().setColor(Colors.get("accent"));
|
||||
.growX().height(3f).pad(4f).get().setColor(Palette.accent);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,7 +2,7 @@ package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.Colors;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.ucore.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("$text.discord").color(Colors.get("accent")).growX().padLeft(10f);
|
||||
t.add("$text.discord").color(Palette.accent).growX().padLeft(10f);
|
||||
}).size(470f, h).pad(10f);
|
||||
|
||||
buttons().defaults().size(170f, 50);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import com.badlogic.gdx.Input.Keys;
|
||||
import com.badlogic.gdx.graphics.Colors;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.ucore.scene.ui.Dialog;
|
||||
|
||||
public class FloatingDialog extends Dialog{
|
||||
@@ -12,7 +12,7 @@ public class FloatingDialog extends Dialog{
|
||||
setFillParent(true);
|
||||
title().setAlignment(Align.center);
|
||||
getTitleTable().row();
|
||||
getTitleTable().addImage("white", Colors.get("accent"))
|
||||
getTitleTable().addImage("white", Palette.accent)
|
||||
.growX().height(3f).pad(4f);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input.Keys;
|
||||
import com.badlogic.gdx.graphics.Colors;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.ucore.core.Core;
|
||||
import io.anuke.ucore.core.Settings;
|
||||
@@ -57,7 +57,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
title().setAlignment(Align.center);
|
||||
getTitleTable().row();
|
||||
getTitleTable().add(new Image("white"))
|
||||
.growX().height(3f).pad(4f).get().setColor(Colors.get("accent"));
|
||||
.growX().height(3f).pad(4f).get().setColor(Palette.accent);
|
||||
|
||||
content().clearChildren();
|
||||
content().remove();
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package io.anuke.mindustry.ui.fragments;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.Colors;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.math.Interpolation;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.IntSet;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.input.InputHandler;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.mindustry.type.ItemStack;
|
||||
@@ -298,7 +298,7 @@ public class BlocksFragment implements Fragment{
|
||||
int current = stack.amount;
|
||||
String text = Mathf.clamp(current, 0, stack.amount) + "/" + stack.amount;
|
||||
|
||||
reqlabel.setColor(current < stack.amount ? Colors.get("missingitems") : Color.WHITE);
|
||||
reqlabel.setColor(current < stack.amount ? Palette.missingitems : Color.WHITE);
|
||||
|
||||
reqlabel.setText(text);
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.anuke.mindustry.ui.fragments;
|
||||
|
||||
import com.badlogic.gdx.graphics.Colors;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.ucore.scene.Group;
|
||||
import io.anuke.ucore.scene.builders.label;
|
||||
import io.anuke.ucore.scene.builders.table;
|
||||
@@ -17,14 +17,14 @@ public class LoadingFragment implements Fragment {
|
||||
table = new table("loadDim"){{
|
||||
touchable(Touchable.enabled);
|
||||
get().addImage("white").growX()
|
||||
.height(3f).pad(4f).growX().get().setColor(Colors.get("accent"));
|
||||
.height(3f).pad(4f).growX().get().setColor(Palette.accent);
|
||||
row();
|
||||
new label("$text.loading"){{
|
||||
get().setName("namelabel");
|
||||
}}.pad(10);
|
||||
row();
|
||||
get().addImage("white").growX()
|
||||
.height(3f).pad(4f).growX().get().setColor(Colors.get("accent"));
|
||||
.height(3f).pad(4f).growX().get().setColor(Palette.accent);
|
||||
}}.end().get();
|
||||
|
||||
table.setVisible(false);
|
||||
|
||||
Reference in New Issue
Block a user