Skip to content

Commit

Permalink
Removed additional info from mac version
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed May 28, 2018
1 parent e58194a commit fcb74d4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
10 changes: 7 additions & 3 deletions core/src/io/anuke/mindustry/ui/dialogs/AboutDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> bannedItems = ObjectSet.with("google-play", "itch.io", "dev-builds", "trello");

public AboutDialog(){
super("$text.about.button");
Expand All @@ -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;
}

Expand Down Expand Up @@ -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");
Expand Down
9 changes: 7 additions & 2 deletions core/src/io/anuke/mindustry/ui/dialogs/ChangelogDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
Expand Down Expand Up @@ -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);

Expand All @@ -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();
}
Expand Down
9 changes: 8 additions & 1 deletion core/src/io/anuke/mindustry/ui/fragments/MenuFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;

Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit fcb74d4

Please sign in to comment.