Less table

This commit is contained in:
MEEPofFaith
2024-04-16 18:04:00 -07:00
parent ad1a3d694e
commit 274184e234
+15 -17
View File
@@ -653,9 +653,9 @@ public class Mods implements Loadable{
new Dialog(""){{ new Dialog(""){{
setFillParent(true); setFillParent(true);
cont.margin(15); cont.margin(15);
cont.add("@mod.dependencies.error"); cont.add("@mod.dependencies.error").colspan(2);
cont.row(); cont.row();
cont.image().width(300f).pad(2).height(4f).color(Color.scarlet); cont.image().width(300f).colspan(2).pad(2).height(4f).color(Color.scarlet);
cont.row(); cont.row();
cont.pane(p -> { cont.pane(p -> {
mods.each(LoadedMod::hasUnmetDependencies, mod -> { mods.each(LoadedMod::hasUnmetDependencies, mod -> {
@@ -669,24 +669,22 @@ public class Mods implements Loadable{
}).growX().padBottom(8f).padLeft(12f); }).growX().padBottom(8f).padLeft(12f);
p.row(); p.row();
}); });
}).fillX(); }).fillX().colspan(2);
cont.row(); cont.row();
cont.table(b -> { cont.button("@ok", this::hide).size(150, 50);
b.button("@ok", this::hide).size(150, 50); cont.button("@mod.dependencies.download", () -> {
b.button("@mod.dependencies.download", () -> { hide();
hide(); Seq<String> toImport = new Seq<>();
Seq<String> toImport = new Seq<>(); mods.each(LoadedMod::hasUnmetDependencies, mod -> {
mods.each(LoadedMod::hasUnmetDependencies, mod -> { mod.missingDependencies.each(toImport::addUnique);
mod.missingDependencies.each(toImport::addUnique); });
}); Seq<String> remaining = toImport.copy();
Seq<String> remaining = toImport.copy(); ui.mods.importDependencies(remaining);
ui.mods.importDependencies(remaining); toImport.removeAll(remaining);
toImport.removeAll(remaining); displayDependencyImportStatus(remaining, toImport);
displayDependencyImportStatus(remaining, toImport); }).size(150, 50);
}).size(150, 50);
});
}}.show(); }}.show();
} }
} }