Styles documented
This commit is contained in:
Binary file not shown.
@@ -480,7 +480,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
Cons<EditorTool> addTool = tool -> {
|
Cons<EditorTool> addTool = tool -> {
|
||||||
|
|
||||||
ImageButton button = new ImageButton(ui.getIcon(tool.name()), Styles.clearTogglei);
|
ImageButton button = new ImageButton(ui.getIcon(tool.name()), Styles.squareTogglei);
|
||||||
button.clicked(() -> {
|
button.clicked(() -> {
|
||||||
view.setTool(tool);
|
view.setTool(tool);
|
||||||
if(lastTable[0] != null){
|
if(lastTable[0] != null){
|
||||||
@@ -516,7 +516,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
table.button(b -> {
|
table.button(b -> {
|
||||||
b.left();
|
b.left();
|
||||||
b.marginLeft(6);
|
b.marginLeft(6);
|
||||||
b.setStyle(Styles.clearTogglet);
|
b.setStyle(Styles.flatTogglet);
|
||||||
b.add(Core.bundle.get("toolmode." + name)).left();
|
b.add(Core.bundle.get("toolmode." + name)).left();
|
||||||
b.row();
|
b.row();
|
||||||
b.add(Core.bundle.get("toolmode." + name + ".description")).color(Color.lightGray).left();
|
b.add(Core.bundle.get("toolmode." + name + ".description")).color(Color.lightGray).left();
|
||||||
@@ -556,16 +556,16 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
tools.defaults().size(size, size);
|
tools.defaults().size(size, size);
|
||||||
|
|
||||||
tools.button(Icon.menu, Styles.cleari, menu::show);
|
tools.button(Icon.menu, Styles.flati, menu::show);
|
||||||
|
|
||||||
ImageButton grid = tools.button(Icon.grid, Styles.clearTogglei, () -> view.setGrid(!view.isGrid())).get();
|
ImageButton grid = tools.button(Icon.grid, Styles.squareTogglei, () -> view.setGrid(!view.isGrid())).get();
|
||||||
|
|
||||||
addTool.get(EditorTool.zoom);
|
addTool.get(EditorTool.zoom);
|
||||||
|
|
||||||
tools.row();
|
tools.row();
|
||||||
|
|
||||||
ImageButton undo = tools.button(Icon.undo, Styles.cleari, editor::undo).get();
|
ImageButton undo = tools.button(Icon.undo, Styles.flati, editor::undo).get();
|
||||||
ImageButton redo = tools.button(Icon.redo, Styles.cleari, editor::redo).get();
|
ImageButton redo = tools.button(Icon.redo, Styles.flati, editor::redo).get();
|
||||||
|
|
||||||
addTool.get(EditorTool.pick);
|
addTool.get(EditorTool.pick);
|
||||||
|
|
||||||
@@ -587,7 +587,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
addTool.get(EditorTool.fill);
|
addTool.get(EditorTool.fill);
|
||||||
addTool.get(EditorTool.spray);
|
addTool.get(EditorTool.spray);
|
||||||
|
|
||||||
ImageButton rotate = tools.button(Icon.right, Styles.cleari, () -> editor.rotation = (editor.rotation + 1) % 4).get();
|
ImageButton rotate = tools.button(Icon.right, Styles.flati, () -> editor.rotation = (editor.rotation + 1) % 4).get();
|
||||||
rotate.getImage().update(() -> {
|
rotate.getImage().update(() -> {
|
||||||
rotate.getImage().setRotation(editor.rotation * 90);
|
rotate.getImage().setRotation(editor.rotation * 90);
|
||||||
rotate.getImage().setOrigin(Align.center);
|
rotate.getImage().setOrigin(Align.center);
|
||||||
@@ -605,7 +605,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for(Team team : Team.baseTeams){
|
for(Team team : Team.baseTeams){
|
||||||
ImageButton button = new ImageButton(Tex.whiteui, Styles.clearTogglePartiali);
|
ImageButton button = new ImageButton(Tex.whiteui, Styles.clearNoneTogglei);
|
||||||
button.margin(4f);
|
button.margin(4f);
|
||||||
button.getImageCell().grow();
|
button.getImageCell().grow();
|
||||||
button.getStyle().imageUpColor = team.color;
|
button.getStyle().imageUpColor = team.color;
|
||||||
@@ -788,7 +788,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|| (!searchText.isEmpty() && !block.localizedName.toLowerCase().contains(searchText.toLowerCase()))
|
|| (!searchText.isEmpty() && !block.localizedName.toLowerCase().contains(searchText.toLowerCase()))
|
||||||
) continue;
|
) continue;
|
||||||
|
|
||||||
ImageButton button = new ImageButton(Tex.whiteui, Styles.clearTogglei);
|
ImageButton button = new ImageButton(Tex.whiteui, Styles.squareTogglei);
|
||||||
button.getStyle().imageUp = new TextureRegionDrawable(region);
|
button.getStyle().imageUp = new TextureRegionDrawable(region);
|
||||||
button.clicked(() -> editor.drawBlock = block);
|
button.clicked(() -> editor.drawBlock = block);
|
||||||
button.resizeImage(8 * 4f);
|
button.resizeImage(8 * 4f);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class SectorGenerateDialog extends BaseDialog{
|
|||||||
for(var plan : content.planets()){
|
for(var plan : content.planets()){
|
||||||
if(plan.generator == null || plan.sectors.size == 0) continue;
|
if(plan.generator == null || plan.sectors.size == 0) continue;
|
||||||
|
|
||||||
p.button(plan.localizedName, Styles.clearTogglet, () -> {
|
p.button(plan.localizedName, Styles.flatTogglet, () -> {
|
||||||
planet = plan;
|
planet = plan;
|
||||||
sector = Math.min(sector, planet.sectors.size - 1);
|
sector = Math.min(sector, planet.sectors.size - 1);
|
||||||
seed = 0;
|
seed = 0;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.cont.table(Tex.button, t -> {
|
dialog.cont.table(Tex.button, t -> {
|
||||||
for(Sort s : Sort.all){
|
for(Sort s : Sort.all){
|
||||||
t.button("@waves.sort." + s, Styles.clearTogglet, () -> {
|
t.button("@waves.sort." + s, Styles.flatTogglet, () -> {
|
||||||
sort = s;
|
sort = s;
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
buildGroups();
|
buildGroups();
|
||||||
@@ -346,7 +346,7 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(var spawn : spawner.getSpawns()){
|
for(var spawn : spawner.getSpawns()){
|
||||||
p.button(spawn.x + ", " + spawn.y, Styles.clearTogglet, () -> {
|
p.button(spawn.x + ", " + spawn.y, Styles.flatTogglet, () -> {
|
||||||
group.spawn = Point2.pack(spawn.x, spawn.y);
|
group.spawn = Point2.pack(spawn.x, spawn.y);
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).size(110f, 45f).checked(spawn.pos() == group.spawn);
|
}).size(110f, 45f).checked(spawn.pos() == group.spawn);
|
||||||
@@ -361,7 +361,7 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p.button("@waves.spawn.all", Styles.clearTogglet, () -> {
|
p.button("@waves.spawn.all", Styles.flatTogglet, () -> {
|
||||||
group.spawn = -1;
|
group.spawn = -1;
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).size(110f, 45f).checked(-1 == group.spawn);
|
}).size(110f, 45f).checked(-1 == group.spawn);
|
||||||
|
|||||||
@@ -457,19 +457,19 @@ public class DesktopInput extends InputHandler{
|
|||||||
table.row();
|
table.row();
|
||||||
table.left().margin(0f).defaults().size(48f).left();
|
table.left().margin(0f).defaults().size(48f).left();
|
||||||
|
|
||||||
table.button(Icon.paste, Styles.clearPartiali, () -> {
|
table.button(Icon.paste, Styles.clearNonei, () -> {
|
||||||
ui.schematics.show();
|
ui.schematics.show();
|
||||||
}).tooltip("@schematics");
|
}).tooltip("@schematics");
|
||||||
|
|
||||||
table.button(Icon.book, Styles.clearPartiali, () -> {
|
table.button(Icon.book, Styles.clearNonei, () -> {
|
||||||
ui.database.show();
|
ui.database.show();
|
||||||
}).tooltip("@database");
|
}).tooltip("@database");
|
||||||
|
|
||||||
table.button(Icon.tree, Styles.clearPartiali, () -> {
|
table.button(Icon.tree, Styles.clearNonei, () -> {
|
||||||
ui.research.show();
|
ui.research.show();
|
||||||
}).visible(() -> state.isCampaign()).tooltip("@research");
|
}).visible(() -> state.isCampaign()).tooltip("@research");
|
||||||
|
|
||||||
table.button(Icon.map, Styles.clearPartiali, () -> {
|
table.button(Icon.map, Styles.clearNonei, () -> {
|
||||||
ui.planet.show();
|
ui.planet.show();
|
||||||
}).visible(() -> state.isCampaign()).tooltip("@planetmap");
|
}).visible(() -> state.isCampaign()).tooltip("@planetmap");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,18 +189,18 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
table.row();
|
table.row();
|
||||||
table.left().margin(0f).defaults().size(48f);
|
table.left().margin(0f).defaults().size(48f);
|
||||||
|
|
||||||
table.button(Icon.hammer, Styles.clearTogglePartiali, () -> {
|
table.button(Icon.hammer, Styles.clearNoneTogglei, () -> {
|
||||||
mode = mode == breaking ? block == null ? none : placing : breaking;
|
mode = mode == breaking ? block == null ? none : placing : breaking;
|
||||||
lastBlock = block;
|
lastBlock = block;
|
||||||
}).update(l -> l.setChecked(mode == breaking)).name("breakmode");
|
}).update(l -> l.setChecked(mode == breaking)).name("breakmode");
|
||||||
|
|
||||||
//diagonal swap button
|
//diagonal swap button
|
||||||
table.button(Icon.diagonal, Styles.clearTogglePartiali, () -> {
|
table.button(Icon.diagonal, Styles.clearNoneTogglei, () -> {
|
||||||
Core.settings.put("swapdiagonal", !Core.settings.getBool("swapdiagonal"));
|
Core.settings.put("swapdiagonal", !Core.settings.getBool("swapdiagonal"));
|
||||||
}).update(l -> l.setChecked(Core.settings.getBool("swapdiagonal")));
|
}).update(l -> l.setChecked(Core.settings.getBool("swapdiagonal")));
|
||||||
|
|
||||||
//rotate button
|
//rotate button
|
||||||
table.button(Icon.right, Styles.clearTogglePartiali, () -> {
|
table.button(Icon.right, Styles.clearNoneTogglei, () -> {
|
||||||
if(block != null && block.rotate){
|
if(block != null && block.rotate){
|
||||||
rotation = Mathf.mod(rotation + 1, 4);
|
rotation = Mathf.mod(rotation + 1, 4);
|
||||||
}else{
|
}else{
|
||||||
@@ -219,7 +219,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
});
|
});
|
||||||
|
|
||||||
//confirm button
|
//confirm button
|
||||||
table.button(Icon.ok, Styles.clearPartiali, () -> {
|
table.button(Icon.ok, Styles.clearNonei, () -> {
|
||||||
for(BuildPlan plan : selectPlans){
|
for(BuildPlan plan : selectPlans){
|
||||||
Tile tile = plan.tile();
|
Tile tile = plan.tile();
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
t.table(Tex.pane, b -> {
|
t.table(Tex.pane, b -> {
|
||||||
b.defaults().size(50f);
|
b.defaults().size(50f);
|
||||||
|
|
||||||
ImageButtonStyle style = Styles.clearPartiali;
|
ImageButtonStyle style = Styles.clearNonei;
|
||||||
|
|
||||||
b.button(Icon.save, style, this::showSchematicSave).disabled(f -> lastSchematic == null || lastSchematic.file != null);
|
b.button(Icon.save, style, this::showSchematicSave).disabled(f -> lastSchematic == null || lastSchematic.file != null);
|
||||||
b.button(Icon.cancel, style, () -> {
|
b.button(Icon.cancel, style, () -> {
|
||||||
|
|||||||
@@ -452,7 +452,9 @@ public class LCanvas extends Table{
|
|||||||
public JumpCurve curve;
|
public JumpCurve curve;
|
||||||
|
|
||||||
public JumpButton(Prov<StatementElem> getter, Cons<StatementElem> setter){
|
public JumpButton(Prov<StatementElem> getter, Cons<StatementElem> setter){
|
||||||
super(Tex.logicNode, Styles.colori);
|
super(Tex.logicNode, new ImageButtonStyle(){{
|
||||||
|
imageUpColor = Color.white;
|
||||||
|
}});
|
||||||
|
|
||||||
to = getter;
|
to = getter;
|
||||||
addListener(listener = new ClickListener());
|
addListener(listener = new ClickListener());
|
||||||
|
|||||||
@@ -491,7 +491,7 @@ public class LStatements{
|
|||||||
int c = 0;
|
int c = 0;
|
||||||
for(Item item : Vars.content.items()){
|
for(Item item : Vars.content.items()){
|
||||||
if(!item.unlockedNow()) continue;
|
if(!item.unlockedNow()) continue;
|
||||||
i.button(new TextureRegionDrawable(item.uiIcon), Styles.cleari, iconSmall, () -> {
|
i.button(new TextureRegionDrawable(item.uiIcon), Styles.flati, iconSmall, () -> {
|
||||||
stype("@" + item.name);
|
stype("@" + item.name);
|
||||||
hide.run();
|
hide.run();
|
||||||
}).size(40f);
|
}).size(40f);
|
||||||
@@ -505,7 +505,7 @@ public class LStatements{
|
|||||||
int c = 0;
|
int c = 0;
|
||||||
for(Liquid item : Vars.content.liquids()){
|
for(Liquid item : Vars.content.liquids()){
|
||||||
if(!item.unlockedNow()) continue;
|
if(!item.unlockedNow()) continue;
|
||||||
i.button(new TextureRegionDrawable(item.uiIcon), Styles.cleari, iconSmall, () -> {
|
i.button(new TextureRegionDrawable(item.uiIcon), Styles.flati, iconSmall, () -> {
|
||||||
stype("@" + item.name);
|
stype("@" + item.name);
|
||||||
hide.run();
|
hide.run();
|
||||||
}).size(40f);
|
}).size(40f);
|
||||||
@@ -531,7 +531,7 @@ public class LStatements{
|
|||||||
for(int i = 0; i < tables.length; i++){
|
for(int i = 0; i < tables.length; i++){
|
||||||
int fi = i;
|
int fi = i;
|
||||||
|
|
||||||
t.button(icons[i], Styles.clearTogglei, () -> {
|
t.button(icons[i], Styles.squareTogglei, () -> {
|
||||||
selected = fi;
|
selected = fi;
|
||||||
|
|
||||||
stack.clearChildren();
|
stack.clearChildren();
|
||||||
@@ -870,7 +870,7 @@ public class LStatements{
|
|||||||
int c = 0;
|
int c = 0;
|
||||||
for(UnitType item : Vars.content.units()){
|
for(UnitType item : Vars.content.units()){
|
||||||
if(!item.unlockedNow() || item.isHidden() || !item.logicControllable) continue;
|
if(!item.unlockedNow() || item.isHidden() || !item.logicControllable) continue;
|
||||||
i.button(new TextureRegionDrawable(item.uiIcon), Styles.cleari, iconSmall, () -> {
|
i.button(new TextureRegionDrawable(item.uiIcon), Styles.flati, iconSmall, () -> {
|
||||||
type = "@" + item.name;
|
type = "@" + item.name;
|
||||||
field.setText(type);
|
field.setText(type);
|
||||||
hide.run();
|
hide.run();
|
||||||
@@ -1033,7 +1033,7 @@ public class LStatements{
|
|||||||
int c = 0;
|
int c = 0;
|
||||||
for(Item item : Vars.content.items()){
|
for(Item item : Vars.content.items()){
|
||||||
if(!item.unlockedNow()) continue;
|
if(!item.unlockedNow()) continue;
|
||||||
i.button(new TextureRegionDrawable(item.uiIcon), Styles.cleari, iconSmall, () -> {
|
i.button(new TextureRegionDrawable(item.uiIcon), Styles.flati, iconSmall, () -> {
|
||||||
ore = "@" + item.name;
|
ore = "@" + item.name;
|
||||||
rebuild(table);
|
rebuild(table);
|
||||||
hide.run();
|
hide.run();
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ public class Mods implements Loadable{
|
|||||||
d.left().marginLeft(15f);
|
d.left().marginLeft(15f);
|
||||||
for(Content c : m.erroredContent){
|
for(Content c : m.erroredContent){
|
||||||
d.add(c.minfo.sourceFile.nameWithoutExtension()).left().padRight(10);
|
d.add(c.minfo.sourceFile.nameWithoutExtension()).left().padRight(10);
|
||||||
d.button("@details", Icon.downOpen, Styles.transt, () -> {
|
d.button("@details", Icon.downOpen, Styles.cleart, () -> {
|
||||||
new Dialog(""){{
|
new Dialog(""){{
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
cont.pane(e -> e.add(c.minfo.error).wrap().grow().labelAlign(Align.center, Align.left)).grow();
|
cont.pane(e -> e.add(c.minfo.error).wrap().grow().labelAlign(Align.center, Align.left)).grow();
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class ItemsDisplay extends Table{
|
|||||||
}
|
}
|
||||||
}).scrollX(false), false).setDuration(0.3f);
|
}).scrollX(false), false).setDuration(0.3f);
|
||||||
|
|
||||||
c.button("@globalitems", Icon.downOpen, Styles.clearTogglet, col::toggle).update(t -> {
|
c.button("@globalitems", Icon.downOpen, Styles.flatTogglet, col::toggle).update(t -> {
|
||||||
t.setChecked(col.isCollapsed());
|
t.setChecked(col.isCollapsed());
|
||||||
((Image)t.getChildren().get(1)).setDrawable(col.isCollapsed() ? Icon.upOpen : Icon.downOpen);
|
((Image)t.getChildren().get(1)).setDrawable(col.isCollapsed() ? Icon.upOpen : Icon.downOpen);
|
||||||
}).padBottom(4).left().fillX().margin(12f).minWidth(200f);
|
}).padBottom(4).left().fillX().margin(12f).minWidth(200f);
|
||||||
|
|||||||
@@ -32,18 +32,57 @@ public class Styles{
|
|||||||
public static TextButtonStyle defaultt,
|
public static TextButtonStyle defaultt,
|
||||||
/** Flat, square, opaque. */
|
/** Flat, square, opaque. */
|
||||||
flatt,
|
flatt,
|
||||||
|
/** Flat, square, toggleable. */
|
||||||
|
flatTogglet,
|
||||||
|
/** Flat, square, gray border.*/
|
||||||
|
flatBordert,
|
||||||
/** No background whatsoever, only text. */
|
/** No background whatsoever, only text. */
|
||||||
nonet,
|
nonet,
|
||||||
clearPartialt,
|
/** Similar to flatToggle, but slightly tweaked for logic. */
|
||||||
clearTogglet,
|
|
||||||
logicTogglet,
|
logicTogglet,
|
||||||
clearToggleMenut,
|
/** Similar to flatToggle, but with a transparent base background. */
|
||||||
togglet, transt,
|
flatToggleMenut,
|
||||||
|
/** Toggle variant of default style. */
|
||||||
|
togglet,
|
||||||
|
/** Partially transparent square button. */
|
||||||
|
cleart,
|
||||||
|
/** Similar to flatToggle, but without a darker border. */
|
||||||
fullTogglet,
|
fullTogglet,
|
||||||
|
/** Toggle-able version of flatBorder. */
|
||||||
squareTogglet,
|
squareTogglet,
|
||||||
|
/** Special square button for logic dialogs. */
|
||||||
logict;
|
logict;
|
||||||
|
|
||||||
public static ImageButtonStyle defaulti, nodei, emptyi, emptytogglei, selecti, logici, geni, colori, accenti, cleari, clearFulli, clearPartiali, clearTogglei, clearTransi, clearToggleTransi, clearTogglePartiali;
|
/** Default image button style - gray corners at 45 degrees. */
|
||||||
|
public static ImageButtonStyle defaulti,
|
||||||
|
/** Used for research nodes in the tech tree. */
|
||||||
|
nodei,
|
||||||
|
/** No background, tints the image itself when hovered. */
|
||||||
|
emptyi,
|
||||||
|
/** Toggleable variant of emptyi */
|
||||||
|
emptyTogglei,
|
||||||
|
/** Displays border around image when selected; used in placement fragment. */
|
||||||
|
selecti,
|
||||||
|
/** Pure black version of emptyi, used for logic toolbar. */
|
||||||
|
logici,
|
||||||
|
/** Used for toolbar in map generation filters. */
|
||||||
|
geni,
|
||||||
|
/** Gray, toggleable, no backvround. */
|
||||||
|
grayi,
|
||||||
|
/** Flat, square, black background. */
|
||||||
|
flati,
|
||||||
|
/** Square border. */
|
||||||
|
squarei,
|
||||||
|
/** Square border, toggleable. */
|
||||||
|
squareTogglei,
|
||||||
|
/** No background unless focused, no border. */
|
||||||
|
clearNonei,
|
||||||
|
/** Partially transparent black background. */
|
||||||
|
cleari,
|
||||||
|
/** Toggleable variant of cleari. */
|
||||||
|
clearTogglei,
|
||||||
|
/** clearNone, but toggleable. */
|
||||||
|
clearNoneTogglei;
|
||||||
|
|
||||||
public static ScrollPaneStyle defaultPane, horizontalPane, smallPane, noBarPane;
|
public static ScrollPaneStyle defaultPane, horizontalPane, smallPane, noBarPane;
|
||||||
public static SliderStyle defaultSlider;
|
public static SliderStyle defaultSlider;
|
||||||
@@ -113,7 +152,7 @@ public class Styles{
|
|||||||
down = flatOver;
|
down = flatOver;
|
||||||
up = underlineWhite;
|
up = underlineWhite;
|
||||||
}};
|
}};
|
||||||
clearPartialt = new TextButtonStyle(){{
|
flatBordert = new TextButtonStyle(){{
|
||||||
down = flatOver;
|
down = flatOver;
|
||||||
up = pane;
|
up = pane;
|
||||||
over = flatDownBase;
|
over = flatDownBase;
|
||||||
@@ -121,7 +160,7 @@ public class Styles{
|
|||||||
fontColor = Color.white;
|
fontColor = Color.white;
|
||||||
disabledFontColor = Color.gray;
|
disabledFontColor = Color.gray;
|
||||||
}};
|
}};
|
||||||
transt = new TextButtonStyle(){{
|
cleart = new TextButtonStyle(){{
|
||||||
down = flatDown;
|
down = flatDown;
|
||||||
up = none;
|
up = none;
|
||||||
over = flatOver;
|
over = flatOver;
|
||||||
@@ -129,7 +168,7 @@ public class Styles{
|
|||||||
fontColor = Color.white;
|
fontColor = Color.white;
|
||||||
disabledFontColor = Color.gray;
|
disabledFontColor = Color.gray;
|
||||||
}};
|
}};
|
||||||
clearTogglet = new TextButtonStyle(){{
|
flatTogglet = new TextButtonStyle(){{
|
||||||
font = Fonts.def;
|
font = Fonts.def;
|
||||||
fontColor = Color.white;
|
fontColor = Color.white;
|
||||||
checked = flatDown;
|
checked = flatDown;
|
||||||
@@ -149,7 +188,7 @@ public class Styles{
|
|||||||
disabled = black;
|
disabled = black;
|
||||||
disabledFontColor = Color.gray;
|
disabledFontColor = Color.gray;
|
||||||
}};
|
}};
|
||||||
clearToggleMenut = new TextButtonStyle(){{
|
flatToggleMenut = new TextButtonStyle(){{
|
||||||
font = Fonts.def;
|
font = Fonts.def;
|
||||||
fontColor = Color.white;
|
fontColor = Color.white;
|
||||||
checked = flatDown;
|
checked = flatDown;
|
||||||
@@ -206,7 +245,7 @@ public class Styles{
|
|||||||
imageOverColor = Color.lightGray;
|
imageOverColor = Color.lightGray;
|
||||||
imageUpColor = Color.white;
|
imageUpColor = Color.white;
|
||||||
}};
|
}};
|
||||||
emptytogglei = new ImageButtonStyle(){{
|
emptyTogglei = new ImageButtonStyle(){{
|
||||||
imageCheckedColor = Color.white;
|
imageCheckedColor = Color.white;
|
||||||
imageDownColor = Color.white;
|
imageDownColor = Color.white;
|
||||||
imageUpColor = Color.gray;
|
imageUpColor = Color.gray;
|
||||||
@@ -216,33 +255,27 @@ public class Styles{
|
|||||||
up = none;
|
up = none;
|
||||||
}};
|
}};
|
||||||
logici = new ImageButtonStyle(){{
|
logici = new ImageButtonStyle(){{
|
||||||
//imageDownColor = Pal.accent;
|
|
||||||
imageUpColor = Color.black;
|
imageUpColor = Color.black;
|
||||||
}};
|
}};
|
||||||
geni = new ImageButtonStyle(){{
|
geni = new ImageButtonStyle(){{
|
||||||
imageDownColor = Pal.accent;
|
imageDownColor = Pal.accent;
|
||||||
imageUpColor = Color.black;
|
imageUpColor = Color.black;
|
||||||
}};
|
}};
|
||||||
colori = new ImageButtonStyle(){{
|
grayi = new ImageButtonStyle(){{
|
||||||
//imageDownColor = Pal.accent;
|
|
||||||
imageUpColor = Color.white;
|
|
||||||
}};
|
|
||||||
accenti = new ImageButtonStyle(){{
|
|
||||||
//imageDownColor = Pal.accent;
|
|
||||||
imageUpColor = Color.lightGray;
|
imageUpColor = Color.lightGray;
|
||||||
imageDownColor = Color.white;
|
imageDownColor = Color.white;
|
||||||
}};
|
}};
|
||||||
cleari = new ImageButtonStyle(){{
|
flati = new ImageButtonStyle(){{
|
||||||
down = flatOver;
|
down = flatOver;
|
||||||
up = black;
|
up = black;
|
||||||
over = flatOver;
|
over = flatOver;
|
||||||
}};
|
}};
|
||||||
clearFulli = new ImageButtonStyle(){{
|
squarei = new ImageButtonStyle(){{
|
||||||
down = whiteui;
|
down = whiteui;
|
||||||
up = pane;
|
up = pane;
|
||||||
over = flatDown;
|
over = flatDown;
|
||||||
}};
|
}};
|
||||||
clearPartiali = new ImageButtonStyle(){{
|
clearNonei = new ImageButtonStyle(){{
|
||||||
down = flatDown;
|
down = flatDown;
|
||||||
up = none;
|
up = none;
|
||||||
over = flatOver;
|
over = flatOver;
|
||||||
@@ -250,13 +283,13 @@ public class Styles{
|
|||||||
imageDisabledColor = Color.gray;
|
imageDisabledColor = Color.gray;
|
||||||
imageUpColor = Color.white;
|
imageUpColor = Color.white;
|
||||||
}};
|
}};
|
||||||
clearTogglei = new ImageButtonStyle(){{
|
squareTogglei = new ImageButtonStyle(){{
|
||||||
down = flatDown;
|
down = flatDown;
|
||||||
checked = flatDown;
|
checked = flatDown;
|
||||||
up = black;
|
up = black;
|
||||||
over = flatOver;
|
over = flatOver;
|
||||||
}};
|
}};
|
||||||
clearTransi = new ImageButtonStyle(){{
|
cleari = new ImageButtonStyle(){{
|
||||||
down = flatDown;
|
down = flatDown;
|
||||||
up = black6;
|
up = black6;
|
||||||
over = flatOver;
|
over = flatOver;
|
||||||
@@ -264,13 +297,13 @@ public class Styles{
|
|||||||
imageDisabledColor = Color.lightGray;
|
imageDisabledColor = Color.lightGray;
|
||||||
imageUpColor = Color.white;
|
imageUpColor = Color.white;
|
||||||
}};
|
}};
|
||||||
clearToggleTransi = new ImageButtonStyle(){{
|
clearTogglei = new ImageButtonStyle(){{
|
||||||
down = flatDown;
|
down = flatDown;
|
||||||
checked = flatDown;
|
checked = flatDown;
|
||||||
up = black6;
|
up = black6;
|
||||||
over = flatOver;
|
over = flatOver;
|
||||||
}};
|
}};
|
||||||
clearTogglePartiali = new ImageButtonStyle(){{
|
clearNoneTogglei = new ImageButtonStyle(){{
|
||||||
down = flatDown;
|
down = flatDown;
|
||||||
checked = flatDown;
|
checked = flatDown;
|
||||||
up = none;
|
up = none;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
b.image(con.uiIcon).size(iconMed).padRight(3);
|
b.image(con.uiIcon).size(iconMed).padRight(3);
|
||||||
b.add(con.localizedName).color(Color.lightGray).padLeft(3).growX().left().wrap();
|
b.add(con.localizedName).color(Color.lightGray).padLeft(3).growX().left().wrap();
|
||||||
|
|
||||||
b.button(Icon.cancel, Styles.clearPartiali, () -> {
|
b.button(Icon.cancel, Styles.clearNonei, () -> {
|
||||||
set.remove(con);
|
set.remove(con);
|
||||||
rebuild[0].run();
|
rebuild[0].run();
|
||||||
}).size(70f).pad(-4f).padLeft(0f);
|
}).size(70f).pad(-4f).padLeft(0f);
|
||||||
@@ -87,7 +87,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
int[] i = {0};
|
int[] i = {0};
|
||||||
content.<T>getBy(type).each(b -> !set.contains(b) && pred.get(b), b -> {
|
content.<T>getBy(type).each(b -> !set.contains(b) && pred.get(b), b -> {
|
||||||
int cols = mobile && Core.graphics.isPortrait() ? 4 : 12;
|
int cols = mobile && Core.graphics.isPortrait() ? 4 : 12;
|
||||||
t.button(new TextureRegionDrawable(b.uiIcon), Styles.cleari, iconMed, () -> {
|
t.button(new TextureRegionDrawable(b.uiIcon), Styles.flati, iconMed, () -> {
|
||||||
set.add(b);
|
set.add(b);
|
||||||
rebuild[0].run();
|
rebuild[0].run();
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
@@ -224,7 +224,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
main.table(Tex.button, t -> {
|
main.table(Tex.button, t -> {
|
||||||
t.margin(10f);
|
t.margin(10f);
|
||||||
var group = new ButtonGroup<>();
|
var group = new ButtonGroup<>();
|
||||||
var style = Styles.clearTogglet;
|
var style = Styles.flatTogglet;
|
||||||
|
|
||||||
t.defaults().size(140f, 50f);
|
t.defaults().size(140f, 50f);
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
t.add(text).left().padRight(5);
|
t.add(text).left().padRight(5);
|
||||||
|
|
||||||
for(Team team : Team.baseTeams){
|
for(Team team : Team.baseTeams){
|
||||||
t.button(Tex.whiteui, Styles.clearTogglei, 38f, () -> {
|
t.button(Tex.whiteui, Styles.squareTogglei, 38f, () -> {
|
||||||
cons.get(team);
|
cons.get(team);
|
||||||
}).pad(1f).checked(b -> prov.get() == team).size(60f).tooltip(team.localized()).with(i -> i.getStyle().imageUpColor = team.color);
|
}).pad(1f).checked(b -> prov.get() == team).size(60f).tooltip(team.localized()).with(i -> i.getStyle().imageUpColor = team.color);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ public class FileChooser extends BaseDialog{
|
|||||||
Fi[] names = getFileNames();
|
Fi[] names = getFileNames();
|
||||||
|
|
||||||
Image upimage = new Image(Icon.upOpen);
|
Image upimage = new Image(Icon.upOpen);
|
||||||
TextButton upbutton = new TextButton(".." + directory.toString(), Styles.clearTogglet);
|
TextButton upbutton = new TextButton(".." + directory.toString(), Styles.flatTogglet);
|
||||||
upbutton.clicked(() -> {
|
upbutton.clicked(() -> {
|
||||||
directory = directory.parent();
|
directory = directory.parent();
|
||||||
setLastDirectory(directory);
|
setLastDirectory(directory);
|
||||||
@@ -218,7 +218,7 @@ public class FileChooser extends BaseDialog{
|
|||||||
|
|
||||||
String filename = file.name();
|
String filename = file.name();
|
||||||
|
|
||||||
TextButton button = new TextButton(filename.replace("[", "[["), Styles.clearTogglet);
|
TextButton button = new TextButton(filename.replace("[", "[["), Styles.flatTogglet);
|
||||||
button.getLabel().setWrap(false);
|
button.getLabel().setWrap(false);
|
||||||
button.getLabel().setEllipsis(true);
|
button.getLabel().setEllipsis(true);
|
||||||
group.add(button);
|
group.add(button);
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ public class HostDialog extends BaseDialog{
|
|||||||
ui.listfrag.rebuild();
|
ui.listfrag.rebuild();
|
||||||
}).grow().pad(8).get().setMaxLength(40);
|
}).grow().pad(8).get().setMaxLength(40);
|
||||||
|
|
||||||
ImageButton button = t.button(Tex.whiteui, Styles.clearFulli, 40, () -> {
|
ImageButton button = t.button(Tex.whiteui, Styles.squarei, 40, () -> {
|
||||||
new PaletteDialog().show(color -> {
|
new PaletteDialog().show(color -> {
|
||||||
player.color().set(color);
|
player.color.set(color);
|
||||||
Core.settings.put("color-0", color.rgba());
|
Core.settings.put("color-0", color.rgba());
|
||||||
});
|
});
|
||||||
}).size(54f).get();
|
}).size(54f).get();
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
Core.settings.put("name", text);
|
Core.settings.put("name", text);
|
||||||
}).grow().pad(8).maxTextLength(maxNameLength);
|
}).grow().pad(8).maxTextLength(maxNameLength);
|
||||||
|
|
||||||
ImageButton button = t.button(Tex.whiteui, Styles.clearFulli, 40, () -> {
|
ImageButton button = t.button(Tex.whiteui, Styles.squarei, 40, () -> {
|
||||||
new PaletteDialog().show(color -> {
|
new PaletteDialog().show(color -> {
|
||||||
player.color().set(color);
|
player.color().set(color);
|
||||||
Core.settings.put("color-0", color.rgba8888());
|
Core.settings.put("color-0", color.rgba8888());
|
||||||
@@ -424,7 +424,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
|
|
||||||
//button for showing/hiding servers
|
//button for showing/hiding servers
|
||||||
ImageButton[] image = {null};
|
ImageButton[] image = {null};
|
||||||
image[0] = head.button(hidden ? Icon.eyeOffSmall : Icon.eyeSmall, Styles.accenti, () -> {
|
image[0] = head.button(hidden ? Icon.eyeOffSmall : Icon.eyeSmall, Styles.grayi, () -> {
|
||||||
group.setHidden(!group.hidden());
|
group.setHidden(!group.hidden());
|
||||||
image[0].getStyle().imageUp = group.hidden() ? Icon.eyeOffSmall : Icon.eyeSmall;
|
image[0].getStyle().imageUp = group.hidden() ? Icon.eyeOffSmall : Icon.eyeSmall;
|
||||||
if(group.hidden() && !showHidden){
|
if(group.hidden() && !showHidden){
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public class LanguageDialog extends BaseDialog{
|
|||||||
ButtonGroup<TextButton> group = new ButtonGroup<>();
|
ButtonGroup<TextButton> group = new ButtonGroup<>();
|
||||||
|
|
||||||
for(Locale loc : locales){
|
for(Locale loc : locales){
|
||||||
TextButton button = new TextButton(getDisplayName(loc), Styles.clearTogglet);
|
TextButton button = new TextButton(getDisplayName(loc), Styles.flatTogglet);
|
||||||
button.clicked(() -> {
|
button.clicked(() -> {
|
||||||
if(getLocale().equals(loc)) return;
|
if(getLocale().equals(loc)) return;
|
||||||
Core.settings.put("locale", loc.toString());
|
Core.settings.put("locale", loc.toString());
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class LoadDialog extends BaseDialog{
|
|||||||
TextureRegionDrawable icon = Vars.ui.getIcon("mode" + Strings.capitalize(mode.name()));
|
TextureRegionDrawable icon = Vars.ui.getIcon("mode" + Strings.capitalize(mode.name()));
|
||||||
boolean sandbox = mode == Gamemode.sandbox;
|
boolean sandbox = mode == Gamemode.sandbox;
|
||||||
if(Core.atlas.isFound(icon.getRegion()) || sandbox){
|
if(Core.atlas.isFound(icon.getRegion()) || sandbox){
|
||||||
search.button(sandbox ? Icon.terrain : icon, Styles.emptytogglei, () -> {
|
search.button(sandbox ? Icon.terrain : icon, Styles.emptyTogglei, () -> {
|
||||||
filteredMode = filteredMode == mode ? null : mode;
|
filteredMode = filteredMode == mode ? null : mode;
|
||||||
rebuild();
|
rebuild();
|
||||||
}).size(60f).checked(b -> filteredMode == mode).tooltip("@mode." + mode.name() + ".name");
|
}).size(60f).checked(b -> filteredMode == mode).tooltip("@mode." + mode.name() + ".name");
|
||||||
@@ -116,7 +116,7 @@ public class LoadDialog extends BaseDialog{
|
|||||||
t.right();
|
t.right();
|
||||||
t.defaults().size(40f);
|
t.defaults().size(40f);
|
||||||
|
|
||||||
t.button(Icon.save, Styles.emptytogglei, () -> {
|
t.button(Icon.save, Styles.emptyTogglei, () -> {
|
||||||
slot.setAutosave(!slot.isAutosave());
|
slot.setAutosave(!slot.isAutosave());
|
||||||
}).checked(slot.isAutosave()).right();
|
}).checked(slot.isAutosave()).right();
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class LoadoutDialog extends BaseDialog{
|
|||||||
updater.run();
|
updater.run();
|
||||||
}).size(bsize);
|
}).size(bsize);
|
||||||
|
|
||||||
t.button(Icon.pencil, Styles.cleari, () -> ui.showTextInput("@configure", stack.item.localizedName, 10, stack.amount + "", true, str -> {
|
t.button(Icon.pencil, Styles.flati, () -> ui.showTextInput("@configure", stack.item.localizedName, 10, stack.amount + "", true, str -> {
|
||||||
if(Strings.canParsePositiveInt(str)){
|
if(Strings.canParsePositiveInt(str)){
|
||||||
int amount = Strings.parseInt(str);
|
int amount = Strings.parseInt(str);
|
||||||
if(amount >= 0 && amount <= capacity){
|
if(amount >= 0 && amount <= capacity){
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ public class MapsDialog extends BaseDialog{
|
|||||||
for(Gamemode mode : Gamemode.all){
|
for(Gamemode mode : Gamemode.all){
|
||||||
TextureRegionDrawable icon = Vars.ui.getIcon("mode" + Strings.capitalize(mode.name()));
|
TextureRegionDrawable icon = Vars.ui.getIcon("mode" + Strings.capitalize(mode.name()));
|
||||||
if(Core.atlas.isFound(icon.getRegion())){
|
if(Core.atlas.isFound(icon.getRegion())){
|
||||||
t.button(icon, Styles.emptytogglei, () -> {
|
t.button(icon, Styles.emptyTogglei, () -> {
|
||||||
if(modes.contains(mode)){
|
if(modes.contains(mode)){
|
||||||
modes.remove(mode);
|
modes.remove(mode);
|
||||||
}else{
|
}else{
|
||||||
@@ -224,13 +224,13 @@ public class MapsDialog extends BaseDialog{
|
|||||||
|
|
||||||
menu.add("@editor.filters.type").width(150f).left();
|
menu.add("@editor.filters.type").width(150f).left();
|
||||||
menu.table(Tex.button, t -> {
|
menu.table(Tex.button, t -> {
|
||||||
t.button("@custom", Styles.clearTogglet, () -> {
|
t.button("@custom", Styles.flatTogglet, () -> {
|
||||||
showCustom = !showCustom;
|
showCustom = !showCustom;
|
||||||
Core.settings.put("editorshowcustommaps", showCustom);
|
Core.settings.put("editorshowcustommaps", showCustom);
|
||||||
Core.settings.forceSave();
|
Core.settings.forceSave();
|
||||||
rebuildMaps();
|
rebuildMaps();
|
||||||
}).size(150f, 60f).checked(showCustom);
|
}).size(150f, 60f).checked(showCustom);
|
||||||
t.button("@builtin", Styles.clearTogglet, () -> {
|
t.button("@builtin", Styles.flatTogglet, () -> {
|
||||||
showBuiltIn = !showBuiltIn;
|
showBuiltIn = !showBuiltIn;
|
||||||
Core.settings.put("editorshowbuiltinmaps", showBuiltIn);
|
Core.settings.put("editorshowbuiltinmaps", showBuiltIn);
|
||||||
Core.settings.forceSave();
|
Core.settings.forceSave();
|
||||||
@@ -241,13 +241,13 @@ public class MapsDialog extends BaseDialog{
|
|||||||
|
|
||||||
menu.add("@editor.filters.search").width(150f).left();
|
menu.add("@editor.filters.search").width(150f).left();
|
||||||
menu.table(Tex.button, t -> {
|
menu.table(Tex.button, t -> {
|
||||||
t.button("@editor.filters.author", Styles.clearTogglet, () -> {
|
t.button("@editor.filters.author", Styles.flatTogglet, () -> {
|
||||||
searchAuthor = !searchAuthor;
|
searchAuthor = !searchAuthor;
|
||||||
Core.settings.put("editorsearchauthor", searchAuthor);
|
Core.settings.put("editorsearchauthor", searchAuthor);
|
||||||
Core.settings.forceSave();
|
Core.settings.forceSave();
|
||||||
rebuildMaps();
|
rebuildMaps();
|
||||||
}).size(150f, 60f).checked(searchAuthor);
|
}).size(150f, 60f).checked(searchAuthor);
|
||||||
t.button("@editor.filters.description", Styles.clearTogglet, () -> {
|
t.button("@editor.filters.description", Styles.flatTogglet, () -> {
|
||||||
searchDescription = !searchDescription;
|
searchDescription = !searchDescription;
|
||||||
Core.settings.put("editorsearchdescription", searchDescription);
|
Core.settings.put("editorsearchdescription", searchDescription);
|
||||||
Core.settings.forceSave();
|
Core.settings.forceSave();
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
searchtxt = res;
|
searchtxt = res;
|
||||||
rebuildBrowser();
|
rebuildBrowser();
|
||||||
}).growX().get();
|
}).growX().get();
|
||||||
table.button(Icon.list, Styles.clearPartiali, 32f, () -> {
|
table.button(Icon.list, Styles.clearNonei, 32f, () -> {
|
||||||
orderDate = !orderDate;
|
orderDate = !orderDate;
|
||||||
rebuildBrowser();
|
rebuildBrowser();
|
||||||
}).update(b -> b.getStyle().imageUp = (orderDate ? Icon.list : Icon.star)).size(40f).get()
|
}).update(b -> b.getStyle().imageUp = (orderDate ? Icon.list : Icon.star)).size(40f).get()
|
||||||
@@ -154,7 +154,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
cont.table(buttons -> {
|
cont.table(buttons -> {
|
||||||
buttons.left().defaults().growX().height(60f).uniformX();
|
buttons.left().defaults().growX().height(60f).uniformX();
|
||||||
|
|
||||||
TextButtonStyle style = Styles.clearPartialt;
|
TextButtonStyle style = Styles.flatBordert;
|
||||||
float margin = 12f;
|
float margin = 12f;
|
||||||
|
|
||||||
buttons.button("@mod.import", Icon.add, style, () -> {
|
buttons.button("@mod.import", Icon.add, style, () -> {
|
||||||
@@ -276,12 +276,12 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
t.table(right -> {
|
t.table(right -> {
|
||||||
right.right();
|
right.right();
|
||||||
right.button(item.enabled() ? Icon.downOpen : Icon.upOpen, Styles.clearPartiali, () -> {
|
right.button(item.enabled() ? Icon.downOpen : Icon.upOpen, Styles.clearNonei, () -> {
|
||||||
mods.setEnabled(item, !item.enabled());
|
mods.setEnabled(item, !item.enabled());
|
||||||
setup();
|
setup();
|
||||||
}).size(50f).disabled(!item.isSupported());
|
}).size(50f).disabled(!item.isSupported());
|
||||||
|
|
||||||
right.button(item.hasSteamID() ? Icon.link : Icon.trash, Styles.clearPartiali, () -> {
|
right.button(item.hasSteamID() ? Icon.link : Icon.trash, Styles.clearNonei, () -> {
|
||||||
if(!item.hasSteamID()){
|
if(!item.hasSteamID()){
|
||||||
ui.showConfirm("@confirm", "@mod.remove.confirm", () -> {
|
ui.showConfirm("@confirm", "@mod.remove.confirm", () -> {
|
||||||
mods.removeMod(item);
|
mods.removeMod(item);
|
||||||
@@ -294,12 +294,12 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
if(steam && !item.hasSteamID()){
|
if(steam && !item.hasSteamID()){
|
||||||
right.row();
|
right.row();
|
||||||
right.button(Icon.export, Styles.clearPartiali, () -> {
|
right.button(Icon.export, Styles.clearNonei, () -> {
|
||||||
platform.publish(item);
|
platform.publish(item);
|
||||||
}).size(50f);
|
}).size(50f);
|
||||||
}
|
}
|
||||||
}).growX().right().padRight(-8f).padTop(-8f);
|
}).growX().right().padRight(-8f).padTop(-8f);
|
||||||
}, Styles.clearPartialt, () -> showMod(item)).size(w, h).growX().pad(4f);
|
}, Styles.flatBordert, () -> showMod(item)).size(w, h).growX().pad(4f);
|
||||||
pane[0].row();
|
pane[0].row();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -382,7 +382,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
d.cont.pane(cs -> {
|
d.cont.pane(cs -> {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for(UnlockableContent c : all){
|
for(UnlockableContent c : all){
|
||||||
cs.button(new TextureRegionDrawable(c.uiIcon), Styles.cleari, iconMed, () -> {
|
cs.button(new TextureRegionDrawable(c.uiIcon), Styles.flati, iconMed, () -> {
|
||||||
ui.content.show(c);
|
ui.content.show(c);
|
||||||
}).size(50f).with(im -> {
|
}).size(50f).with(im -> {
|
||||||
var click = im.getClickListener();
|
var click = im.getClickListener();
|
||||||
@@ -482,7 +482,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
"\n" + Core.bundle.format("mod.requiresversion", mod.minGameVersion)))
|
"\n" + Core.bundle.format("mod.requiresversion", mod.minGameVersion)))
|
||||||
.width(358f).wrap().grow().pad(4f, 2f, 4f, 6f).top().left().labelAlign(Align.topLeft);
|
.width(358f).wrap().grow().pad(4f, 2f, 4f, 6f).top().left().labelAlign(Align.topLeft);
|
||||||
|
|
||||||
}, Styles.clearPartialt, () -> {
|
}, Styles.flatBordert, () -> {
|
||||||
var sel = new BaseDialog(mod.name);
|
var sel = new BaseDialog(mod.name);
|
||||||
sel.cont.pane(p -> p.add(mod.description + "\n\n[accent]" + Core.bundle.get("editor.author") + "[lightgray] " + mod.author)
|
sel.cont.pane(p -> p.add(mod.description + "\n\n[accent]" + Core.bundle.get("editor.author") + "[lightgray] " + mod.author)
|
||||||
.width(mobile ? 400f : 500f).wrap().pad(4f).labelAlign(Align.center, Align.left)).grow();
|
.width(mobile ? 400f : 500f).wrap().pad(4f).labelAlign(Align.center, Align.left)).grow();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class PaletteDialog extends Dialog{
|
|||||||
for(int i = 0; i < playerColors.length; i++){
|
for(int i = 0; i < playerColors.length; i++){
|
||||||
Color color = playerColors[i];
|
Color color = playerColors[i];
|
||||||
|
|
||||||
ImageButton button = table.button(Tex.whiteui, Styles.clearTogglei, 34, () -> {
|
ImageButton button = table.button(Tex.whiteui, Styles.squareTogglei, 34, () -> {
|
||||||
cons.get(color);
|
cons.get(color);
|
||||||
hide();
|
hide();
|
||||||
}).size(48).get();
|
}).size(48).get();
|
||||||
|
|||||||
@@ -559,7 +559,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
for(int i = 0; i < content.planets().size; i++){
|
for(int i = 0; i < content.planets().size; i++){
|
||||||
Planet planet = content.planets().get(i);
|
Planet planet = content.planets().get(i);
|
||||||
if(selectable(planet)){
|
if(selectable(planet)){
|
||||||
pt.button(planet.localizedName, Styles.clearTogglet, () -> {
|
pt.button(planet.localizedName, Styles.flatTogglet, () -> {
|
||||||
selected = null;
|
selected = null;
|
||||||
launchSector = null;
|
launchSector = null;
|
||||||
if(state.planet != planet){
|
if(state.planet != planet){
|
||||||
@@ -961,7 +961,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
if(sector.preset == null){
|
if(sector.preset == null){
|
||||||
title.add().growX();
|
title.add().growX();
|
||||||
|
|
||||||
title.button(Icon.pencilSmall, Styles.clearPartiali, () -> {
|
title.button(Icon.pencilSmall, Styles.clearNonei, () -> {
|
||||||
ui.showTextInput("@sectors.rename", "@name", 20, sector.name(), v -> {
|
ui.showTextInput("@sectors.rename", "@name", 20, sector.name(), v -> {
|
||||||
sector.setName(v);
|
sector.setName(v);
|
||||||
updateSelected();
|
updateSelected();
|
||||||
@@ -974,7 +974,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
new TextureRegionDrawable(sector.info.contentIcon.uiIcon) :
|
new TextureRegionDrawable(sector.info.contentIcon.uiIcon) :
|
||||||
Icon.icons.get(sector.info.icon + "Small");
|
Icon.icons.get(sector.info.icon + "Small");
|
||||||
|
|
||||||
title.button(icon == null ? Icon.noneSmall : icon, Styles.clearPartiali, iconSmall, () -> {
|
title.button(icon == null ? Icon.noneSmall : icon, Styles.clearNonei, iconSmall, () -> {
|
||||||
new Dialog(""){{
|
new Dialog(""){{
|
||||||
closeOnBack();
|
closeOnBack();
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
@@ -992,7 +992,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
t.marginRight(19f);
|
t.marginRight(19f);
|
||||||
t.defaults().size(48f);
|
t.defaults().size(48f);
|
||||||
|
|
||||||
t.button(Icon.none, Styles.clearTogglei, () -> {
|
t.button(Icon.none, Styles.squareTogglei, () -> {
|
||||||
sector.info.icon = null;
|
sector.info.icon = null;
|
||||||
sector.info.contentIcon = null;
|
sector.info.contentIcon = null;
|
||||||
refresh.run();
|
refresh.run();
|
||||||
@@ -1004,7 +1004,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
for(var key : defaultIcons){
|
for(var key : defaultIcons){
|
||||||
var value = Icon.icons.get(key);
|
var value = Icon.icons.get(key);
|
||||||
|
|
||||||
t.button(value, Styles.clearTogglei, () -> {
|
t.button(value, Styles.squareTogglei, () -> {
|
||||||
sector.info.icon = key;
|
sector.info.icon = key;
|
||||||
sector.info.contentIcon = null;
|
sector.info.contentIcon = null;
|
||||||
refresh.run();
|
refresh.run();
|
||||||
@@ -1021,7 +1021,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
i = 0;
|
i = 0;
|
||||||
for(UnlockableContent u : content.getBy(ctype).<UnlockableContent>as()){
|
for(UnlockableContent u : content.getBy(ctype).<UnlockableContent>as()){
|
||||||
if(!u.isHidden() && u.unlocked()){
|
if(!u.isHidden() && u.unlocked()){
|
||||||
t.button(new TextureRegionDrawable(u.uiIcon), Styles.clearTogglei, iconMed, () -> {
|
t.button(new TextureRegionDrawable(u.uiIcon), Styles.squareTogglei, iconMed, () -> {
|
||||||
sector.info.icon = null;
|
sector.info.icon = null;
|
||||||
sector.info.contentIcon = u;
|
sector.info.contentIcon = u;
|
||||||
refresh.run();
|
refresh.run();
|
||||||
@@ -1081,7 +1081,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
stable.row();
|
stable.row();
|
||||||
|
|
||||||
if(sector.hasBase()){
|
if(sector.hasBase()){
|
||||||
stable.button("@stats", Icon.info, Styles.transt, () -> showStats(sector)).height(40f).fillX().row();
|
stable.button("@stats", Icon.info, Styles.cleart, () -> showStats(sector)).height(40f).fillX().row();
|
||||||
}
|
}
|
||||||
|
|
||||||
if((sector.hasBase() && mode == look) || canSelect(sector) || (sector.preset != null && sector.preset.alwaysUnlocked) || debugSelect){
|
if((sector.hasBase() && mode == look) || canSelect(sector) || (sector.preset != null && sector.preset.alwaysUnlocked) || debugSelect){
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
if(node.requiresUnlock && !node.content.unlocked() && node != getPrefRoot()) continue;
|
if(node.requiresUnlock && !node.content.unlocked() && node != getPrefRoot()) continue;
|
||||||
|
|
||||||
//TODO toggle
|
//TODO toggle
|
||||||
in.button(node.localizedName(), node.icon(), Styles.clearTogglet, iconMed, () -> {
|
in.button(node.localizedName(), node.icon(), Styles.flatTogglet, iconMed, () -> {
|
||||||
if(node == lastNode){
|
if(node == lastNode){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -581,7 +581,7 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
b.margin(0).left().defaults().left();
|
b.margin(0).left().defaults().left();
|
||||||
|
|
||||||
if(selectable && (node.content.description != null || node.content.stats.toMap().size > 0)){
|
if(selectable && (node.content.description != null || node.content.stats.toMap().size > 0)){
|
||||||
b.button(Icon.info, Styles.cleari, () -> ui.content.show(node.content)).growY().width(50f);
|
b.button(Icon.info, Styles.flati, () -> ui.content.show(node.content)).growY().width(50f);
|
||||||
}
|
}
|
||||||
b.add().grow();
|
b.add().grow();
|
||||||
b.table(desc -> {
|
b.table(desc -> {
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
buttons.left();
|
buttons.left();
|
||||||
buttons.defaults().size(50f);
|
buttons.defaults().size(50f);
|
||||||
|
|
||||||
ImageButtonStyle style = Styles.clearPartiali;
|
ImageButtonStyle style = Styles.clearNonei;
|
||||||
|
|
||||||
buttons.button(Icon.info, style, () -> {
|
buttons.button(Icon.info, style, () -> {
|
||||||
showInfo(s);
|
showInfo(s);
|
||||||
@@ -231,7 +231,7 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).pad(4).style(Styles.cleari).get();
|
}).pad(4).style(Styles.flati).get();
|
||||||
|
|
||||||
sel[0].getStyle().up = Tex.pane;
|
sel[0].getStyle().up = Tex.pane;
|
||||||
|
|
||||||
@@ -419,7 +419,7 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
for(UnlockableContent u : content.getBy(ctype).<UnlockableContent>as()){
|
for(UnlockableContent u : content.getBy(ctype).<UnlockableContent>as()){
|
||||||
if(!u.isHidden() && u.unlockedNow() && u.hasEmoji() && !tags.contains(u.emoji())){
|
if(!u.isHidden() && u.unlockedNow() && u.hasEmoji() && !tags.contains(u.emoji())){
|
||||||
t.button(new TextureRegionDrawable(u.uiIcon), Styles.cleari, iconMed, () -> {
|
t.button(new TextureRegionDrawable(u.uiIcon), Styles.flati, iconMed, () -> {
|
||||||
String out = u.emoji() + "";
|
String out = u.emoji() + "";
|
||||||
|
|
||||||
tags.add(out);
|
tags.add(out);
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public class HudFragment{
|
|||||||
select.left();
|
select.left();
|
||||||
select.defaults().size(dsize).left();
|
select.defaults().size(dsize).left();
|
||||||
|
|
||||||
ImageButtonStyle style = Styles.clearTransi;
|
ImageButtonStyle style = Styles.cleari;
|
||||||
|
|
||||||
select.button(Icon.menu, style, ui.paused::show).name("menu");
|
select.button(Icon.menu, style, ui.paused::show).name("menu");
|
||||||
flip = select.button(Icon.upOpen, style, this::toggleMenus).get();
|
flip = select.button(Icon.upOpen, style, this::toggleMenus).get();
|
||||||
@@ -242,7 +242,7 @@ public class HudFragment{
|
|||||||
teams.left();
|
teams.left();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for(Team team : Team.baseTeams){
|
for(Team team : Team.baseTeams){
|
||||||
ImageButton button = teams.button(Tex.whiteui, Styles.clearTogglePartiali, 40f, () -> Call.setPlayerTeamEditor(player, team))
|
ImageButton button = teams.button(Tex.whiteui, Styles.clearNoneTogglei, 40f, () -> Call.setPlayerTeamEditor(player, team))
|
||||||
.size(50f).margin(6f).get();
|
.size(50f).margin(6f).get();
|
||||||
button.getImageCell().grow();
|
button.getImageCell().grow();
|
||||||
button.getStyle().imageUpColor = team.color;
|
button.getStyle().imageUpColor = team.color;
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ public class MenuFragment{
|
|||||||
for(Buttoni b : buttons){
|
for(Buttoni b : buttons){
|
||||||
if(b == null) continue;
|
if(b == null) continue;
|
||||||
Button[] out = {null};
|
Button[] out = {null};
|
||||||
out[0] = t.button(b.text, b.icon, Styles.clearToggleMenut, () -> {
|
out[0] = t.button(b.text, b.icon, Styles.flatToggleMenut, () -> {
|
||||||
if(currentMenu == out[0]){
|
if(currentMenu == out[0]){
|
||||||
currentMenu = null;
|
currentMenu = null;
|
||||||
fadeOutMenu();
|
fadeOutMenu();
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ public class PlacementFragment{
|
|||||||
.left().width(190f).padLeft(5);
|
.left().width(190f).padLeft(5);
|
||||||
header.add().growX();
|
header.add().growX();
|
||||||
if(unlocked(displayBlock)){
|
if(unlocked(displayBlock)){
|
||||||
header.button("?", Styles.clearPartialt, () -> {
|
header.button("?", Styles.flatBordert, () -> {
|
||||||
ui.content.show(displayBlock);
|
ui.content.show(displayBlock);
|
||||||
Events.fire(new BlockInfoEvent());
|
Events.fire(new BlockInfoEvent());
|
||||||
}).size(8 * 5).padTop(-5).padRight(-5).right().grow().name("blockinfo");
|
}).size(8 * 5).padTop(-5).padRight(-5).right().grow().name("blockinfo");
|
||||||
@@ -518,7 +518,7 @@ public class PlacementFragment{
|
|||||||
needsAssign = false;
|
needsAssign = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
categories.button(ui.getIcon(cat.name()), Styles.clearToggleTransi, () -> {
|
categories.button(ui.getIcon(cat.name()), Styles.clearTogglei, () -> {
|
||||||
currentCategory = cat;
|
currentCategory = cat;
|
||||||
if(control.input.block != null){
|
if(control.input.block != null){
|
||||||
control.input.block = getSelectedBlock(currentCategory);
|
control.input.block = getSelectedBlock(currentCategory);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class ItemSelection{
|
|||||||
for(T item : items){
|
for(T item : items){
|
||||||
if(!item.unlockedNow() || (item instanceof Item checkVisible && state.rules.hiddenBuildItems.contains(checkVisible)) || item.isHidden()) continue;
|
if(!item.unlockedNow() || (item instanceof Item checkVisible && state.rules.hiddenBuildItems.contains(checkVisible)) || item.isHidden()) continue;
|
||||||
|
|
||||||
ImageButton button = cont.button(Tex.whiteui, Styles.clearToggleTransi, 24, () -> {
|
ImageButton button = cont.button(Tex.whiteui, Styles.clearTogglei, 24, () -> {
|
||||||
if(closeSelect) control.input.config.hideConfig();
|
if(closeSelect) control.input.config.hideConfig();
|
||||||
}).group(group).tooltip(item.localizedName).get();
|
}).group(group).tooltip(item.localizedName).get();
|
||||||
button.changed(() -> consumer.get(button.isChecked() ? item : null));
|
button.changed(() -> consumer.get(button.isChecked() ? item : null));
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public class LaunchPad extends Block{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.button(Icon.upOpen, Styles.clearTransi, () -> {
|
table.button(Icon.upOpen, Styles.cleari, () -> {
|
||||||
ui.planet.showSelect(state.rules.sector, other -> {
|
ui.planet.showSelect(state.rules.sector, other -> {
|
||||||
if(state.isCampaign()){
|
if(state.isCampaign()){
|
||||||
state.rules.sector.info.destination = other;
|
state.rules.sector.info.destination = other;
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public class CanvasBlock extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void buildConfiguration(Table table){
|
public void buildConfiguration(Table table){
|
||||||
table.button(Icon.pencil, Styles.clearTransi, () -> {
|
table.button(Icon.pencil, Styles.cleari, () -> {
|
||||||
Dialog dialog = new Dialog();
|
Dialog dialog = new Dialog();
|
||||||
|
|
||||||
Pixmap pix = makePixmap();
|
Pixmap pix = makePixmap();
|
||||||
@@ -197,7 +197,7 @@ public class CanvasBlock extends Block{
|
|||||||
for(int i = 0; i < palette.length; i++){
|
for(int i = 0; i < palette.length; i++){
|
||||||
int fi = i;
|
int fi = i;
|
||||||
|
|
||||||
var button = p.button(Tex.whiteui, Styles.clearTogglei, 30, () -> {
|
var button = p.button(Tex.whiteui, Styles.squareTogglei, 30, () -> {
|
||||||
curColor[0] = palette[fi];
|
curColor[0] = palette[fi];
|
||||||
}).size(44).checked(b -> curColor[0] == palette[fi]).get();
|
}).size(44).checked(b -> curColor[0] == palette[fi]).get();
|
||||||
button.getStyle().imageUpColor = new Color(palette[i]);
|
button.getStyle().imageUpColor = new Color(palette[i]);
|
||||||
|
|||||||
@@ -565,7 +565,7 @@ public class LogicBlock extends Block{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.button(Icon.pencil, Styles.clearTransi, () -> {
|
table.button(Icon.pencil, Styles.cleari, () -> {
|
||||||
ui.logic.show(code, executor, privileged, code -> configure(compress(code, relativeConnections())));
|
ui.logic.show(code, executor, privileged, code -> configure(compress(code, relativeConnections())));
|
||||||
}).size(40);
|
}).size(40);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public class MessageBlock extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void buildConfiguration(Table table){
|
public void buildConfiguration(Table table){
|
||||||
table.button(Icon.pencil, Styles.clearTransi, () -> {
|
table.button(Icon.pencil, Styles.cleari, () -> {
|
||||||
if(mobile){
|
if(mobile){
|
||||||
Core.input.getTextInput(new TextInput(){{
|
Core.input.getTextInput(new TextInput(){{
|
||||||
text = message.toString();
|
text = message.toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user