cleaning up what remains
This commit is contained in:
@@ -334,7 +334,7 @@ public class UI implements ApplicationListener, Loadable{
|
||||
|
||||
Collapser col = new Collapser(base -> base.pane(t -> t.margin(14f).add(Strings.parseException(exc, true)).color(Color.LIGHT_GRAY).left()), true);
|
||||
|
||||
cont.addButton("$details", Style.toggleTbutton, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().right();
|
||||
cont.addButton("$details", Styles.togglet, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().right();
|
||||
cont.addButton("$ok", this::hide).size(100, 50).fillX().left();
|
||||
cont.row();
|
||||
cont.add(col).colspan(2).pad(2);
|
||||
|
||||
@@ -23,7 +23,7 @@ import io.anuke.mindustry.gen.*;
|
||||
import io.anuke.mindustry.graphics.*;
|
||||
import io.anuke.mindustry.io.*;
|
||||
import io.anuke.mindustry.maps.*;
|
||||
import io.anuke.mindustry.ui.Style;
|
||||
import io.anuke.mindustry.ui.Styles;
|
||||
import io.anuke.mindustry.ui.dialogs.*;
|
||||
import io.anuke.mindustry.world.*;
|
||||
import io.anuke.mindustry.world.blocks.*;
|
||||
@@ -49,7 +49,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
public MapEditorDialog(){
|
||||
super("");
|
||||
|
||||
background(Style.dark);
|
||||
background(Styles.black);
|
||||
|
||||
editor = new MapEditor();
|
||||
view = new MapView(editor);
|
||||
@@ -398,7 +398,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
|
||||
Consumer<EditorTool> addTool = tool -> {
|
||||
|
||||
ImageButton button = new ImageButton(Core.atlas.drawable("icon-" + tool.name() + "-small"), Style.clearToggleIbutton);
|
||||
ImageButton button = new ImageButton(Core.atlas.drawable("icon-" + tool.name() + "-small"), Styles.clearTogglei);
|
||||
button.clicked(() -> {
|
||||
view.setTool(tool);
|
||||
if(lastTable[0] != null){
|
||||
@@ -424,7 +424,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
lastTable[0].remove();
|
||||
}
|
||||
|
||||
Table table = new Table(Style.dialogDim);
|
||||
Table table = new Table(Styles.black9);
|
||||
table.defaults().size(300f, 70f);
|
||||
|
||||
for(int i = 0; i < tool.altModes.length; i++){
|
||||
@@ -434,7 +434,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
table.addButton(b -> {
|
||||
b.left();
|
||||
b.marginLeft(6);
|
||||
b.setStyle(Style.clearToggleTbutton);
|
||||
b.setStyle(Styles.clearTogglet);
|
||||
b.add(Core.bundle.get("toolmode." + name)).left();
|
||||
b.row();
|
||||
b.add(Core.bundle.get("toolmode." + name + ".description")).color(Color.LIGHT_GRAY).left();
|
||||
@@ -474,16 +474,16 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
|
||||
tools.defaults().size(size, size);
|
||||
|
||||
tools.addImageButton(Icon.menuLargeSmall, Style.clearIbutton, menu::show);
|
||||
tools.addImageButton(Icon.menuLargeSmall, Styles.cleari, menu::show);
|
||||
|
||||
ImageButton grid = tools.addImageButton(Icon.gridSmall, Style.clearToggleIbutton, () -> view.setGrid(!view.isGrid())).get();
|
||||
ImageButton grid = tools.addImageButton(Icon.gridSmall, Styles.clearTogglei, () -> view.setGrid(!view.isGrid())).get();
|
||||
|
||||
addTool.accept(EditorTool.zoom);
|
||||
|
||||
tools.row();
|
||||
|
||||
ImageButton undo = tools.addImageButton(Icon.undoSmall, Style.clearIbutton, editor::undo).get();
|
||||
ImageButton redo = tools.addImageButton(Icon.redoSmall, Style.clearIbutton, editor::redo).get();
|
||||
ImageButton undo = tools.addImageButton(Icon.undoSmall, Styles.cleari, editor::undo).get();
|
||||
ImageButton redo = tools.addImageButton(Icon.redoSmall, Styles.cleari, editor::redo).get();
|
||||
|
||||
addTool.accept(EditorTool.pick);
|
||||
|
||||
@@ -505,7 +505,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
addTool.accept(EditorTool.fill);
|
||||
addTool.accept(EditorTool.spray);
|
||||
|
||||
ImageButton rotate = tools.addImageButton(Icon.arrow16Small, Style.clearIbutton, () -> editor.rotation = (editor.rotation + 1) % 4).get();
|
||||
ImageButton rotate = tools.addImageButton(Icon.arrow16Small, Styles.cleari, () -> editor.rotation = (editor.rotation + 1) % 4).get();
|
||||
rotate.getImage().update(() -> {
|
||||
rotate.getImage().setRotation(editor.rotation * 90);
|
||||
rotate.getImage().setOrigin(Align.center);
|
||||
@@ -523,7 +523,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
int i = 0;
|
||||
|
||||
for(Team team : Team.all){
|
||||
ImageButton button = new ImageButton(Tex.whiteui, Style.clearTogglePartialIbutton);
|
||||
ImageButton button = new ImageButton(Tex.whiteui, Styles.clearTogglePartiali);
|
||||
button.margin(4f);
|
||||
button.getImageCell().grow();
|
||||
button.getStyle().imageUpColor = team.color;
|
||||
@@ -675,7 +675,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
|
||||
if(!Core.atlas.isFound(region)) continue;
|
||||
|
||||
ImageButton button = new ImageButton(Tex.whiteui, Style.clearToggleIbutton);
|
||||
ImageButton button = new ImageButton(Tex.whiteui, Styles.clearTogglei);
|
||||
button.getStyle().imageUp = new TextureRegionDrawable(region);
|
||||
button.clicked(() -> editor.drawBlock = block);
|
||||
button.resizeImage(8 * 4f);
|
||||
|
||||
@@ -178,7 +178,7 @@ public class MapGenerateDialog extends FloatingDialog{
|
||||
}
|
||||
}
|
||||
}, new Stack(){{
|
||||
add(new Image(Style.loadDim));
|
||||
add(new Image(Styles.black8));
|
||||
add(new Image(Icon.refresh, Scaling.none));
|
||||
visible(() -> generating && !updateEditorOnChange);
|
||||
}}).grow().padRight(10);
|
||||
@@ -233,7 +233,7 @@ public class MapGenerateDialog extends FloatingDialog{
|
||||
t.row();
|
||||
|
||||
t.table(b -> {
|
||||
ImageButtonStyle style = Style.clearIbutton;
|
||||
ImageButtonStyle style = Styles.cleari;
|
||||
b.defaults().size(50f);
|
||||
b.addImageButton(Icon.refreshSmall, style, () -> {
|
||||
filter.randomize();
|
||||
|
||||
@@ -43,7 +43,7 @@ public class MapInfoDialog extends FloatingDialog{
|
||||
t.row();
|
||||
t.add("$editor.description").padRight(8).left();
|
||||
|
||||
TextArea description = t.addArea(tags.get("description", ""), Style.textareaField, text -> {
|
||||
TextArea description = t.addArea(tags.get("description", ""), Styles.areaField, text -> {
|
||||
tags.put("description", text);
|
||||
}).size(400f, 140f).get();
|
||||
|
||||
|
||||
@@ -48,12 +48,12 @@ public class MapLoadDialog extends FloatingDialog{
|
||||
table.defaults().size(200f, 90f).pad(4f);
|
||||
table.margin(10f);
|
||||
|
||||
ScrollPane pane = new ScrollPane(table, Style.horizontalPane);
|
||||
ScrollPane pane = new ScrollPane(table, Styles.horizontalPane);
|
||||
pane.setFadeScrollBars(false);
|
||||
|
||||
for(Map map : maps.all()){
|
||||
|
||||
TextButton button = new TextButton(map.name(), Style.toggleTbutton);
|
||||
TextButton button = new TextButton(map.name(), Styles.togglet);
|
||||
button.add(new BorderImage(map.texture, 2f).setScaling(Scaling.fit)).size(16 * 4f);
|
||||
button.getCells().reverse();
|
||||
button.clicked(() -> selected = map);
|
||||
|
||||
@@ -255,23 +255,23 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
table.row();
|
||||
table.left().margin(0f).defaults().size(48f);
|
||||
|
||||
table.addImageButton(Icon.breakSmall, Style.clearTogglePartialIbutton, () -> {
|
||||
table.addImageButton(Icon.breakSmall, Styles.clearTogglePartiali, () -> {
|
||||
mode = mode == breaking ? block == null ? none : placing : breaking;
|
||||
lastBlock = block;
|
||||
}).update(l -> l.setChecked(mode == breaking)).name("breakmode");
|
||||
|
||||
//diagonal swap button
|
||||
table.addImageButton(Icon.diagonalSmall, Style.clearTogglePartialIbutton, () -> {
|
||||
table.addImageButton(Icon.diagonalSmall, Styles.clearTogglePartiali, () -> {
|
||||
Core.settings.put("swapdiagonal", !Core.settings.getBool("swapdiagonal"));
|
||||
Core.settings.save();
|
||||
}).update(l -> l.setChecked(Core.settings.getBool("swapdiagonal")));
|
||||
|
||||
//rotate button
|
||||
table.addImageButton(Icon.arrowSmall, Style.clearPartialIbutton,() -> rotation = Mathf.mod(rotation + 1, 4))
|
||||
table.addImageButton(Icon.arrowSmall, Styles.clearPartiali,() -> rotation = Mathf.mod(rotation + 1, 4))
|
||||
.update(i -> i.getImage().setRotationOrigin(rotation * 90, Align.center)).visible(() -> block != null && block.rotate);
|
||||
|
||||
//confirm button
|
||||
table.addImageButton(Icon.checkSmall, Style.clearPartialIbutton, () -> {
|
||||
table.addImageButton(Icon.checkSmall, Styles.clearPartiali, () -> {
|
||||
for(PlaceRequest request : selection){
|
||||
Tile tile = request.tile();
|
||||
|
||||
|
||||
@@ -22,45 +22,32 @@ import io.anuke.mindustry.graphics.*;
|
||||
import static io.anuke.mindustry.gen.Tex.*;
|
||||
|
||||
@StyleDefaults
|
||||
public class Style{
|
||||
public static Drawable
|
||||
dialogDim = whiteui.tint(0f, 0f, 0f, 0.9f),
|
||||
loadDim = whiteui.tint(0f, 0f, 0f, 0.8f),
|
||||
guideDim = whiteui.tint(0f, 0f, 0f, 0.3f),
|
||||
chatfield = whiteui.tint(0f, 0f, 0f, 0.2f),
|
||||
dark = whiteui.tint(0f, 0f, 0f, 1f),
|
||||
none = whiteui.tint(0f, 0f, 0f, 0.1f),
|
||||
flatTrans = whiteui.tint(0f, 0f, 0f, 0.6f),
|
||||
flat = whiteui.tint(0f, 0f, 0f, 1f),
|
||||
public class Styles{
|
||||
public static Drawable
|
||||
black = whiteui.tint(0f, 0f, 0f, 1f),
|
||||
black9 = whiteui.tint(0f, 0f, 0f, 0.9f),
|
||||
black8 = whiteui.tint(0f, 0f, 0f, 0.8f),
|
||||
black6 = whiteui.tint(0f, 0f, 0f, 0.6f),
|
||||
black3 = whiteui.tint(0f, 0f, 0f, 0.3f),
|
||||
none = whiteui.tint(0f, 0f, 0f, 0f),
|
||||
flatDown = createFlatDown(),
|
||||
flatOver = whiteui.tint(Color.valueOf("454545"));
|
||||
|
||||
public static ButtonStyle
|
||||
defaultButton = new ButtonStyle(){{
|
||||
defaultb = new ButtonStyle(){{
|
||||
down = buttonDown;
|
||||
up = button;
|
||||
over = buttonOver;
|
||||
disabled = buttonDisabled;
|
||||
}},
|
||||
squareButton = new ButtonStyle(){{
|
||||
over = buttonSquareOver;
|
||||
disabled = buttonDisabled;
|
||||
down = buttonSquareDown;
|
||||
up = buttonSquare;
|
||||
}},
|
||||
toggleButton = new ButtonStyle(){{
|
||||
checked = buttonDown;
|
||||
down = buttonDown;
|
||||
up = button;
|
||||
}},
|
||||
waveButton = new ButtonStyle(){{
|
||||
waveb = new ButtonStyle(){{
|
||||
up = buttonEdge4;
|
||||
over = buttonEdgeOver4;
|
||||
disabled = buttonEdge4;
|
||||
}};
|
||||
|
||||
public static TextButtonStyle
|
||||
defaultTbutton = new TextButtonStyle(){{
|
||||
defaultt = new TextButtonStyle(){{
|
||||
over = buttonOver;
|
||||
disabled = buttonDisabled;
|
||||
font = Fonts.def;
|
||||
@@ -69,7 +56,7 @@ public class Style{
|
||||
down = buttonDown;
|
||||
up = button;
|
||||
}},
|
||||
squareTbutton = new TextButtonStyle(){{
|
||||
squaret = new TextButtonStyle(){{
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
disabledFontColor = Color.GRAY;
|
||||
@@ -78,7 +65,7 @@ public class Style{
|
||||
down = buttonSquareDown;
|
||||
up = buttonSquare;
|
||||
}},
|
||||
nodeTbutton = new TextButtonStyle(){{
|
||||
nodet = new TextButtonStyle(){{
|
||||
disabled = button;
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
@@ -86,39 +73,25 @@ public class Style{
|
||||
up = buttonOver;
|
||||
over = buttonDown;
|
||||
}},
|
||||
rightTbutton = new TextButtonStyle(){{
|
||||
over = buttonRightOver;
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
disabledFontColor = Color.GRAY;
|
||||
down = buttonRightDown;
|
||||
up = buttonRight;
|
||||
}},
|
||||
waveTbutton = new TextButtonStyle(){{
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
disabledFontColor = Color.GRAY;
|
||||
up = buttonEdge4;
|
||||
}},
|
||||
clearTbutton = new TextButtonStyle(){{
|
||||
cleart = new TextButtonStyle(){{
|
||||
over = flatOver;
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
disabledFontColor = Color.GRAY;
|
||||
down = flatOver;
|
||||
up = flat;
|
||||
up = black;
|
||||
}},
|
||||
discordTbutton = new TextButtonStyle(){{
|
||||
discordt = new TextButtonStyle(){{
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
up = discordBanner;
|
||||
}},
|
||||
infoTbutton = new TextButtonStyle(){{
|
||||
infot = new TextButtonStyle(){{
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
up = infoBanner;
|
||||
}},
|
||||
clearPartialTbutton = new TextButtonStyle(){{
|
||||
clearPartialt = new TextButtonStyle(){{
|
||||
down = whiteui;
|
||||
up = pane;
|
||||
over = flatDown;
|
||||
@@ -126,38 +99,27 @@ public class Style{
|
||||
fontColor = Color.WHITE;
|
||||
disabledFontColor = Color.GRAY;
|
||||
}},
|
||||
clearPartial2Tbutton = new TextButtonStyle(){{
|
||||
down = flatOver;
|
||||
up = none;
|
||||
over = flatOver;
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
disabledFontColor = Color.GRAY;
|
||||
}},
|
||||
emptyTbutton = new TextButtonStyle(){{
|
||||
font = Fonts.def;
|
||||
}},
|
||||
clearToggleTbutton = new TextButtonStyle(){{
|
||||
clearTogglet = new TextButtonStyle(){{
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
checked = flatDown;
|
||||
down = flatDown;
|
||||
up = flat;
|
||||
up = black;
|
||||
over = flatOver;
|
||||
disabled = flat;
|
||||
disabled = black;
|
||||
disabledFontColor = Color.GRAY;
|
||||
}},
|
||||
clearToggleMenuTbutton = new TextButtonStyle(){{
|
||||
clearToggleMenut = new TextButtonStyle(){{
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
checked = flatDown;
|
||||
down = flatDown;
|
||||
up = clear;
|
||||
over = flatOver;
|
||||
disabled = flat;
|
||||
disabled = black;
|
||||
disabledFontColor = Color.GRAY;
|
||||
}},
|
||||
toggleTbutton = new TextButtonStyle(){{
|
||||
togglet = new TextButtonStyle(){{
|
||||
font = Fonts.def;
|
||||
fontColor = Color.WHITE;
|
||||
checked = buttonDown;
|
||||
@@ -169,7 +131,7 @@ public class Style{
|
||||
}};
|
||||
|
||||
public static ImageButtonStyle
|
||||
defaultIbutton = new ImageButtonStyle(){{
|
||||
defaulti = new ImageButtonStyle(){{
|
||||
down = buttonDown;
|
||||
up = button;
|
||||
over = buttonOver;
|
||||
@@ -177,74 +139,61 @@ public class Style{
|
||||
imageUpColor = Color.WHITE;
|
||||
disabled = buttonDisabled;
|
||||
}},
|
||||
nodeIbutton = new ImageButtonStyle(){{
|
||||
nodei = new ImageButtonStyle(){{
|
||||
up = buttonOver;
|
||||
over = buttonDown;
|
||||
}},
|
||||
rightIbutton = new ImageButtonStyle(){{
|
||||
righti = new ImageButtonStyle(){{
|
||||
over = buttonRightOver;
|
||||
down = buttonRightDown;
|
||||
up = buttonRight;
|
||||
}},
|
||||
emptyIbutton = new ImageButtonStyle(){{
|
||||
emptyi = new ImageButtonStyle(){{
|
||||
imageDownColor = Pal.accent;
|
||||
imageUpColor = Color.WHITE;
|
||||
}},
|
||||
emptytoggleIbutton = new ImageButtonStyle(){{
|
||||
emptytogglei = new ImageButtonStyle(){{
|
||||
imageCheckedColor = Color.WHITE;
|
||||
imageDownColor = Color.WHITE;
|
||||
imageUpColor = Color.GRAY;
|
||||
}},
|
||||
staticIbutton = new ImageButtonStyle(){{
|
||||
up = button;
|
||||
}},
|
||||
staticDownIbutton = new ImageButtonStyle(){{
|
||||
up = buttonDown;
|
||||
}},
|
||||
toggleIbutton = new ImageButtonStyle(){{
|
||||
checked = buttonDown;
|
||||
down = buttonDown;
|
||||
up = button;
|
||||
imageDisabledColor = Color.GRAY;
|
||||
imageUpColor = Color.WHITE;
|
||||
}},
|
||||
selectIbutton = new ImageButtonStyle(){{
|
||||
selecti = new ImageButtonStyle(){{
|
||||
checked = buttonSelect;
|
||||
up = none;
|
||||
}},
|
||||
clearIbutton = new ImageButtonStyle(){{
|
||||
cleari = new ImageButtonStyle(){{
|
||||
down = flatOver;
|
||||
up = flat;
|
||||
up = black;
|
||||
over = flatOver;
|
||||
}},
|
||||
clearFullIbutton = new ImageButtonStyle(){{
|
||||
clearFulli = new ImageButtonStyle(){{
|
||||
down = whiteui;
|
||||
up = pane;
|
||||
over = flatDown;
|
||||
}},
|
||||
clearPartialIbutton = new ImageButtonStyle(){{
|
||||
clearPartiali = new ImageButtonStyle(){{
|
||||
down = flatDown;
|
||||
up = none;
|
||||
over = flatOver;
|
||||
}},
|
||||
clearToggleIbutton = new ImageButtonStyle(){{
|
||||
clearTogglei = new ImageButtonStyle(){{
|
||||
down = flatDown;
|
||||
checked = flatDown;
|
||||
up = flat;
|
||||
up = black;
|
||||
over = flatOver;
|
||||
}},
|
||||
clearTransIbutton = new ImageButtonStyle(){{
|
||||
clearTransi = new ImageButtonStyle(){{
|
||||
down = flatDown;
|
||||
up = flatTrans;
|
||||
up = black6;
|
||||
over = flatOver;
|
||||
}},
|
||||
clearToggleTransIbutton = new ImageButtonStyle(){{
|
||||
clearToggleTransi = new ImageButtonStyle(){{
|
||||
down = flatDown;
|
||||
checked = flatDown;
|
||||
up = flatTrans;
|
||||
up = black6;
|
||||
over = flatOver;
|
||||
}},
|
||||
clearTogglePartialIbutton = new ImageButtonStyle(){{
|
||||
clearTogglePartiali = new ImageButtonStyle(){{
|
||||
down = flatDown;
|
||||
checked = flatDown;
|
||||
up = none;
|
||||
@@ -271,13 +220,13 @@ public class Style{
|
||||
}};
|
||||
|
||||
public static SliderStyle
|
||||
defaultHorizontalSlider = new SliderStyle(){{
|
||||
defaultSlider = new SliderStyle(){{
|
||||
background = slider;
|
||||
knob = sliderKnob;
|
||||
knobOver = sliderKnobOver;
|
||||
knobDown = sliderKnobDown;
|
||||
}},
|
||||
defaultVerticalSlider = new SliderStyle(){{
|
||||
vSlider = new SliderStyle(){{
|
||||
background = sliderVertical;
|
||||
knob = sliderKnob;
|
||||
knobOver = sliderKnobOver;
|
||||
@@ -307,7 +256,7 @@ public class Style{
|
||||
messageFont = Fonts.def;
|
||||
messageFontColor = Color.GRAY;
|
||||
}},
|
||||
textareaField = new TextFieldStyle(){{
|
||||
areaField = new TextFieldStyle(){{
|
||||
font = Fonts.chat;
|
||||
fontColor = Color.WHITE;
|
||||
disabledFontColor = Color.GRAY;
|
||||
@@ -330,20 +279,19 @@ public class Style{
|
||||
disabledFontColor = Color.GRAY;
|
||||
}};
|
||||
public static DialogStyle
|
||||
defaultWindow = new DialogStyle(){{
|
||||
stageBackground = dialogDim;
|
||||
defaultDialog = new DialogStyle(){{
|
||||
stageBackground = black9;
|
||||
titleFont = Fonts.def;
|
||||
background = windowEmpty;
|
||||
titleFontColor = Pal.accent;
|
||||
}},
|
||||
fulldialogWindow = new DialogStyle(){{
|
||||
stageBackground = dark;
|
||||
fullDialog = new DialogStyle(){{
|
||||
stageBackground = black;
|
||||
titleFont = Fonts.def;
|
||||
background = windowEmpty;
|
||||
titleFontColor = Pal.accent;
|
||||
}};
|
||||
|
||||
|
||||
private static Drawable createFlatDown(){
|
||||
AtlasRegion region = Core.atlas.find("flat-down-base");
|
||||
int[] splits = region.splits;
|
||||
@@ -25,7 +25,7 @@ public class ColorPickDialog extends Dialog{
|
||||
for(int i = 0; i < playerColors.length; i++){
|
||||
Color color = playerColors[i];
|
||||
|
||||
ImageButton button = table.addImageButton(Tex.whiteui, Style.clearToggleIbutton, 34, () -> {
|
||||
ImageButton button = table.addImageButton(Tex.whiteui, Styles.clearTogglei, 34, () -> {
|
||||
cons.accept(color);
|
||||
hide();
|
||||
}).size(48).get();
|
||||
|
||||
@@ -48,7 +48,7 @@ public class CustomGameDialog extends FloatingDialog{
|
||||
maps.row();
|
||||
}
|
||||
|
||||
ImageButton image = new ImageButton(new TextureRegion(map.texture), Style.clearIbutton);
|
||||
ImageButton image = new ImageButton(new TextureRegion(map.texture), Styles.cleari);
|
||||
image.margin(5);
|
||||
image.top();
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import io.anuke.mindustry.io.SaveIO.*;
|
||||
import io.anuke.mindustry.type.*;
|
||||
import io.anuke.mindustry.type.Zone.*;
|
||||
import io.anuke.mindustry.ui.*;
|
||||
import io.anuke.mindustry.ui.Style;
|
||||
import io.anuke.mindustry.ui.Styles;
|
||||
import io.anuke.mindustry.ui.TreeLayout.*;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
@@ -35,7 +35,7 @@ public class DeployDialog extends FloatingDialog{
|
||||
private Rectangle bounds = new Rectangle();
|
||||
|
||||
public DeployDialog(){
|
||||
super("", Style.fulldialogWindow);
|
||||
super("", Styles.fullDialog);
|
||||
|
||||
ZoneNode root = new ZoneNode(Zones.groundZero, null);
|
||||
|
||||
@@ -102,7 +102,7 @@ public class DeployDialog extends FloatingDialog{
|
||||
}).color(Color.DARK_GRAY).grow()));
|
||||
}
|
||||
|
||||
TextButton button = Elements.newButton(Core.bundle.format("resume", slot.getZone().localizedName()), Style.squareTbutton, () -> {
|
||||
TextButton button = Elements.newButton(Core.bundle.format("resume", slot.getZone().localizedName()), Styles.squaret, () -> {
|
||||
hide();
|
||||
ui.loadAnd(() -> {
|
||||
logic.reset();
|
||||
@@ -175,7 +175,7 @@ public class DeployDialog extends FloatingDialog{
|
||||
button.clicked(() -> info.show(zone));
|
||||
|
||||
if(zone.unlocked() && !hidden(zone)){
|
||||
button.labelWrap(zone.localizedName()).style(Style.outlineLabel).width(140).growX().get().setAlignment(Align.center);
|
||||
button.labelWrap(zone.localizedName()).style(Styles.outlineLabel).width(140).growX().get().setAlignment(Align.center);
|
||||
}else{
|
||||
Consumer<Element> flasher = zone.canUnlock() && !hidden(zone) ? e -> e.update(() -> e.getColor().set(Color.WHITE).lerp(Pal.accent, Mathf.absin(3f, 1f))) : e -> {};
|
||||
flasher.accept(button.addImage(Icon.locked).get());
|
||||
|
||||
@@ -193,7 +193,7 @@ public class FileChooser extends FloatingDialog{
|
||||
//macs are confined to the Downloads/ directory
|
||||
if(!OS.isMac){
|
||||
Image upimage = new Image(Icon.folderParentSmall);
|
||||
TextButton upbutton = new TextButton(".." + directory.toString(), Style.clearToggleTbutton);
|
||||
TextButton upbutton = new TextButton(".." + directory.toString(), Styles.clearTogglet);
|
||||
upbutton.clicked(() -> {
|
||||
directory = directory.parent();
|
||||
lastDirectory = directory;
|
||||
@@ -216,7 +216,7 @@ public class FileChooser extends FloatingDialog{
|
||||
|
||||
String filename = file.name();
|
||||
|
||||
TextButton button = new TextButton(shorten(filename), Style.clearToggleTbutton);
|
||||
TextButton button = new TextButton(shorten(filename), Styles.clearTogglet);
|
||||
group.add(button);
|
||||
|
||||
button.clicked(() -> {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class HostDialog extends FloatingDialog{
|
||||
ui.listfrag.rebuild();
|
||||
}).grow().pad(8).get().setMaxLength(40);
|
||||
|
||||
ImageButton button = t.addImageButton(Tex.whiteui, Style.clearFullIbutton, 40, () -> {
|
||||
ImageButton button = t.addImageButton(Tex.whiteui, Styles.clearFulli, 40, () -> {
|
||||
new ColorPickDialog().show(color -> {
|
||||
player.color.set(color);
|
||||
Core.settings.put("color-0", Color.rgba8888(color));
|
||||
|
||||
@@ -99,7 +99,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
//why are java lambdas this bad
|
||||
TextButton[] buttons = {null};
|
||||
|
||||
TextButton button = buttons[0] = remote.addButton("[accent]" + server.displayIP(), Style.clearTbutton, () -> {
|
||||
TextButton button = buttons[0] = remote.addButton("[accent]" + server.displayIP(), Styles.cleart, () -> {
|
||||
if(!buttons[0].childrenPressed()){
|
||||
if(server.lastHost != null && server.lastHost.version != Version.build && Version.build != -1 && server.lastHost.version != -1){
|
||||
ui.showInfo("[scarlet]" + (server.lastHost.version > Version.build ? KickReason.clientOutdated : KickReason.serverOutdated).toString() + "\n[]" +
|
||||
@@ -118,7 +118,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
|
||||
inner.add(button.getLabel()).growX();
|
||||
|
||||
inner.addImageButton(Icon.arrowUpSmall, Style.emptyIbutton, () -> {
|
||||
inner.addImageButton(Icon.arrowUpSmall, Styles.emptyi, () -> {
|
||||
int index = servers.indexOf(server);
|
||||
if(index > 0){
|
||||
servers.remove(index);
|
||||
@@ -137,16 +137,16 @@ public class JoinDialog extends FloatingDialog{
|
||||
|
||||
}).margin(3f).padTop(6f).top().right();
|
||||
|
||||
inner.addImageButton(Icon.loadingSmall, Style.emptyIbutton, () -> {
|
||||
inner.addImageButton(Icon.loadingSmall, Styles.emptyi, () -> {
|
||||
refreshServer(server);
|
||||
}).margin(3f).padTop(6f).top().right();
|
||||
|
||||
inner.addImageButton(Icon.pencilSmall, Style.emptyIbutton, () -> {
|
||||
inner.addImageButton(Icon.pencilSmall, Styles.emptyi, () -> {
|
||||
renaming = server;
|
||||
add.show();
|
||||
}).margin(3f).padTop(6f).top().right();
|
||||
|
||||
inner.addImageButton(Icon.trash16Small, Style.emptyIbutton, () -> {
|
||||
inner.addImageButton(Icon.trash16Small, Styles.emptyi, () -> {
|
||||
ui.showConfirm("$confirm", "$server.delete", () -> {
|
||||
servers.removeValue(server, true);
|
||||
saveServers();
|
||||
@@ -237,7 +237,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
Core.settings.save();
|
||||
}).grow().pad(8).get().setMaxLength(maxNameLength);
|
||||
|
||||
ImageButton button = t.addImageButton(Tex.whiteui, Style.clearFullIbutton, 40, () -> {
|
||||
ImageButton button = t.addImageButton(Tex.whiteui, Styles.clearFulli, 40, () -> {
|
||||
new ColorPickDialog().show(color -> {
|
||||
player.color.set(color);
|
||||
Core.settings.put("color-0", Color.rgba8888(color));
|
||||
@@ -304,7 +304,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
|
||||
local.row();
|
||||
|
||||
TextButton button = local.addButton("", Style.clearTbutton, () -> connect(host.address, port))
|
||||
TextButton button = local.addButton("", Styles.cleart, () -> connect(host.address, port))
|
||||
.width(w).pad(5f).get();
|
||||
button.clearChildren();
|
||||
buildServer(host, button);
|
||||
|
||||
@@ -30,7 +30,7 @@ public class LanguageDialog extends FloatingDialog{
|
||||
ButtonGroup<TextButton> group = new ButtonGroup<>();
|
||||
|
||||
for(Locale loc : locales){
|
||||
TextButton button = new TextButton(Strings.capitalize(loc.getDisplayName(loc)), Style.clearToggleTbutton);
|
||||
TextButton button = new TextButton(Strings.capitalize(loc.getDisplayName(loc)), Styles.clearTogglet);
|
||||
button.clicked(() -> {
|
||||
if(getLocale().equals(loc)) return;
|
||||
Core.settings.put("locale", loc.toString());
|
||||
|
||||
@@ -15,7 +15,7 @@ import io.anuke.mindustry.gen.*;
|
||||
import io.anuke.mindustry.io.*;
|
||||
import io.anuke.mindustry.io.SaveIO.*;
|
||||
import io.anuke.mindustry.ui.*;
|
||||
import io.anuke.mindustry.ui.Style;
|
||||
import io.anuke.mindustry.ui.Styles;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
@@ -59,7 +59,7 @@ public class LoadDialog extends FloatingDialog{
|
||||
for(SaveSlot slot : array){
|
||||
if(slot.isHidden()) continue;
|
||||
|
||||
TextButton button = new TextButton("", Style.clearTbutton);
|
||||
TextButton button = new TextButton("", Styles.cleart);
|
||||
button.getLabel().remove();
|
||||
button.clearChildren();
|
||||
|
||||
@@ -71,25 +71,25 @@ public class LoadDialog extends FloatingDialog{
|
||||
title.table(t -> {
|
||||
t.right();
|
||||
|
||||
t.addImageButton(Icon.floppy, Style.emptytoggleIbutton, () -> {
|
||||
t.addImageButton(Icon.floppy, Styles.emptytogglei, () -> {
|
||||
slot.setAutosave(!slot.isAutosave());
|
||||
}).checked(slot.isAutosave()).right();
|
||||
|
||||
t.addImageButton(Icon.trash, Style.emptyIbutton, () -> {
|
||||
t.addImageButton(Icon.trash, Styles.emptyi, () -> {
|
||||
ui.showConfirm("$confirm", "$save.delete.confirm", () -> {
|
||||
slot.delete();
|
||||
setup();
|
||||
});
|
||||
}).right();
|
||||
|
||||
t.addImageButton(Icon.pencil, Style.emptyIbutton, () -> {
|
||||
t.addImageButton(Icon.pencil, Styles.emptyi, () -> {
|
||||
ui.showTextInput("$save.rename", "$save.rename.text", slot.getName(), text -> {
|
||||
slot.setName(text);
|
||||
setup();
|
||||
});
|
||||
}).right();
|
||||
|
||||
t.addImageButton(Icon.save, Style.emptyIbutton, () -> {
|
||||
t.addImageButton(Icon.save, Styles.emptyi, () -> {
|
||||
if(!ios){
|
||||
platform.showFileChooser(false, saveExtension, file -> {
|
||||
try{
|
||||
|
||||
@@ -46,7 +46,7 @@ public class LoadoutDialog extends FloatingDialog{
|
||||
FloatingDialog dialog = new FloatingDialog("");
|
||||
dialog.setFillParent(false);
|
||||
for(Item item : content.items().select(item -> filter.test(item) && item.type == ItemType.material && supplier.get().find(stack -> stack.item == item) == null)){
|
||||
TextButton button = dialog.cont.addButton("", Style.clearTbutton, () -> {
|
||||
TextButton button = dialog.cont.addButton("", Styles.cleart, () -> {
|
||||
dialog.hide();
|
||||
supplier.get().add(new ItemStack(item, 0));
|
||||
updater.run();
|
||||
@@ -89,17 +89,17 @@ public class LoadoutDialog extends FloatingDialog{
|
||||
int step = 50;
|
||||
|
||||
for(ItemStack stack : supplier.get()){
|
||||
items.addButton("x", Style.clearPartialTbutton, () -> {
|
||||
items.addButton("x", Styles.clearPartialt, () -> {
|
||||
supplier.get().remove(stack);
|
||||
updater.run();
|
||||
setup();
|
||||
}).size(bsize);
|
||||
|
||||
items.addButton("-", Style.clearPartialTbutton, () -> {
|
||||
items.addButton("-", Styles.clearPartialt, () -> {
|
||||
stack.amount = Math.max(stack.amount - step, 0);
|
||||
updater.run();
|
||||
}).size(bsize);
|
||||
items.addButton("+", Style.clearPartialTbutton, () -> {
|
||||
items.addButton("+", Styles.clearPartialt, () -> {
|
||||
stack.amount = Math.min(stack.amount + step, capacity);
|
||||
updater.run();
|
||||
}).size(bsize);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class MapPlayDialog extends FloatingDialog{
|
||||
for(Gamemode mode : Gamemode.values()){
|
||||
if(mode.hidden) continue;
|
||||
|
||||
modes.addButton(mode.toString(), Style.toggleTbutton, () -> {
|
||||
modes.addButton(mode.toString(), Styles.togglet, () -> {
|
||||
selectedGamemode = mode;
|
||||
rules = map.applyRules(mode);
|
||||
}).update(b -> b.setChecked(selectedGamemode == mode)).size(140f, 54f).disabled(!mode.valid(map));
|
||||
|
||||
@@ -128,7 +128,7 @@ public class MapsDialog extends FloatingDialog{
|
||||
maps.row();
|
||||
}
|
||||
|
||||
TextButton button = maps.addButton("", Style.clearTbutton, () -> showMapInfo(map)).width(mapsize).pad(8).get();
|
||||
TextButton button = maps.addButton("", Styles.cleart, () -> showMapInfo(map)).width(mapsize).pad(8).get();
|
||||
button.clearChildren();
|
||||
button.margin(9);
|
||||
button.add(map.name()).width(mapsize - 18f).center().get().setEllipsis(true);
|
||||
@@ -160,7 +160,7 @@ public class MapsDialog extends FloatingDialog{
|
||||
|
||||
table.stack(new Image(map.texture).setScaling(Scaling.fit), new BorderImage(map.texture).setScaling(Scaling.fit)).size(mapsize);
|
||||
|
||||
table.table(Style.flat, desc -> {
|
||||
table.table(Styles.black, desc -> {
|
||||
desc.top();
|
||||
Table t = new Table();
|
||||
t.margin(6);
|
||||
|
||||
@@ -79,7 +79,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
|
||||
dataDialog.cont.table(Tex.button, t -> {
|
||||
t.defaults().size(240f, 60f).left();
|
||||
TextButtonStyle style = Style.clearTbutton;
|
||||
TextButtonStyle style = Styles.cleart;
|
||||
|
||||
t.addButton("$settings.cleardata", style, () -> ui.showConfirm("$confirm", "$settings.clearall.confirm", () -> {
|
||||
ObjectMap<String, Object> map = new ObjectMap<>();
|
||||
@@ -177,7 +177,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
void rebuildMenu(){
|
||||
menu.clearChildren();
|
||||
|
||||
TextButtonStyle style = Style.clearTbutton;
|
||||
TextButtonStyle style = Styles.cleart;
|
||||
|
||||
menu.defaults().size(300f, 60f);
|
||||
menu.addButton("$settings.game", style, () -> visible(0));
|
||||
|
||||
@@ -19,7 +19,7 @@ import io.anuke.mindustry.gen.*;
|
||||
import io.anuke.mindustry.graphics.*;
|
||||
import io.anuke.mindustry.type.*;
|
||||
import io.anuke.mindustry.ui.*;
|
||||
import io.anuke.mindustry.ui.Style;
|
||||
import io.anuke.mindustry.ui.Styles;
|
||||
import io.anuke.mindustry.ui.TreeLayout.*;
|
||||
import io.anuke.mindustry.world.*;
|
||||
|
||||
@@ -143,7 +143,7 @@ public class TechTreeDialog extends FloatingDialog{
|
||||
infoTable.touchable(Touchable.enabled);
|
||||
|
||||
for(TechTreeNode node : nodes){
|
||||
ImageButton button = new ImageButton(node.node.block.icon(Block.Icon.medium), Style.nodeIbutton);
|
||||
ImageButton button = new ImageButton(node.node.block.icon(Block.Icon.medium), Styles.nodei);
|
||||
button.visible(() -> node.visible);
|
||||
button.clicked(() -> {
|
||||
if(mobile){
|
||||
@@ -263,7 +263,7 @@ public class TechTreeDialog extends FloatingDialog{
|
||||
infoTable.table(b -> {
|
||||
b.margin(0).left().defaults().left();
|
||||
|
||||
b.addImageButton(Icon.infoSmall, Style.clearIbutton, () -> ui.content.show(node.block)).growY().width(50f);
|
||||
b.addImageButton(Icon.infoSmall, Styles.cleari, () -> ui.content.show(node.block)).growY().width(50f);
|
||||
b.add().grow();
|
||||
b.table(desc -> {
|
||||
desc.left().defaults().left();
|
||||
@@ -290,7 +290,7 @@ public class TechTreeDialog extends FloatingDialog{
|
||||
|
||||
if(mobile && locked(node)){
|
||||
b.row();
|
||||
b.addImageTextButton("$research", Icon.checkSmall, Style.nodeTbutton, () -> unlock(node))
|
||||
b.addImageTextButton("$research", Icon.checkSmall, Styles.nodet, () -> unlock(node))
|
||||
.disabled(i -> !data.hasItems(node.requirements)).growX().height(44f).colspan(3);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ import io.anuke.mindustry.input.*;
|
||||
import io.anuke.mindustry.net.Packets.*;
|
||||
import io.anuke.mindustry.type.*;
|
||||
import io.anuke.mindustry.ui.*;
|
||||
import io.anuke.mindustry.ui.Style;
|
||||
import io.anuke.mindustry.ui.Styles;
|
||||
import io.anuke.mindustry.ui.dialogs.*;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
@@ -61,7 +61,7 @@ public class HudFragment extends Fragment{
|
||||
select.left();
|
||||
select.defaults().size(dsize).left();
|
||||
|
||||
ImageButtonStyle style = Style.clearTransIbutton;
|
||||
ImageButtonStyle style = Styles.clearTransi;
|
||||
|
||||
select.addImageButton(Icon.menuLarge, style, ui.paused::show);
|
||||
flip = select.addImageButton(Icon.arrowUp, style, this::toggleMenus).get();
|
||||
@@ -144,7 +144,7 @@ public class HudFragment extends Fragment{
|
||||
wavesMain.visible(() -> shown && !state.isEditor());
|
||||
wavesMain.top().left();
|
||||
Stack stack = new Stack();
|
||||
Button waves = new Button(Style.waveButton);
|
||||
Button waves = new Button(Styles.waveb);
|
||||
Table btable = new Table().margin(0);
|
||||
|
||||
stack.add(waves);
|
||||
@@ -168,7 +168,7 @@ public class HudFragment extends Fragment{
|
||||
teams.left();
|
||||
int i = 0;
|
||||
for(Team team : Team.all){
|
||||
ImageButton button = teams.addImageButton(Tex.whiteui, Style.clearTogglePartialIbutton, 40f, () -> Call.setPlayerTeamEditor(player, team))
|
||||
ImageButton button = teams.addImageButton(Tex.whiteui, Styles.clearTogglePartiali, 40f, () -> Call.setPlayerTeamEditor(player, team))
|
||||
.size(50f).margin(6f).get();
|
||||
button.getImageCell().grow();
|
||||
button.getStyle().imageUpColor = team.color;
|
||||
@@ -202,7 +202,7 @@ public class HudFragment extends Fragment{
|
||||
float[] position = {0, 0};
|
||||
|
||||
t.row();
|
||||
t.addImageTextButton("$editor.removeunit", Icon.quit, Style.toggleTbutton, () -> {}).fillX().update(b -> {
|
||||
t.addImageTextButton("$editor.removeunit", Icon.quit, Styles.togglet, () -> {}).fillX().update(b -> {
|
||||
boolean[] found = {false};
|
||||
if(b.isChecked()){
|
||||
Element e = Core.scene.hit(Core.input.mouseX(), Core.input.mouseY(), true);
|
||||
@@ -243,9 +243,9 @@ public class HudFragment extends Fragment{
|
||||
IntFormat fps = new IntFormat("fps");
|
||||
IntFormat ping = new IntFormat("ping");
|
||||
|
||||
info.label(() -> fps.get(Core.graphics.getFramesPerSecond())).left().style(Style.outlineLabel);
|
||||
info.label(() -> fps.get(Core.graphics.getFramesPerSecond())).left().style(Styles.outlineLabel);
|
||||
info.row();
|
||||
info.label(() -> ping.get(netClient.getPing())).visible(net::client).left().style(Style.outlineLabel);
|
||||
info.label(() -> ping.get(netClient.getPing())).visible(net::client).left().style(Styles.outlineLabel);
|
||||
}).top().left();
|
||||
});
|
||||
|
||||
@@ -255,7 +255,7 @@ public class HudFragment extends Fragment{
|
||||
//spawner warning
|
||||
parent.fill(t -> {
|
||||
t.touchable(Touchable.disabled);
|
||||
t.table(Style.flat, c -> c.add("$nearpoint")
|
||||
t.table(Styles.black, c -> c.add("$nearpoint")
|
||||
.update(l -> l.setColor(Tmp.c1.set(Color.WHITE).lerp(Color.SCARLET, Mathf.absin(Time.time(), 10f, 1f))))
|
||||
.get().setAlignment(Align.center, Align.center))
|
||||
.margin(6).update(u -> u.color.a = Mathf.lerpDelta(u.color.a, Mathf.num(spawner.playerNear()), 0.1f)).get().color.a = 0f;
|
||||
@@ -325,7 +325,7 @@ public class HudFragment extends Fragment{
|
||||
setDisabled(() -> !control.tutorial.canNext());
|
||||
}},
|
||||
new Table(f -> {
|
||||
f.left().addImageButton(Icon.arrowLeftSmall, Style.emptyIbutton, () -> {
|
||||
f.left().addImageButton(Icon.arrowLeftSmall, Styles.emptyi, () -> {
|
||||
control.tutorial.prevSentence();
|
||||
}).width(44f).growY().visible(() -> control.tutorial.canPrev());
|
||||
}));
|
||||
@@ -344,7 +344,7 @@ public class HudFragment extends Fragment{
|
||||
//'saving' indicator
|
||||
parent.fill(t -> {
|
||||
t.bottom().visible(() -> control.saves.isSaving());
|
||||
t.add("$saveload").style(Style.outlineLabel);
|
||||
t.add("$saveload").style(Styles.outlineLabel);
|
||||
});
|
||||
|
||||
blockfrag.build(parent);
|
||||
@@ -644,7 +644,7 @@ public class HudFragment extends Fragment{
|
||||
}
|
||||
|
||||
private void addPlayButton(Table table){
|
||||
table.right().addImageButton(Icon.playSmaller, Style.rightIbutton, 30f, () -> {
|
||||
table.right().addImageButton(Icon.playSmaller, Styles.righti, 30f, () -> {
|
||||
if(net.client() && player.isAdmin){
|
||||
Call.onAdminRequest(player, AdminAction.wave);
|
||||
}else if(inLaunchWave()){
|
||||
|
||||
@@ -15,7 +15,7 @@ public class LoadingFragment extends Fragment{
|
||||
|
||||
@Override
|
||||
public void build(Group parent){
|
||||
parent.fill(Style.loadDim,t -> {
|
||||
parent.fill(Styles.black8, t -> {
|
||||
t.visible(false);
|
||||
t.touchable(Touchable.enabled);
|
||||
t.add().height(70f).row();
|
||||
|
||||
@@ -16,7 +16,7 @@ import io.anuke.mindustry.game.*;
|
||||
import io.anuke.mindustry.gen.*;
|
||||
import io.anuke.mindustry.graphics.*;
|
||||
import io.anuke.mindustry.ui.*;
|
||||
import io.anuke.mindustry.ui.Style;
|
||||
import io.anuke.mindustry.ui.Styles;
|
||||
|
||||
import static io.anuke.arc.Core.assets;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
@@ -61,8 +61,8 @@ public class MenuFragment extends Fragment{
|
||||
|
||||
//info icon
|
||||
if(mobile){
|
||||
parent.fill(c -> c.bottom().left().addButton("", Style.infoTbutton, ui.about::show).size(84, 45));
|
||||
parent.fill(c -> c.bottom().right().addButton("", Style.discordTbutton, ui.discord::show).size(84, 45));
|
||||
parent.fill(c -> c.bottom().left().addButton("", Styles.infot, ui.about::show).size(84, 45));
|
||||
parent.fill(c -> c.bottom().right().addButton("", Styles.discordt, ui.discord::show).size(84, 45));
|
||||
}
|
||||
|
||||
String versionText = "[#ffffffba]" + ((Version.build == -1) ? "[#fc8140aa]custom build" : (Version.type.equals("official") ? Version.modifier : Version.type) + " build " + Version.build);
|
||||
@@ -146,7 +146,7 @@ public class MenuFragment extends Fragment{
|
||||
|
||||
|
||||
float width = 230f;
|
||||
Drawable background = Style.flatTrans;
|
||||
Drawable background = Styles.black6;
|
||||
|
||||
container.left();
|
||||
container.add().width(Core.graphics.getWidth()/10f);
|
||||
@@ -198,7 +198,7 @@ public class MenuFragment extends Fragment{
|
||||
private void buttons(Table t, Buttoni... buttons){
|
||||
for(Buttoni b : buttons){
|
||||
Button[] out = {null};
|
||||
out[0] = t.addImageTextButton(b.text, b.icon, Style.clearToggleMenuTbutton, () -> {
|
||||
out[0] = t.addImageTextButton(b.text, b.icon, Styles.clearToggleMenut, () -> {
|
||||
if(currentMenu == out[0]){
|
||||
currentMenu = null;
|
||||
fadeOutMenu();
|
||||
|
||||
@@ -16,7 +16,7 @@ import io.anuke.mindustry.gen.*;
|
||||
import io.anuke.mindustry.graphics.*;
|
||||
import io.anuke.mindustry.input.*;
|
||||
import io.anuke.mindustry.type.*;
|
||||
import io.anuke.mindustry.ui.Style;
|
||||
import io.anuke.mindustry.ui.Styles;
|
||||
import io.anuke.mindustry.world.*;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
@@ -138,7 +138,7 @@ public class PlacementFragment extends Fragment{
|
||||
continue;
|
||||
}
|
||||
|
||||
ImageButton button = blockTable.addImageButton(Icon.lockedSmall, Style.selectIbutton, () -> {
|
||||
ImageButton button = blockTable.addImageButton(Icon.lockedSmall, Styles.selecti, () -> {
|
||||
if(unlocked(block)){
|
||||
input.block = input.block == block ? null : block;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ public class PlacementFragment extends Fragment{
|
||||
.left().width(190f).padLeft(5);
|
||||
header.add().growX();
|
||||
if(unlocked(lastDisplay)){
|
||||
header.addButton("?", Style.clearPartialTbutton, () -> {
|
||||
header.addButton("?", Styles.clearPartialt, () -> {
|
||||
ui.content.show(lastDisplay);
|
||||
Events.fire(new BlockInfoEvent());
|
||||
}).size(8 * 5).padTop(-5).padRight(-5).right().grow().name("blockinfo");
|
||||
@@ -268,11 +268,11 @@ public class PlacementFragment extends Fragment{
|
||||
if(f++ % 2 == 0) categories.row();
|
||||
|
||||
if(categoryEmpty[cat.ordinal()]){
|
||||
categories.addImage(Style.flatTrans);
|
||||
categories.addImage(Styles.black6);
|
||||
continue;
|
||||
}
|
||||
|
||||
categories.addImageButton(Core.atlas.drawable("icon-" + cat.name() + "-smaller"), Style.clearToggleTransIbutton, () -> {
|
||||
categories.addImageButton(Core.atlas.drawable("icon-" + cat.name() + "-smaller"), Styles.clearToggleTransi, () -> {
|
||||
currentCategory = cat;
|
||||
rebuildCategory.run();
|
||||
}).group(group).update(i -> i.setChecked(currentCategory == cat)).name("category-" + cat.name());
|
||||
|
||||
@@ -103,14 +103,14 @@ public class PlayerListFragment extends Fragment{
|
||||
button.table(t -> {
|
||||
t.defaults().size(bs);
|
||||
|
||||
t.addImageButton(Icon.banSmall, Style.clearPartialIbutton,
|
||||
t.addImageButton(Icon.banSmall, Styles.clearPartiali,
|
||||
() -> ui.showConfirm("$confirm", "$confirmban", () -> Call.onAdminRequest(user, AdminAction.ban)));
|
||||
t.addImageButton(Icon.cancelSmall, Style.clearPartialIbutton,
|
||||
t.addImageButton(Icon.cancelSmall, Styles.clearPartiali,
|
||||
() -> ui.showConfirm("$confirm", "$confirmkick", () -> Call.onAdminRequest(user, AdminAction.kick)));
|
||||
|
||||
t.row();
|
||||
|
||||
t.addImageButton(Icon.adminSmall, Style.clearTogglePartialIbutton, () -> {
|
||||
t.addImageButton(Icon.adminSmall, Styles.clearTogglePartiali, () -> {
|
||||
if(net.client()) return;
|
||||
|
||||
String id = user.uuid;
|
||||
@@ -126,7 +126,7 @@ public class PlayerListFragment extends Fragment{
|
||||
.touchable(() -> net.client() ? Touchable.disabled : Touchable.enabled)
|
||||
.checked(user.isAdmin);
|
||||
|
||||
t.addImageButton(Icon.zoomSmall, Style.clearPartialIbutton, () -> Call.onAdminRequest(user, AdminAction.trace));
|
||||
t.addImageButton(Icon.zoomSmall, Styles.clearPartiali, () -> Call.onAdminRequest(user, AdminAction.trace));
|
||||
|
||||
}).padRight(12).size(bs + 10f, bs);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.anuke.arc.scene.ui.*;
|
||||
import io.anuke.arc.scene.ui.layout.*;
|
||||
import io.anuke.mindustry.gen.*;
|
||||
import io.anuke.mindustry.type.*;
|
||||
import io.anuke.mindustry.ui.Style;
|
||||
import io.anuke.mindustry.ui.Styles;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ItemSelection{
|
||||
for(Item item : items){
|
||||
if(!data.isUnlocked(item) && world.isZone()) continue;
|
||||
|
||||
ImageButton button = cont.addImageButton(Tex.whiteui, Style.clearToggleTransIbutton, 24, () -> control.input.frag.config.hideConfig()).group(group).get();
|
||||
ImageButton button = cont.addImageButton(Tex.whiteui, Styles.clearToggleTransi, 24, () -> control.input.frag.config.hideConfig()).group(group).get();
|
||||
button.changed(() -> consumer.accept(button.isChecked() ? item : null));
|
||||
button.getStyle().imageUp = new TextureRegionDrawable(item.icon(Item.Icon.medium));
|
||||
button.update(() -> button.setChecked(holder.get() == item));
|
||||
|
||||
@@ -84,7 +84,7 @@ public class LiquidSource extends Block{
|
||||
|
||||
for(int i = 0; i < items.size; i++){
|
||||
final int f = i;
|
||||
ImageButton button = cont.addImageButton(Tex.clear, Style.clearToggleTransIbutton, 24, () -> control.input.frag.config.hideConfig()).size(38).group(group).get();
|
||||
ImageButton button = cont.addImageButton(Tex.clear, Styles.clearToggleTransi, 24, () -> control.input.frag.config.hideConfig()).size(38).group(group).get();
|
||||
button.changed(() -> {
|
||||
Call.setLiquidSourceLiquid(null, tile, button.isChecked() ? items.get(f) : null);
|
||||
control.input.frag.config.hideConfig();
|
||||
|
||||
@@ -81,12 +81,12 @@ public class CommandCenter extends Block{
|
||||
Table buttons = new Table();
|
||||
|
||||
for(UnitCommand cmd : UnitCommand.all){
|
||||
buttons.addImageButton(Core.atlas.drawable("icon-command-" + cmd.name() + "-small"), Style.clearToggleTransIbutton, () -> Call.onCommandCenterSet(player, tile, cmd))
|
||||
buttons.addImageButton(Core.atlas.drawable("icon-command-" + cmd.name() + "-small"), Styles.clearToggleTransi, () -> Call.onCommandCenterSet(player, tile, cmd))
|
||||
.size(44).group(group).update(b -> b.setChecked(entity.command == cmd));
|
||||
}
|
||||
table.add(buttons);
|
||||
table.row();
|
||||
table.label(() -> entity.command.localized()).style(Style.outlineLabel).center().growX().get().setAlignment(Align.center);
|
||||
table.label(() -> entity.command.localized()).style(Styles.outlineLabel).center().growX().get().setAlignment(Align.center);
|
||||
}
|
||||
|
||||
@Remote(called = Loc.server, forward = true, targets = Loc.both)
|
||||
|
||||
Reference in New Issue
Block a user