mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-02 03:00:29 +03:00
More UI fixes
This commit is contained in:
@@ -10,6 +10,7 @@ import arc.scene.ui.layout.*;
|
||||
import arc.util.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.input.*;
|
||||
import mindustry.ui.*;
|
||||
|
||||
import java.util.*;
|
||||
@@ -118,7 +119,7 @@ public class KeybindDialog extends Dialog{
|
||||
openDialog(keybind);
|
||||
}).size(bw, bh);
|
||||
}
|
||||
table.button("@settings.resetKey", tstyle, keybind::resetToDefault).disabled(t -> keybind.isDefault()).size(bw, bh).pad(2f).padLeft(4f);
|
||||
if(keybind != Binding.menu) table.button("@settings.resetKey", tstyle, keybind::resetToDefault).disabled(t -> keybind.isDefault()).size(bw, bh).pad(2f).padLeft(4f);
|
||||
table.row();
|
||||
}
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ public class PlacementFragment{
|
||||
line.left();
|
||||
line.image(stack.item.uiIcon).size(8 * 2);
|
||||
line.add(stack.item.localizedName).maxWidth(140f).fillX().color(Color.lightGray).padLeft(2).left().get().setEllipsis(true);
|
||||
line.labelWrap(() -> {
|
||||
line.label(() -> {
|
||||
Building core = player.core();
|
||||
int stackamount = Math.round(stack.amount * state.rules.buildCostMultiplier);
|
||||
if(core == null || state.rules.infiniteResources) return "*/" + stackamount;
|
||||
@@ -413,7 +413,7 @@ public class PlacementFragment{
|
||||
String color = (amount < stackamount / 2f ? "[scarlet]" : amount < stackamount ? "[accent]" : "[white]");
|
||||
|
||||
return color + UI.formatAmount(amount) + "[white]/" + stackamount;
|
||||
}).padLeft(5);
|
||||
}).padLeft(5).wrap(true); //TODO: in practice wrapping does nothing and items will go offscreen, is this fine?
|
||||
}).left();
|
||||
req.row();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user