Merge remote-tracking branch 'origin/master'

This commit is contained in:
sharlottes
2022-04-05 20:27:11 +09:00
10 changed files with 193 additions and 45 deletions

View File

@@ -36,7 +36,7 @@ public class BarInfo {
public static <T extends Teamc> void getInfo(T target) throws IllegalAccessException, NoSuchFieldException {
for(int i = 0; i < 6; i++) { //init
strings.set(i, "[lightgray]<Empty>[]");
strings.set(i, bundle.get("empty"));
colors.set(i, Color.clear);
numbers.set(i, 0f);
}

View File

@@ -243,19 +243,19 @@ public class HudUi {
Button unitBtn = new ImageButton(new ScaledNinePatchDrawable(new NinePatch(Icon.grid.getRegion()), 0.5f), Styles.clearToggleTransi);
Button logicBtn = new ImageButton(new ScaledNinePatchDrawable(new NinePatch(Icon.grid.getRegion()), 0.5f), Styles.clearToggleTransi);
pathBtn.addListener(new Tooltip(l -> l.label(() -> "PathLine " + (pathLine ? "[accent]Enabled[]" : "[gray]Disabled[]"))));
pathBtn.addListener(new Tooltip(l -> l.label(() -> bundle.get("hud.pathline") + " " + (pathLine ? bundle.get("hud.enabled") : bundle.get("hud.disabled")))));
pathBtn.clicked(() -> {
pathLine = !pathLine;
pathBtn.setChecked(pathLine);
});
unitBtn.addListener(new Tooltip(l -> l.label(() -> "UnitLine " + (unitLine ? "[accent]Enabled[]" : "[gray]Disabled[]"))));
unitBtn.addListener(new Tooltip(l -> l.label(() -> bundle.get("hud.unitline") + " " + (unitLine ? bundle.get("hud.enabled") : bundle.get("hud.disabled")))));
unitBtn.clicked(() -> {
unitLine = !unitLine;
unitBtn.setChecked(unitLine);
});
logicBtn.addListener(new Tooltip(l -> l.label(() -> "LogicLine " + (logicLine ? "[accent]Enabled[]" : "[gray]Disabled[]"))));
logicBtn.addListener(new Tooltip(l -> l.label(() -> bundle.get("hud.logicline") + " " + (logicLine ? bundle.get("hud.enabled") : bundle.get("hud.disabled")))));
logicBtn.clicked(() -> {
logicLine = !logicLine;
logicBtn.setChecked(logicLine);

View File

@@ -253,7 +253,7 @@ public class OverDrawer {
Lines.stroke(1f, Pal.placing);
Lines.dashLine(x1, y1, x2, y2, segs);
Fonts.outline.draw(Strings.fixed(to.dst(from.x(), from.y()), 2) + " (" + segs + "tiles)",
Fonts.outline.draw(Strings.fixed(to.dst(from.x(), from.y()), 2) + " (" + segs + " " + bundle.get("tiles") + ")",
from.x() + Angles.trnsx(Angles.angle(from.x(), from.y(), to.getX(), to.getY()), player.unit().hitSize() + Math.min(segs, 6) * 8f),
from.y() + Angles.trnsy(Angles.angle(from.x(), from.y(), to.getX(), to.getY()), player.unit().hitSize() + Math.min(segs, 6) * 8f) - 3,
Pal.accent, 0.25f, false, Align.center);

View File

@@ -93,12 +93,12 @@ public class SettingS {
}
public void init(){
BaseDialog dialog = new BaseDialog("UnitInfo Setting");
BaseDialog dialog = new BaseDialog(bundle.get("setting.shar-title"));
dialog.addCloseButton();
sharset = new SettingsMenuDialog.SettingsTable();
dialog.cont.center().add(new Table(t -> t.pane(sharset).grow().row()));
ui.settings.shown(() -> {
Table settingUi = (Table)((Group)((Group)(ui.settings.getChildren().get(1))).getChildren().get(0)).getChildren().get(0); //This looks so stupid lol - lmfao
Table settingUi = (Table)((Group)((Group)(ui.settings.getChildren().get(1))).getChildren().get(0)).getChildren().get(0); //This looks so stupid lol - lmfao - hehe
settingUi.row();
settingUi.button(bundle.get("setting.shar-title"), Styles.cleart, dialog::show);
});
@@ -106,9 +106,9 @@ public class SettingS {
Seq<Seq<SharSetting>> settingSeq = new Seq<>();
Seq<SharSetting> tapSeq = new Seq<>();
addGraphicSlideSetting("barstyle", 0, 0, 5, 1, s -> s == 0 ? "default bar" : s + "th bar", tapSeq);
addGraphicSlideSetting("barstyle", 0, 0, 5, 1, s -> s == 0 ? bundle.get("default-bar") : s + bundle.get("th-bar"), tapSeq);
addGraphicSlideSetting("infoUiScale", mobile ? 25 : 50, 25, 100, 5, s -> s + "%", tapSeq);
addGraphicSlideSetting("coreItemCheckRate", 60, 6, 180, 6, s -> Strings.fixed(s/60f,1) + "sec", tapSeq);
addGraphicSlideSetting("coreItemCheckRate", 60, 6, 180, 6, s -> Strings.fixed(s/60f,1) + bundle.get("sec"), tapSeq);
addGraphicTypeSetting("wavemax", 0, 200,100, true, () -> true, s -> s + "waves", tapSeq);
addGraphicCheckSetting("infoui", true, tapSeq);
addGraphicCheckSetting("pastwave", false, tapSeq);

View File

@@ -21,8 +21,7 @@ import mindustry.graphics.Pal;
import mindustry.ui.Styles;
import mindustry.ui.dialogs.*;
import static arc.Core.input;
import static arc.Core.scene;
import static arc.Core.*;
import static mindustry.Vars.*;
import static mindustry.Vars.ui;
@@ -41,7 +40,7 @@ public class SchemDisplay extends Table {
void setSchemTable() {
clear();
right();
button("Schematic List", Icon.downOpen, Styles.squareTogglet, () -> schemShown = !schemShown).width(160f).height(60f).checked(b -> {
button(bundle.get("hud.schematic-list"), Icon.downOpen, Styles.squareTogglet, () -> schemShown = !schemShown).width(160f).height(60f).checked(b -> {
Image image = (Image)b.getCells().first().get();
image.setDrawable(schemShown ? Icon.upOpen : Icon.downOpen);
return schemShown;
@@ -84,7 +83,7 @@ public class SchemDisplay extends Table {
p.table(tt -> {
firstSchematic = null;
tt.button("Import", Icon.download, this::showImport).width(160f).height(64f).row();
tt.button("@editor.import", Icon.download, this::showImport).width(160f).height(64f).row();
for(Schematic s : schematics.all()){
if(selectedTags.any() && !s.labels.containsAll(selectedTags)) continue;
if(firstSchematic == null) firstSchematic = s;
@@ -177,7 +176,7 @@ public class SchemDisplay extends Table {
}
if(firstSchematic == null){
tt.add("@none");
tt.add(bundle.get("none"));
}
});
}).grow().get();

View File

@@ -74,7 +74,7 @@ public class WaveDisplay extends Table {
t.marginLeft(Scl.scl(modUiScale) * 3 * 8f);
if(settings.getBool("emptywave") && state.rules.spawns.find(g -> g.getSpawned(j) > 0) == null) {
t.center();
Label label = new Label("[lightgray]<Empty>[]");
Label label = new Label(bundle.get("empty"));
label.setFontScale(Scl.scl(modUiScale));
t.add(label);
return;