use of io.anuke.mindustry.io.Changelogs.VersionInfo in project Mindustry by Anuken.
the class ChangelogDialog method setup.
void setup() {
Table table = new Table();
ScrollPane pane = new ScrollPane(table, "clear");
content().clear();
content().add(pane).grow();
if (versions == null) {
table.add("$text.changelog.error");
if (Vars.android) {
table.row();
table.add("$text.changelog.error.android").padTop(8);
}
} else {
for (VersionInfo info : versions) {
Table in = new Table("clear");
in.top().left().margin(10);
in.add("[accent]" + info.name);
if (info.build == Version.build) {
in.row();
in.add("$text.changelog.current");
} else if (info == versions.first()) {
in.row();
in.add("$text.changelog.latest");
}
in.row();
in.labelWrap("[lightgray]" + info.description).width(vw - 20).padTop(12);
table.add(in).width(vw).pad(8).row();
}
int lastid = Settings.getInt("lastBuild");
if (lastid != 0 && versions.peek().build > lastid) {
Settings.putInt("lastBuild", versions.peek().build);
Settings.save();
show();
}
}
}
Aggregations