This commit is contained in:
Anuken
2019-11-14 18:48:12 -05:00
parent 618a050414
commit 1f583dc7a2
4 changed files with 25 additions and 23 deletions

View File

@@ -217,21 +217,23 @@ public class WaveInfoDialog extends FloatingDialog{
void showUpdate(SpawnGroup group){
FloatingDialog dialog = new FloatingDialog("");
dialog.setFillParent(false);
int i = 0;
for(UnitType type : content.units()){
dialog.cont.addButton(t -> {
t.left();
t.addImage(type.icon(io.anuke.mindustry.ui.Cicon.medium)).size(40f).padRight(2f);
t.add(type.localizedName);
}, () -> {
lastType = type;
group.type = type;
dialog.hide();
buildGroups();
}).pad(2).margin(12f).fillX();
if(++i % 3 == 0) dialog.cont.row();
}
dialog.setFillParent(true);
dialog.cont.pane(p -> {
int i = 0;
for(UnitType type : content.units()){
p.addButton(t -> {
t.left();
t.addImage(type.icon(io.anuke.mindustry.ui.Cicon.medium)).size(40f).padRight(2f);
t.add(type.localizedName);
}, () -> {
lastType = type;
group.type = type;
dialog.hide();
buildGroups();
}).pad(2).margin(12f).fillX();
if(++i % 3 == 0) p.row();
}
});
dialog.show();
}

View File

@@ -67,7 +67,7 @@ public class OverlayRenderer{
if(!rect.setSize(Core.camera.width * 0.9f, Core.camera.height * 0.9f)
.setCenter(Core.camera.position.x, Core.camera.position.y).contains(mechpad.x, mechpad.y)){
Tmp.v1.set(mechpad.worldx(), mechpad.worldy()).sub(Core.camera.position.x, Core.camera.position.y).setLength(indicatorLength);
Tmp.v1.set(mechpad.drawx(), mechpad.drawy()).sub(Core.camera.position.x, Core.camera.position.y).setLength(indicatorLength);
Lines.stroke(2f, ((MechPad) mechpad.block()).mech.engineColor);
Lines.lineAngle(Core.camera.position.x + Tmp.v1.x, Core.camera.position.y + Tmp.v1.y, Tmp.v1.angle(), 0.5f);

View File

@@ -50,9 +50,9 @@ public class DesktopInput extends InputHandler{
b.defaults().left();
b.label(() -> Core.bundle.format(!player.isBuilding ? "resumebuilding" : "pausebuilding", Core.keybinds.get(Binding.pause_building).key.toString())).style(Styles.outlineLabel);
b.row();
b.add(Core.bundle.format("cancelbuilding", Core.keybinds.get(Binding.clear_building).key.toString())).style(Styles.outlineLabel);
b.label(() -> Core.bundle.format("cancelbuilding", Core.keybinds.get(Binding.clear_building).key.toString())).style(Styles.outlineLabel);
b.row();
b.add(Core.bundle.format("selectschematic", Core.keybinds.get(Binding.schematic_select).key.toString())).style(Styles.outlineLabel);
b.label(() -> Core.bundle.format("selectschematic", Core.keybinds.get(Binding.schematic_select).key.toString())).style(Styles.outlineLabel);
}).margin(10f);
});
@@ -61,7 +61,7 @@ public class DesktopInput extends InputHandler{
t.bottom();
t.table(Styles.black6, b -> {
b.defaults().left();
b.add(Core.bundle.format("schematic.flip",
b.label( () -> Core.bundle.format("schematic.flip",
Core.keybinds.get(Binding.schematic_flip_x).key.toString(),
Core.keybinds.get(Binding.schematic_flip_y).key.toString())).style(Styles.outlineLabel);
b.row();

View File

@@ -32,14 +32,14 @@ public class JoinDialog extends FloatingDialog{
loadServers();
buttons.add().width(60f);
buttons.add().growX();
if(!steam) buttons.add().width(60f);
buttons.add().growX().width(-1);
addCloseButton();
buttons.add().growX();
buttons.add().growX().width(-1);
if(!steam){
buttons.addButton("?", () -> ui.showInfo("$join.info")).size(60f, 64f);
buttons.addButton("?", () -> ui.showInfo("$join.info")).size(60f, 64f).width(-1);
}
add = new FloatingDialog("$joingame.title");