mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 23:07:33 +07:00
Fixed result duplication in logic UI
This commit is contained in:
@ -603,7 +603,7 @@ public class LStatements{
|
|||||||
table.add(" = ");
|
table.add(" = ");
|
||||||
|
|
||||||
if(op.unary){
|
if(op.unary){
|
||||||
opButton(table);
|
opButton(table, table);
|
||||||
|
|
||||||
field(table, a, str -> a = str);
|
field(table, a, str -> a = str);
|
||||||
}else{
|
}else{
|
||||||
@ -617,35 +617,35 @@ public class LStatements{
|
|||||||
table.table(c -> {
|
table.table(c -> {
|
||||||
c.color.set(color());
|
c.color.set(color());
|
||||||
c.left();
|
c.left();
|
||||||
funcs(c);
|
funcs(c, table);
|
||||||
}).colspan(2).left();
|
}).colspan(2).left();
|
||||||
}else{
|
}else{
|
||||||
funcs(table);
|
funcs(table, table);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
field(table, a, str -> a = str);
|
field(table, a, str -> a = str);
|
||||||
|
|
||||||
opButton(table);
|
opButton(table, table);
|
||||||
|
|
||||||
field(table, b, str -> b = str);
|
field(table, b, str -> b = str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void funcs(Table table){
|
void funcs(Table table, Table parent){
|
||||||
opButton(table);
|
opButton(table, parent);
|
||||||
|
|
||||||
field(table, a, str -> a = str);
|
field(table, a, str -> a = str);
|
||||||
|
|
||||||
field(table, b, str -> b = str);
|
field(table, b, str -> b = str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void opButton(Table table){
|
void opButton(Table table, Table parent){
|
||||||
table.button(b -> {
|
table.button(b -> {
|
||||||
b.label(() -> op.symbol);
|
b.label(() -> op.symbol);
|
||||||
b.clicked(() -> showSelect(b, LogicOp.all, op, o -> {
|
b.clicked(() -> showSelect(b, LogicOp.all, op, o -> {
|
||||||
op = o;
|
op = o;
|
||||||
rebuild(table);
|
rebuild(parent);
|
||||||
}));
|
}));
|
||||||
}, Styles.logict, () -> {}).size(64f, 40f).pad(4f).color(table.color);
|
}, Styles.logict, () -> {}).size(64f, 40f).pad(4f).color(table.color);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user