Various icon changes

This commit is contained in:
Anuken
2020-01-17 13:57:04 -05:00
parent 4f29c80814
commit c3d2351b2d
173 changed files with 1665 additions and 217 deletions

View File

@@ -55,7 +55,7 @@ public class ColorPicker extends FloatingDialog{
buttons.clear();
addCloseButton();
buttons.addImageTextButton("$ok", Icon.checkSmall, () -> {
buttons.addImageTextButton("$ok", Icon.ok, () -> {
cons.get(current);
hide();
});

View File

@@ -17,7 +17,7 @@ public class ControlsDialog extends KeybindDialog{
@Override
public void addCloseButton(){
buttons.addImageTextButton("$back", Icon.arrowLeftSmall, this::hide).size(230f, 64f);
buttons.addImageTextButton("$back", Icon.left, this::hide).size(230f, 64f);
keyDown(key -> {
if(key == KeyCode.ESCAPE || key == KeyCode.BACK)

View File

@@ -35,12 +35,12 @@ public class CustomRulesDialog extends FloatingDialog{
banDialog.addCloseButton();
banDialog.shown(this::rebuildBanned);
banDialog.buttons.addImageTextButton("$addall", Icon.arrow16Small, () -> {
banDialog.buttons.addImageTextButton("$addall", Icon.add, () -> {
rules.bannedBlocks.addAll(content.blocks().select(Block::isBuildable));
rebuildBanned();
}).size(180, 64f);
banDialog.buttons.addImageTextButton("$clear", Icon.trash16Small, () -> {
banDialog.buttons.addImageTextButton("$clear", Icon.trash, () -> {
rules.bannedBlocks.clear();
rebuildBanned();
}).size(180, 64f);
@@ -72,7 +72,7 @@ public class CustomRulesDialog extends FloatingDialog{
b.addImage(block.icon(Cicon.medium)).size(Cicon.medium.size).padRight(3);
b.add(block.localizedName).color(Color.lightGray).padLeft(3).growX().left().wrap();
b.addImageButton(Icon.cancelSmall, Styles.clearPartiali, () -> {
b.addImageButton(Icon.cancel, Styles.clearPartiali, () -> {
rules.bannedBlocks.remove(block);
rebuildBanned();
}).size(70f).pad(-4f).padLeft(0f);
@@ -84,7 +84,7 @@ public class CustomRulesDialog extends FloatingDialog{
}
}).get().setScrollYForce(previousScroll);
banDialog.cont.row();
banDialog.cont.addImageTextButton("$add", Icon.addSmall, () -> {
banDialog.cont.addImageTextButton("$add", Icon.add, () -> {
FloatingDialog dialog = new FloatingDialog("$add");
dialog.cont.pane(t -> {
t.left().margin(14f);

View File

@@ -55,7 +55,7 @@ public class DatabaseDialog extends FloatingDialog{
for(int i = 0; i < array.size; i++){
UnlockableContent unlock = (UnlockableContent)array.get(i);
Image image = unlocked(unlock) ? new Image(unlock.icon(Cicon.medium)) : new Image(Icon.lockedSmall, Pal.gray);
Image image = unlocked(unlock) ? new Image(unlock.icon(Cicon.medium)) : new Image(Icon.lockOpen, Pal.gray);
list.add(image).size(8*4).pad(3);
ClickListener listener = new ClickListener();
image.addListener(listener);

View File

@@ -235,7 +235,7 @@ public class DeployDialog extends FloatingDialog{
button.labelWrap(zone.localizedName).style(Styles.outlineLabel).width(140).growX().get().setAlignment(Align.center);
}else{
Cons<Element> flasher = zone.canUnlock() && !hidden(zone) ? e -> e.update(() -> e.getColor().set(Color.white).lerp(Pal.accent, Mathf.absin(3f, 1f))) : e -> {};
flasher.get(button.addImage(Icon.locked).get());
flasher.get(button.addImage(Icon.lock).get());
button.row();
flasher.get(button.add("$locked").get());
}

View File

@@ -92,15 +92,15 @@ public class FileChooser extends FloatingDialog{
Table icontable = new Table();
ImageButton up = new ImageButton(Icon.folderParent);
ImageButton up = new ImageButton(Icon.upOpen);
up.clicked(() -> {
directory = directory.parent();
updateFiles(true);
});
ImageButton back = new ImageButton(Icon.arrowLeft);
ImageButton forward = new ImageButton(Icon.arrowRight);
ImageButton back = new ImageButton(Icon.left);
ImageButton forward = new ImageButton(Icon.right);
forward.clicked(() -> stack.forward());
back.clicked(() -> stack.back());
@@ -185,7 +185,7 @@ public class FileChooser extends FloatingDialog{
files.top().left();
Fi[] names = getFileNames();
Image upimage = new Image(Icon.folderParentSmall);
Image upimage = new Image(Icon.upOpen);
TextButton upbutton = new TextButton(".." + directory.toString(), Styles.clearTogglet);
upbutton.clicked(() -> {
directory = directory.parent();
@@ -229,7 +229,7 @@ public class FileChooser extends FloatingDialog{
button.setChecked(filename.equals(filefield.getText()));
});
Image image = new Image(file.isDirectory() ? Icon.folderSmall : Icon.fileTextSmall);
Image image = new Image(file.isDirectory() ? Icon.folder : Icon.fileText);
button.add(image).padRight(4f).padLeft(4);
button.getCells().reverse();

View File

@@ -56,7 +56,7 @@ public class FloatingDialog extends Dialog{
@Override
public void addCloseButton(){
buttons.defaults().size(210f, 64f);
buttons.addImageTextButton("$back", Icon.arrowLeft, this::hide).size(210f, 64f);
buttons.addImageTextButton("$back", Icon.left, this::hide).size(210f, 64f);
keyDown(key -> {
if(key == KeyCode.ESCAPE || key == KeyCode.BACK){

View File

@@ -122,7 +122,7 @@ public class JoinDialog extends FloatingDialog{
inner.add(button.getLabel()).growX();
inner.addImageButton(Icon.arrowUpSmall, Styles.emptyi, () -> {
inner.addImageButton(Icon.upOpen, Styles.emptyi, () -> {
int index = servers.indexOf(server);
if(index > 0){
servers.remove(index);
@@ -141,16 +141,16 @@ public class JoinDialog extends FloatingDialog{
}).margin(3f).padTop(6f).top().right();
inner.addImageButton(Icon.loadingSmall, Styles.emptyi, () -> {
inner.addImageButton(Icon.refresh, Styles.emptyi, () -> {
refreshServer(server);
}).margin(3f).padTop(6f).top().right();
inner.addImageButton(Icon.pencilSmall, Styles.emptyi, () -> {
inner.addImageButton(Icon.pencil, Styles.emptyi, () -> {
renaming = server;
add.show();
}).margin(3f).padTop(6f).top().right();
inner.addImageButton(Icon.trash16Small, Styles.emptyi, () -> {
inner.addImageButton(Icon.trash, Styles.emptyi, () -> {
ui.showConfirm("$confirm", "$server.delete", () -> {
servers.removeValue(server, true);
saveServers();
@@ -303,7 +303,7 @@ public class JoinDialog extends FloatingDialog{
local.background(Tex.button);
local.add("$hosts.none").pad(10f);
local.add().growX();
local.addImageButton(Icon.loading, this::refreshLocal).pad(-12f).padLeft(0).size(70f);
local.addImageButton(Icon.refresh, this::refreshLocal).pad(-12f).padLeft(0).size(70f);
}else{
local.background(null);
}

View File

@@ -71,7 +71,7 @@ public class LoadDialog extends FloatingDialog{
title.table(t -> {
t.right();
t.addImageButton(Icon.floppy, Styles.emptytogglei, () -> {
t.addImageButton(Icon.save, Styles.emptytogglei, () -> {
slot.setAutosave(!slot.isAutosave());
}).checked(slot.isAutosave()).right();

View File

@@ -42,9 +42,9 @@ public class LoadoutDialog extends FloatingDialog{
}
});
buttons.addImageTextButton("$back", Icon.arrowLeft, this::hide).size(210f, 64f);
buttons.addImageTextButton("$back", Icon.left, this::hide).size(210f, 64f);
buttons.addImageTextButton("$settings.reset", Icon.refreshSmall, () -> {
buttons.addImageTextButton("$settings.reset", Icon.refresh, () -> {
resetter.run();
reseed();
updater.run();
@@ -83,7 +83,7 @@ public class LoadoutDialog extends FloatingDialog{
updater.run();
}).size(bsize);
t.addImageButton(Icon.pencilSmaller, Styles.cleari, () -> ui.showTextInput("$configure", stack.item.localizedName, 10, stack.amount + "", true, str -> {
t.addImageButton(Icon.pencil, Styles.cleari, () -> ui.showTextInput("$configure", stack.item.localizedName, 10, stack.amount + "", true, str -> {
if(Strings.canParsePostiveInt(str)){
int amount = Strings.parseInt(str);
if(amount >= 0 && amount <= capacity){

View File

@@ -68,7 +68,7 @@ public class MapPlayDialog extends FloatingDialog{
cont.add(selmode);
cont.row();
cont.addImageTextButton("$customize", Icon.toolsSmall, () -> dialog.show(rules, () -> rules = map.applyRules(selectedGamemode))).width(230);
cont.addImageTextButton("$customize", Icon.settings, () -> dialog.show(rules, () -> rules = map.applyRules(selectedGamemode))).width(230);
cont.row();
cont.add(new BorderImage(map.safeTexture(), 3f)).size(mobile && !Core.graphics.isPortrait() ? 150f : 250f).get().setScaling(Scaling.fit);
//only maps with survival are valid for high scores

View File

@@ -44,10 +44,10 @@ public class MapsDialog extends FloatingDialog{
buttons.clearChildren();
if(Core.graphics.isPortrait()){
buttons.addImageTextButton("$back", Icon.arrowLeft, this::hide).size(210f*2f, 64f).colspan(2);
buttons.addImageTextButton("$back", Icon.left, this::hide).size(210f*2f, 64f).colspan(2);
buttons.row();
}else{
buttons.addImageTextButton("$back", Icon.arrowLeft, this::hide).size(210f, 64f);
buttons.addImageTextButton("$back", Icon.left, this::hide).size(210f, 64f);
}
buttons.addImageTextButton("$editor.newmap", Icon.add, () -> {
@@ -67,7 +67,7 @@ public class MapsDialog extends FloatingDialog{
});
}).size(210f, 64f);
buttons.addImageTextButton("$editor.importmap", Icon.load, () -> {
buttons.addImageTextButton("$editor.importmap", Icon.download, () -> {
platform.showFileChooser(true, mapExtension, file -> {
ui.loadAnd(() -> {
maps.tryCatchMapError(() -> {
@@ -192,7 +192,7 @@ public class MapsDialog extends FloatingDialog{
table.row();
table.addImageTextButton("$editor.openin", Icon.loadMapSmall, () -> {
table.addImageTextButton("$editor.openin", Icon.download, () -> {
try{
Vars.ui.editor.beginEditMap(map.file);
dialog.hide();
@@ -203,7 +203,7 @@ public class MapsDialog extends FloatingDialog{
}
}).fillX().height(54f).marginLeft(10);
table.addImageTextButton(map.workshop && steam ? "$view.workshop" : "$delete", map.workshop && steam ? Icon.linkSmall : Icon.trash16Small, () -> {
table.addImageTextButton(map.workshop && steam ? "$view.workshop" : "$delete", map.workshop && steam ? Icon.link : Icon.trash, () -> {
if(map.workshop && steam){
platform.viewListing(map);
}else{

View File

@@ -120,18 +120,18 @@ public class ModsDialog extends FloatingDialog{
title.add("[accent]" + mod.meta.displayName() + "[lightgray] v" + mod.meta.version + (mod.enabled() ? "" : "\n" + Core.bundle.get("mod.disabled") + "")).width(200f).wrap();
title.add().growX();
title.addImageTextButton(mod.enabled() ? "$mod.disable" : "$mod.enable", mod.enabled() ? Icon.arrowDownSmall : Icon.arrowUpSmall, Styles.cleart, () -> {
title.addImageTextButton(mod.enabled() ? "$mod.disable" : "$mod.enable", mod.enabled() ? Icon.downOpen : Icon.upOpen, Styles.cleart, () -> {
mods.setEnabled(mod, !mod.enabled());
setup();
}).height(50f).margin(8f).width(130f).disabled(!mod.isSupported());
if(steam && !mod.hasSteamID()){
title.addImageButton(Icon.loadMapSmall, Styles.cleari, () -> {
title.addImageButton(Icon.download, Styles.cleari, () -> {
platform.publish(mod);
}).size(50f);
}
title.addImageButton(mod.hasSteamID() ? Icon.linkSmall : Icon.trash16Small, Styles.cleari, () -> {
title.addImageButton(mod.hasSteamID() ? Icon.link : Icon.trash, Styles.cleari, () -> {
if(!mod.hasSteamID()){
ui.showConfirm("$confirm", "$mod.remove.confirm", () -> {
mods.removeMod(mod);

View File

@@ -76,22 +76,22 @@ public class PausedDialog extends FloatingDialog{
}else{
cont.defaults().size(130f).pad(5);
cont.addRowImageTextButton("$back", Icon.play2, this::hide);
cont.addRowImageTextButton("$settings", Icon.tools, ui.settings::show);
cont.addRowImageTextButton("$back", Icon.play, this::hide);
cont.addRowImageTextButton("$settings", Icon.settings, ui.settings::show);
if(!world.isZone() && !state.isEditor()){
cont.addRowImageTextButton("$save", Icon.save, save::show);
cont.row();
cont.addRowImageTextButton("$load", Icon.load, load::show).disabled(b -> net.active());
cont.addRowImageTextButton("$load", Icon.download, load::show).disabled(b -> net.active());
}else{
cont.row();
}
cont.addRowImageTextButton("$hostserver.mobile", Icon.host, ui.host::show).disabled(b -> net.active());
cont.addRowImageTextButton("$quit", Icon.quit, this::showQuitConfirm).update(s -> {
cont.addRowImageTextButton("$quit", Icon.exit, this::showQuitConfirm).update(s -> {
s.setText(control.saves.getCurrent() != null && control.saves.getCurrent().isAutosave() ? "$save.quit" : "$quit");
s.getLabelCell().growX().wrap();
});

View File

@@ -32,7 +32,7 @@ public class SchematicsDialog extends FloatingDialog{
shouldPause = true;
addCloseButton();
buttons.addImageTextButton("$schematic.import", Icon.loadMapSmall, this::showImport);
buttons.addImageTextButton("$schematic.import", Icon.download, this::showImport);
shown(this::setup);
onResize(this::setup);
}
@@ -79,15 +79,15 @@ public class SchematicsDialog extends FloatingDialog{
ImageButtonStyle style = Styles.clearPartiali;
buttons.addImageButton(Icon.infoSmall, style, () -> {
buttons.addImageButton(Icon.info, style, () -> {
showInfo(s);
});
buttons.addImageButton(Icon.loadMapSmall, style, () -> {
buttons.addImageButton(Icon.download, style, () -> {
showExport(s);
});
buttons.addImageButton(Icon.pencilSmall, style, () -> {
buttons.addImageButton(Icon.pencil, style, () -> {
ui.showTextInput("$schematic.rename", "$name", s.name(), res -> {
s.tags.put("name", res);
s.save();
@@ -96,9 +96,9 @@ public class SchematicsDialog extends FloatingDialog{
});
if(s.hasSteamID()){
buttons.addImageButton(Icon.linkSmall, style, () -> platform.viewListing(s));
buttons.addImageButton(Icon.link, style, () -> platform.viewListing(s));
}else{
buttons.addImageButton(Icon.trash16Small, style, () -> {
buttons.addImageButton(Icon.trash, style, () -> {
if(s.mod != null){
ui.showInfo(Core.bundle.format("mod.item.remove", s.mod.meta.displayName()));
}else{
@@ -154,7 +154,7 @@ public class SchematicsDialog extends FloatingDialog{
TextButtonStyle style = Styles.cleart;
t.defaults().size(280f, 60f).left();
t.row();
t.addImageTextButton("$schematic.copy.import", Icon.copySmall, style, () -> {
t.addImageTextButton("$schematic.copy.import", Icon.copy, style, () -> {
dialog.hide();
try{
Schematic s = Schematics.readBase64(Core.app.getClipboardText());
@@ -168,7 +168,7 @@ public class SchematicsDialog extends FloatingDialog{
}
}).marginLeft(12f).disabled(b -> Core.app.getClipboardText() == null || !Core.app.getClipboardText().startsWith(schematicBaseStart));
t.row();
t.addImageTextButton("$schematic.importfile", Icon.saveMapSmall, style, () -> platform.showFileChooser(true, schematicExtension, file -> {
t.addImageTextButton("$schematic.importfile", Icon.download, style, () -> platform.showFileChooser(true, schematicExtension, file -> {
dialog.hide();
try{
@@ -183,7 +183,7 @@ public class SchematicsDialog extends FloatingDialog{
})).marginLeft(12f);
t.row();
if(steam){
t.addImageTextButton("$schematic.browseworkshop", Icon.wikiSmall, style, () -> {
t.addImageTextButton("$schematic.browseworkshop", Icon.book, style, () -> {
dialog.hide();
platform.openWorkshop();
}).marginLeft(12f);
@@ -203,18 +203,18 @@ public class SchematicsDialog extends FloatingDialog{
TextButtonStyle style = Styles.cleart;
t.defaults().size(280f, 60f).left();
if(steam && !s.hasSteamID()){
t.addImageTextButton("$schematic.shareworkshop", Icon.wikiSmall, style,
t.addImageTextButton("$schematic.shareworkshop", Icon.book, style,
() -> platform.publish(s)).marginLeft(12f);
t.row();
dialog.hide();
}
t.addImageTextButton("$schematic.copy", Icon.copySmall, style, () -> {
t.addImageTextButton("$schematic.copy", Icon.copy, style, () -> {
dialog.hide();
ui.showInfoFade("$copied");
Core.app.setClipboardText(schematics.writeBase64(s));
}).marginLeft(12f);
t.row();
t.addImageTextButton("$schematic.exportfile", Icon.saveMapSmall, style, () -> platform.showFileChooser(false, schematicExtension, file -> {
t.addImageTextButton("$schematic.exportfile", Icon.export, style, () -> platform.showFileChooser(false, schematicExtension, file -> {
dialog.hide();
try{
Schematics.write(s, file);
@@ -272,7 +272,7 @@ public class SchematicsDialog extends FloatingDialog{
if(wasSet){
super.draw();
}else{
Draw.rect(Icon.loading.getRegion(), x + width/2f, y + height/2f, width/4f, height/4f);
Draw.rect(Icon.refresh.getRegion(), x + width/2f, y + height/2f, width/4f, height/4f);
}
Draw.color(checked ? Pal.accent : borderColor);

View File

@@ -84,7 +84,7 @@ public class SettingsMenuDialog extends SettingsDialog{
t.defaults().size(270f, 60f).left();
TextButtonStyle style = Styles.cleart;
t.addImageTextButton("$settings.cleardata", Icon.trash16Small, style, () -> ui.showConfirm("$confirm", "$settings.clearall.confirm", () -> {
t.addImageTextButton("$settings.cleardata", Icon.trash, style, () -> ui.showConfirm("$confirm", "$settings.clearall.confirm", () -> {
ObjectMap<String, Object> map = new ObjectMap<>();
for(String value : Core.settings.keys()){
if(value.contains("usid") || value.contains("uuid")){
@@ -104,7 +104,7 @@ public class SettingsMenuDialog extends SettingsDialog{
t.row();
t.addImageTextButton("$data.export", Icon.loadMapSmall, style, () -> {
t.addImageTextButton("$data.export", Icon.download, style, () -> {
if(ios){
Fi file = Core.files.local("mindustry-data-export.zip");
try{
@@ -128,7 +128,7 @@ public class SettingsMenuDialog extends SettingsDialog{
t.row();
t.addImageTextButton("$data.import", Icon.saveMapSmall, style, () -> ui.showConfirm("$confirm", "$data.import.confirm", () -> platform.showFileChooser(true, "zip", file -> {
t.addImageTextButton("$data.import", Icon.download, style, () -> ui.showConfirm("$confirm", "$data.import.confirm", () -> platform.showFileChooser(true, "zip", file -> {
try{
data.importData(file);
Core.app.exit();
@@ -146,7 +146,7 @@ public class SettingsMenuDialog extends SettingsDialog{
if(!ios){
t.row();
t.addImageTextButton("$data.openfolder", Icon.folderSmall, style, () -> Core.app.openFolder(Core.settings.getDataDirectory().absolutePath()));
t.addImageTextButton("$data.openfolder", Icon.folder, style, () -> Core.app.openFolder(Core.settings.getDataDirectory().absolutePath()));
}
});
@@ -362,7 +362,7 @@ public class SettingsMenuDialog extends SettingsDialog{
@Override
public void addCloseButton(){
buttons.addImageTextButton("$back", Icon.arrowLeftSmaller, () -> {
buttons.addImageTextButton("$back", Icon.leftOpen, () -> {
if(prefs.getChildren().first() != menu){
back();
}else{

View File

@@ -60,7 +60,7 @@ public class TechTreeDialog extends FloatingDialog{
addCloseButton();
buttons.addImageTextButton("$database", Icon.database, () -> {
buttons.addImageTextButton("$database", Icon.book, () -> {
hide();
ui.database.show();
}).size(210f, 64f);
@@ -324,7 +324,7 @@ public class TechTreeDialog extends FloatingDialog{
infoTable.table(b -> {
b.margin(0).left().defaults().left();
b.addImageButton(Icon.infoSmall, Styles.cleari, () -> ui.content.show(node.block)).growY().width(50f);
b.addImageButton(Icon.info, Styles.cleari, () -> ui.content.show(node.block)).growY().width(50f);
b.add().grow();
b.table(desc -> {
desc.left().defaults().left();
@@ -351,7 +351,7 @@ public class TechTreeDialog extends FloatingDialog{
if(mobile && locked(node)){
b.row();
b.addImageTextButton("$research", Icon.checkSmall, Styles.nodet, () -> unlock(node))
b.addImageTextButton("$research", Icon.ok, Styles.nodet, () -> unlock(node))
.disabled(i -> !data.hasItems(node.requirements)).growX().height(44f).colspan(3);
}
});

View File

@@ -45,7 +45,7 @@ public class ZoneInfoDialog extends FloatingDialog{
if(i++ % 2 == 0){
iteminfo.row();
}
iteminfo.addImage(stack.item.icon(mindustry.ui.Cicon.small)).size(8 * 3).padRight(1);
iteminfo.addImage(stack.item.icon(Cicon.small)).size(8 * 3).padRight(1);
iteminfo.add(stack.amount + "").color(Color.lightGray).padRight(5);
}
};
@@ -54,7 +54,7 @@ public class ZoneInfoDialog extends FloatingDialog{
cont.pane(cont -> {
if(zone.locked()){
cont.addImage(Icon.locked);
cont.addImage(Icon.lock);
cont.row();
cont.add("$locked").padBottom(6);
cont.row();
@@ -71,7 +71,7 @@ public class ZoneInfoDialog extends FloatingDialog{
for(Objective o : zones){
r.addImage(Icon.terrain).padRight(4);
r.add(o.display()).color(Color.lightGray);
r.addImage(o.complete() ? Icon.checkSmall : Icon.cancelSmall, o.complete() ? Color.lightGray : Color.scarlet).padLeft(3);
r.addImage(o.complete() ? Icon.ok : Icon.cancel, o.complete() ? Color.lightGray : Color.scarlet).padLeft(3);
r.row();
}
});
@@ -85,9 +85,9 @@ public class ZoneInfoDialog extends FloatingDialog{
r.add("$research.list").colspan(2).left();
r.row();
for(Unlock blocko : blocks){
r.addImage(blocko.block.icon(mindustry.ui.Cicon.small)).size(8 * 3).padRight(5);
r.addImage(blocko.block.icon(Cicon.small)).size(8 * 3).padRight(5);
r.add(blocko.block.localizedName).color(Color.lightGray).left();
r.addImage(blocko.block.unlocked() ? Icon.checkSmall : Icon.cancelSmall, blocko.block.unlocked() ? Color.lightGray : Color.scarlet).padLeft(3);
r.addImage(blocko.block.unlocked() ? Icon.ok : Icon.cancel, blocko.block.unlocked() ? Color.lightGray : Color.scarlet).padLeft(3);
r.row();
}