diff --git a/core/src/io/anuke/mindustry/ui/dialogs/AboutDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/AboutDialog.java index 109f2c6f129a..fc1fa929df48 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/AboutDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/AboutDialog.java @@ -2,17 +2,20 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.utils.ObjectSet; import io.anuke.mindustry.ui.Links; import io.anuke.mindustry.ui.Links.LinkEntry; import io.anuke.ucore.core.Core; import io.anuke.ucore.core.Timers; import io.anuke.ucore.scene.ui.ScrollPane; import io.anuke.ucore.scene.ui.layout.Table; +import io.anuke.ucore.util.OS; import static io.anuke.mindustry.Vars.ios; import static io.anuke.mindustry.Vars.ui; public class AboutDialog extends FloatingDialog { + private static ObjectSet bannedItems = ObjectSet.with("google-play", "itch.io", "dev-builds", "trello"); public AboutDialog(){ super("$text.about.button"); @@ -26,7 +29,7 @@ public AboutDialog(){ ScrollPane pane = new ScrollPane(in, "clear"); for(LinkEntry link : Links.getLinks()){ - if(ios && link.name.equals("google-play")){ //because Apple doesn't like me mentioning android + if((ios || OS.isMac) && bannedItems.contains(link.name)){ //because Apple doesn't like me mentioning things continue; } @@ -64,13 +67,14 @@ public AboutDialog(){ content().add(pane).growX(); buttons().addButton("$text.credits", this::showCredits).size(200f, 64f); - if(!ios){ + + if(!ios && !OS.isMac){ buttons().addButton("$text.changelog.title", ui.changelog::show).size(200f, 64f); } } - private void showCredits(){ + public void showCredits(){ FloatingDialog dialog = new FloatingDialog("$text.credits"); dialog.addCloseButton(); dialog.content().add("$text.about"); diff --git a/core/src/io/anuke/mindustry/ui/dialogs/ChangelogDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/ChangelogDialog.java index 6da2480aa3a5..b525117aa9e4 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/ChangelogDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/ChangelogDialog.java @@ -10,6 +10,7 @@ import io.anuke.ucore.scene.ui.ScrollPane; import io.anuke.ucore.scene.ui.layout.Table; import io.anuke.ucore.util.Log; +import io.anuke.ucore.util.OS; import static io.anuke.mindustry.Vars.ios; @@ -24,7 +25,7 @@ public ChangelogDialog(){ content().add("$text.changelog.loading"); - if(!ios) { + if(!ios && !OS.isMac) { Changelogs.getChangelog(result -> { versions = result; Gdx.app.postRunnable(this::setup); @@ -55,6 +56,10 @@ void setup(){ } }else{ for(VersionInfo info : versions){ + String desc = info.description; + + desc = desc.replace("Android", "Mobile"); + Table in = new Table("clear"); in.top().left().margin(10); @@ -67,7 +72,7 @@ void setup(){ in.add("$text.changelog.latest"); } in.row(); - in.labelWrap("[lightgray]" + info.description).width(vw - 20).padTop(12); + in.labelWrap("[lightgray]" + desc).width(vw - 20).padTop(12); table.add(in).width(vw).pad(8).row(); } diff --git a/core/src/io/anuke/mindustry/ui/fragments/MenuFragment.java b/core/src/io/anuke/mindustry/ui/fragments/MenuFragment.java index 9ae9bc22e36c..428c32bbf6e5 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/MenuFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/MenuFragment.java @@ -9,6 +9,7 @@ import io.anuke.ucore.scene.builders.imagebutton; import io.anuke.ucore.scene.builders.label; import io.anuke.ucore.scene.builders.table; +import io.anuke.ucore.util.OS; import static io.anuke.mindustry.Vars.*; @@ -44,7 +45,13 @@ public void build(){ add(new MenuButton("icon-info", "$text.about.button", ui.about::show)); - add(new MenuButton("icon-menu", "$text.changelog.title", ui.changelog::show)); + add(new MenuButton("icon-menu", OS.isMac ? "$text.credits" : "$text.changelog.title", () -> { + if(OS.isMac){ + ui.about.showCredits(); + }else { + ui.changelog.show(); + } + })); row();