Fixed #9423
This commit is contained in:
@@ -463,6 +463,7 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
Table current = new Table().left();
|
Table current = new Table().left();
|
||||||
|
|
||||||
for(var tag : tags){
|
for(var tag : tags){
|
||||||
|
float si = 40f;
|
||||||
|
|
||||||
var next = new Table(Tex.whiteui, n -> {
|
var next = new Table(Tex.whiteui, n -> {
|
||||||
n.setColor(Pal.gray);
|
n.setColor(Pal.gray);
|
||||||
@@ -478,7 +479,7 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
tagsChanged();
|
tagsChanged();
|
||||||
rebuild[0].run();
|
rebuild[0].run();
|
||||||
}
|
}
|
||||||
}).tooltip("@editor.moveup").row();
|
}).size(si).tooltip("@editor.moveup").row();
|
||||||
//move down
|
//move down
|
||||||
move.button(Icon.downOpen, Styles.emptyi, () -> {
|
move.button(Icon.downOpen, Styles.emptyi, () -> {
|
||||||
int idx = tags.indexOf(tag);
|
int idx = tags.indexOf(tag);
|
||||||
@@ -487,7 +488,7 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
tagsChanged();
|
tagsChanged();
|
||||||
rebuild[0].run();
|
rebuild[0].run();
|
||||||
}
|
}
|
||||||
}).tooltip("@editor.movedown");
|
}).size(si).tooltip("@editor.movedown");
|
||||||
}).fillY();
|
}).fillY();
|
||||||
|
|
||||||
n.table(t -> {
|
n.table(t -> {
|
||||||
@@ -525,7 +526,7 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
rebuild[0].run();
|
rebuild[0].run();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).tooltip("@schematic.renametag").row();
|
}).size(si).tooltip("@schematic.renametag").row();
|
||||||
//delete tag
|
//delete tag
|
||||||
b.button(Icon.trash, Styles.emptyi, () -> {
|
b.button(Icon.trash, Styles.emptyi, () -> {
|
||||||
ui.showConfirm("@schematic.tagdelconfirm", () -> {
|
ui.showConfirm("@schematic.tagdelconfirm", () -> {
|
||||||
@@ -541,23 +542,22 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
rebuildPane.run();
|
rebuildPane.run();
|
||||||
rebuild[0].run();
|
rebuild[0].run();
|
||||||
});
|
});
|
||||||
}).tooltip("@save.delete");
|
}).size(si).tooltip("@save.delete");
|
||||||
}).fillY();
|
}).fillY();
|
||||||
});
|
});
|
||||||
|
|
||||||
next.pack();
|
next.pack();
|
||||||
float w = next.getWidth() + Scl.scl(6f);
|
float w = next.getWidth() + Scl.scl(9f);
|
||||||
|
|
||||||
if(w*2f + sum >= Core.graphics.getWidth() * 0.8f){
|
if(w + sum >= Core.graphics.getWidth() * 0.9f){
|
||||||
p.add(current).row();
|
p.add(current).row();
|
||||||
current = new Table();
|
current = new Table();
|
||||||
current.left();
|
current.left();
|
||||||
current.add(next).minWidth(240).pad(4);
|
|
||||||
sum = 0;
|
sum = 0;
|
||||||
}else{
|
|
||||||
current.add(next).minWidth(240).pad(4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
current.add(next).minWidth(210).pad(4);
|
||||||
|
|
||||||
sum += w;
|
sum += w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user