WIP style refactoring
This commit is contained in:
@@ -445,7 +445,7 @@ public class CustomRulesDialog extends BaseDialog{
|
||||
for(Weather weather : content.<Weather>getBy(ContentType.weather)){
|
||||
if(weather.hidden) continue;
|
||||
|
||||
t.button(weather.localizedName, Styles.cleart, () -> {
|
||||
t.button(weather.localizedName, Styles.flatt, () -> {
|
||||
rules.weather.add(new WeatherEntry(weather));
|
||||
rebuild[0].run();
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public class LoadDialog extends BaseDialog{
|
||||
|
||||
any = true;
|
||||
|
||||
TextButton button = new TextButton("", Styles.cleart);
|
||||
TextButton button = new TextButton("", Styles.flatt);
|
||||
button.getLabel().remove();
|
||||
button.clearChildren();
|
||||
|
||||
|
||||
@@ -89,12 +89,12 @@ public class LoadoutDialog extends BaseDialog{
|
||||
for(ItemStack stack : stacks){
|
||||
items.table(Tex.pane, t -> {
|
||||
t.margin(4).marginRight(8).left();
|
||||
t.button("-", Styles.cleart, () -> {
|
||||
t.button("-", Styles.flatt, () -> {
|
||||
stack.amount = Math.max(stack.amount - step(stack.amount), 0);
|
||||
updater.run();
|
||||
}).size(bsize);
|
||||
|
||||
t.button("+", Styles.cleart, () -> {
|
||||
t.button("+", Styles.flatt, () -> {
|
||||
stack.amount = Math.min(stack.amount + step(stack.amount), capacity);
|
||||
updater.run();
|
||||
}).size(bsize);
|
||||
|
||||
@@ -180,7 +180,7 @@ public class MapsDialog extends BaseDialog{
|
||||
mapTable.row();
|
||||
}
|
||||
|
||||
TextButton button = mapTable.button("", Styles.cleart, () -> showMapInfo(map)).width(mapsize).pad(8).get();
|
||||
TextButton button = mapTable.button("", Styles.flatt, () -> showMapInfo(map)).width(mapsize).pad(8).get();
|
||||
button.clearChildren();
|
||||
button.margin(9);
|
||||
button.add(map.name()).width(mapsize - 18f).center().get().setEllipsis(true);
|
||||
|
||||
@@ -160,7 +160,7 @@ public class ModsDialog extends BaseDialog{
|
||||
buttons.button("@mod.import", Icon.add, style, () -> {
|
||||
BaseDialog dialog = new BaseDialog("@mod.import");
|
||||
|
||||
TextButtonStyle bstyle = Styles.cleart;
|
||||
TextButtonStyle bstyle = Styles.flatt;
|
||||
|
||||
dialog.cont.table(Tex.button, t -> {
|
||||
t.defaults().size(300f, 70f);
|
||||
|
||||
@@ -11,6 +11,7 @@ import arc.scene.actions.*;
|
||||
import arc.scene.event.*;
|
||||
import arc.scene.style.*;
|
||||
import arc.scene.ui.*;
|
||||
import arc.scene.ui.TextButton.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
@@ -30,6 +31,7 @@ import mindustry.ui.layout.TreeLayout.*;
|
||||
import java.util.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
import static mindustry.gen.Tex.*;
|
||||
|
||||
public class ResearchDialog extends BaseDialog{
|
||||
public static boolean debugShowRequirements = false;
|
||||
@@ -667,7 +669,14 @@ public class ResearchDialog extends BaseDialog{
|
||||
|
||||
if(mobile && locked(node)){
|
||||
b.row();
|
||||
b.button("@research", Icon.ok, Styles.nodet, () -> spend(node))
|
||||
b.button("@research", Icon.ok, new TextButtonStyle(){{
|
||||
disabled = Tex.button;
|
||||
font = Fonts.def;
|
||||
fontColor = Color.white;
|
||||
disabledFontColor = Color.gray;
|
||||
up = buttonOver;
|
||||
over = buttonDown;
|
||||
}}, () -> spend(node))
|
||||
.disabled(i -> !canSpend(node)).growX().height(44f).colspan(3);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -258,7 +258,7 @@ public class SchematicsDialog extends BaseDialog{
|
||||
dialog.cont.pane(p -> {
|
||||
p.margin(10f);
|
||||
p.table(Tex.button, t -> {
|
||||
TextButtonStyle style = Styles.cleart;
|
||||
TextButtonStyle style = Styles.flatt;
|
||||
t.defaults().size(280f, 60f).left();
|
||||
t.row();
|
||||
t.button("@schematic.copy.import", Icon.copy, style, () -> {
|
||||
@@ -309,7 +309,7 @@ public class SchematicsDialog extends BaseDialog{
|
||||
dialog.cont.pane(p -> {
|
||||
p.margin(10f);
|
||||
p.table(Tex.button, t -> {
|
||||
TextButtonStyle style = Styles.cleart;
|
||||
TextButtonStyle style = Styles.flatt;
|
||||
t.defaults().size(280f, 60f).left();
|
||||
if(steam && !s.hasSteamID()){
|
||||
t.button("@schematic.shareworkshop", Icon.book, style,
|
||||
|
||||
@@ -85,7 +85,7 @@ public class SettingsMenuDialog extends BaseDialog{
|
||||
|
||||
dataDialog.cont.table(Tex.button, t -> {
|
||||
t.defaults().size(280f, 60f).left();
|
||||
TextButtonStyle style = Styles.cleart;
|
||||
TextButtonStyle style = Styles.flatt;
|
||||
|
||||
t.button("@settings.cleardata", Icon.trash, style, () -> ui.showConfirm("@confirm", "@settings.clearall.confirm", () -> {
|
||||
ObjectMap<String, Object> map = new ObjectMap<>();
|
||||
@@ -248,7 +248,7 @@ public class SettingsMenuDialog extends BaseDialog{
|
||||
void rebuildMenu(){
|
||||
menu.clearChildren();
|
||||
|
||||
TextButtonStyle style = Styles.cleart;
|
||||
TextButtonStyle style = Styles.flatt;
|
||||
|
||||
menu.defaults().size(300f, 60f);
|
||||
menu.button("@settings.game", style, () -> visible(0));
|
||||
|
||||
Reference in New Issue
Block a user