mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-12 19:09:34 +07:00
Minor UI style tweaks
This commit is contained in:
parent
3d0a1868c6
commit
36ecb45fb4
Binary file not shown.
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 326 B |
Binary file not shown.
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 318 B |
@ -24,7 +24,7 @@ import static mindustry.gen.Tex.*;
|
||||
@StyleDefaults
|
||||
public class Styles{
|
||||
//TODO all these names are inconsistent and not descriptive
|
||||
public static Drawable black, black9, black8, black6, black3, black5, none, flatDown, flatOver, accentDrawable;
|
||||
public static Drawable black, black9, black8, black6, black3, black5, grayPanel, none, flatDown, flatOver, accentDrawable;
|
||||
|
||||
public static ButtonStyle defaultb, underlineb;
|
||||
|
||||
@ -32,6 +32,8 @@ public class Styles{
|
||||
public static TextButtonStyle defaultt,
|
||||
/** Flat, square, opaque. */
|
||||
flatt,
|
||||
/** Flat, square, opaque, gray. */
|
||||
grayt,
|
||||
/** Flat, square, toggleable. */
|
||||
flatTogglet,
|
||||
/** Flat, square, gray border.*/
|
||||
@ -102,6 +104,7 @@ public class Styles{
|
||||
black5 = whiteui.tint(0f, 0f, 0f, 0.5f);
|
||||
black3 = whiteui.tint(0f, 0f, 0f, 0.3f);
|
||||
none = whiteui.tint(0f, 0f, 0f, 0f);
|
||||
grayPanel = whiteui.tint(Pal.darkestGray);
|
||||
flatDown = createFlatDown();
|
||||
flatOver = whiteui.tint(Color.valueOf("454545"));
|
||||
accentDrawable = whiteui.tint(Pal.accent);
|
||||
@ -144,6 +147,14 @@ public class Styles{
|
||||
down = flatOver;
|
||||
up = black;
|
||||
}};
|
||||
grayt = new TextButtonStyle(){{
|
||||
over = flatOver;
|
||||
font = Fonts.def;
|
||||
fontColor = Color.white;
|
||||
disabledFontColor = Color.lightGray;
|
||||
down = flatOver;
|
||||
up = grayPanel;
|
||||
}};
|
||||
logict = new TextButtonStyle(){{
|
||||
over = flatOver;
|
||||
font = Fonts.def;
|
||||
|
@ -40,7 +40,7 @@ public class CustomGameDialog extends BaseDialog{
|
||||
float images = 146f;
|
||||
|
||||
ImageButtonStyle style = new ImageButtonStyle(){{
|
||||
up = Styles.none;
|
||||
up = Styles.grayPanel;
|
||||
down = Styles.flatOver;
|
||||
over = Styles.flatOver;
|
||||
disabled = Styles.none;
|
||||
|
@ -103,7 +103,7 @@ public class LoadDialog extends BaseDialog{
|
||||
|
||||
any = true;
|
||||
|
||||
TextButton button = new TextButton("", Styles.flatt);
|
||||
TextButton button = new TextButton("", Styles.grayt);
|
||||
button.getLabel().remove();
|
||||
button.clearChildren();
|
||||
|
||||
|
@ -180,7 +180,7 @@ public class MapsDialog extends BaseDialog{
|
||||
mapTable.row();
|
||||
}
|
||||
|
||||
TextButton button = mapTable.button("", Styles.flatt, () -> showMapInfo(map)).width(mapsize).pad(8).get();
|
||||
TextButton button = mapTable.button("", Styles.grayt, () -> showMapInfo(map)).width(mapsize).pad(8).get();
|
||||
button.clearChildren();
|
||||
button.margin(9);
|
||||
button.add(map.name()).width(mapsize - 18f).center().get().setEllipsis(true);
|
||||
|
@ -77,9 +77,8 @@ public class Reconstructor extends UnitBlock{
|
||||
table.row();
|
||||
for(var upgrade : upgrades){
|
||||
if(upgrade[0].unlockedNow() && upgrade[1].unlockedNow()){
|
||||
table.table(Tex.whiteui, t -> {
|
||||
table.table(Styles.grayPanel, t -> {
|
||||
t.left();
|
||||
t.setColor(Pal.darkestGray);
|
||||
|
||||
t.image(upgrade[0].uiIcon).size(40).pad(10f).left();
|
||||
t.table(info -> {
|
||||
@ -88,16 +87,13 @@ public class Reconstructor extends UnitBlock{
|
||||
}).pad(10).left();
|
||||
}).fill().padTop(5).padBottom(5);
|
||||
|
||||
table.table(t -> {
|
||||
t.setBackground(Tex.whiteui);
|
||||
t.setColor(Pal.darkestGray);
|
||||
table.table(Styles.grayPanel, t -> {
|
||||
|
||||
t.image(Icon.right).color(Pal.darkishGray).size(40).pad(10f);
|
||||
}).fill().padTop(5).padBottom(5);
|
||||
|
||||
table.table(Tex.whiteui, t -> {
|
||||
table.table(Styles.grayPanel, t -> {
|
||||
t.left();
|
||||
t.setColor(Pal.darkestGray);
|
||||
|
||||
t.image(upgrade[1].uiIcon).size(40).pad(10f).right();
|
||||
t.table(info -> {
|
||||
|
@ -136,9 +136,7 @@ public class UnitAssembler extends PayloadBlock{
|
||||
int tier = 0;
|
||||
for(var plan : plans){
|
||||
int ttier = tier;
|
||||
table.table(t -> {
|
||||
t.setBackground(Tex.whiteui);
|
||||
t.setColor(Pal.darkestGray);
|
||||
table.table(Styles.grayPanel, t -> {
|
||||
|
||||
if(plan.unit.isBanned()){
|
||||
t.image(Icon.cancel).color(Pal.remove).size(40).pad(10);
|
||||
@ -146,7 +144,7 @@ public class UnitAssembler extends PayloadBlock{
|
||||
}
|
||||
|
||||
if(plan.unit.unlockedNow()){
|
||||
t.image(plan.unit.uiIcon).size(40).pad(10f).left();
|
||||
t.image(plan.unit.uiIcon).scaling(Scaling.fit).size(40).pad(10f).left();
|
||||
t.table(info -> {
|
||||
info.defaults().left();
|
||||
info.add(plan.unit.localizedName);
|
||||
|
@ -109,9 +109,7 @@ public class UnitFactory extends UnitBlock{
|
||||
table.row();
|
||||
|
||||
for(var plan : plans){
|
||||
table.table(t -> {
|
||||
t.setBackground(Tex.whiteui);
|
||||
t.setColor(Pal.darkestGray);
|
||||
table.table(Styles.grayPanel, t -> {
|
||||
|
||||
if(plan.unit.isBanned()){
|
||||
t.image(Icon.cancel).color(Pal.remove).size(40);
|
||||
|
Loading…
Reference in New Issue
Block a user