Fixed iOS donate button and changelog appearing
This commit is contained in:
@@ -9,6 +9,7 @@ import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.scene.ui.ScrollPane;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
|
||||
import static io.anuke.mindustry.Vars.ios;
|
||||
import static io.anuke.mindustry.Vars.ui;
|
||||
|
||||
public class AboutDialog extends FloatingDialog {
|
||||
@@ -59,7 +60,10 @@ public class AboutDialog extends FloatingDialog {
|
||||
content().add(pane).growX();
|
||||
|
||||
buttons().addButton("$text.credits", this::showCredits).size(200f, 64f);
|
||||
buttons().addButton("$text.changelog.title", ui.changelog::show).size(200f, 64f);
|
||||
if(!ios){
|
||||
buttons().addButton("$text.changelog.title", ui.changelog::show).size(200f, 64f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void showCredits(){
|
||||
|
||||
@@ -11,6 +11,8 @@ import io.anuke.ucore.scene.ui.ScrollPane;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import io.anuke.ucore.util.Log;
|
||||
|
||||
import static io.anuke.mindustry.Vars.ios;
|
||||
|
||||
public class ChangelogDialog extends FloatingDialog{
|
||||
private final float vw = 600;
|
||||
private Array<VersionInfo> versions;
|
||||
@@ -22,13 +24,16 @@ public class ChangelogDialog extends FloatingDialog{
|
||||
|
||||
content().add("$text.changelog.loading");
|
||||
|
||||
Changelogs.getChangelog(result -> {
|
||||
versions = result;
|
||||
Gdx.app.postRunnable(this::setup);
|
||||
}, t -> {
|
||||
Log.err(t);
|
||||
Gdx.app.postRunnable(this::setup);
|
||||
});
|
||||
if(!ios) {
|
||||
|
||||
Changelogs.getChangelog(result -> {
|
||||
versions = result;
|
||||
Gdx.app.postRunnable(this::setup);
|
||||
}, t -> {
|
||||
Log.err(t);
|
||||
Gdx.app.postRunnable(this::setup);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void setup(){
|
||||
@@ -45,7 +50,7 @@ public class ChangelogDialog extends FloatingDialog{
|
||||
table.add("$text.changelog.error.android").padTop(8);
|
||||
}
|
||||
|
||||
if(Vars.ios){
|
||||
if(ios){
|
||||
table.row();
|
||||
table.add("$text.changelog.error.ios").padTop(8);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,8 @@ public class MenuFragment implements Fragment{
|
||||
|
||||
}else {
|
||||
new table() {{
|
||||
defaults().size(120f).pad(5);
|
||||
float size = 120f;
|
||||
defaults().size(size).pad(5);
|
||||
float isize = 14f * 4;
|
||||
|
||||
new imagebutton("icon-play-2", isize, ui.levels::show).text("$text.play").padTop(4f);
|
||||
@@ -70,13 +71,21 @@ public class MenuFragment implements Fragment{
|
||||
|
||||
row();
|
||||
|
||||
new imagebutton("icon-editor", isize, ui.editor::show).text("$text.editor").padTop(4f);
|
||||
new table(){{
|
||||
|
||||
new imagebutton("icon-tools", isize, ui.settings::show).text("$text.settings").padTop(4f);
|
||||
defaults().size(size).pad(5);
|
||||
|
||||
new imagebutton("icon-info", isize, ui.about::show).text("$text.about.button").padTop(4f);
|
||||
new imagebutton("icon-editor", isize, ui.editor::show).text("$text.editor").padTop(4f);
|
||||
|
||||
new imagebutton("icon-donate", isize, Platform.instance::openDonations).text("$text.donate").padTop(4f);
|
||||
new imagebutton("icon-tools", isize, ui.settings::show).text("$text.settings").padTop(4f);
|
||||
|
||||
new imagebutton("icon-info", isize, ui.about::show).text("$text.about.button").padTop(4f);
|
||||
|
||||
if (!ios) {
|
||||
new imagebutton("icon-donate", isize, Platform.instance::openDonations).text("$text.donate").padTop(4f);
|
||||
}
|
||||
|
||||
}}.colspan(4).end();
|
||||
}}.end();
|
||||
}
|
||||
}}.end();
|
||||
|
||||
Reference in New Issue
Block a user