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