Deprecated Draw.color(String), switched to type-safe usage
This commit is contained in:
@@ -106,7 +106,7 @@ public class OverlayRenderer {
|
||||
}
|
||||
|
||||
if (Inputs.keyDown("block_info") && target.block().isAccessible()) {
|
||||
Draw.color(Colors.get("accent"));
|
||||
Draw.color(Palette.accent);
|
||||
Lines.crect(target.drawx(), target.drawy(), target.block().size * tilesize, target.block().size * tilesize);
|
||||
Draw.color();
|
||||
}
|
||||
@@ -138,14 +138,14 @@ public class OverlayRenderer {
|
||||
Vector2 v = Graphics.world(input.getMouseX(), input.getMouseY());
|
||||
float size = 8;
|
||||
Draw.rect(player.inventory.getItem().item.region, v.x, v.y, size, size);
|
||||
Draw.color("accent");
|
||||
Draw.color(Palette.accent);
|
||||
Lines.circle(v.x, v.y, 6 + Mathf.absin(Timers.time(), 5f, 1f));
|
||||
Draw.reset();
|
||||
|
||||
Tile tile = world.tileWorld(v.x, v.y);
|
||||
if (tile != null) tile = tile.target();
|
||||
if (tile != null && tile.block().acceptStack(player.inventory.getItem().item, player.inventory.getItem().amount, tile, player) > 0) {
|
||||
Draw.color("place");
|
||||
Draw.color(Palette.place);
|
||||
Lines.square(tile.drawx(), tile.drawy(), tile.block().size * tilesize / 2f + 1 + Mathf.absin(Timers.time(), 5f, 1f));
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
@@ -24,4 +24,26 @@ public class Palette {
|
||||
public static final Color portalLight = Color.valueOf("9054ea");
|
||||
public static final Color portal = Color.valueOf("6344d7");
|
||||
public static final Color portalDark = Color.valueOf("3f3dac");
|
||||
|
||||
public static final Color powerLaserFrom = Color.valueOf("e3e3e3");
|
||||
public static final Color powerLaserTo = Color.valueOf("ffe7a8");
|
||||
|
||||
public static final Color description = Color.WHITE;
|
||||
public static final Color turretinfo = Color.ORANGE;
|
||||
public static final Color iteminfo = Color.LIGHT_GRAY;
|
||||
public static final Color powerinfo = Color.YELLOW;
|
||||
public static final Color liquidinfo = Color.ROYAL;
|
||||
public static final Color craftinfo = Color.LIGHT_GRAY;
|
||||
|
||||
public static final Color missingitems = Color.SCARLET;
|
||||
public static final Color health = Color.YELLOW;
|
||||
public static final Color healthstats = Color.SCARLET;
|
||||
public static final Color interact = Color.ORANGE;
|
||||
public static final Color accent = Color.valueOf("f4ba6e");
|
||||
public static final Color place = Color.valueOf("6335f8");
|
||||
public static final Color remove = Color.valueOf("e55454");
|
||||
public static final Color placeRotate = Color.ORANGE;
|
||||
public static final Color breakInvalid = Color.SCARLET;
|
||||
public static final Color range = Color.valueOf("f4ba6e");
|
||||
public static final Color power = Color.valueOf("fbd367");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user