Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken 2020-08-03 22:53:45 -04:00
commit 7ecd8b3169
2 changed files with 36 additions and 30 deletions

View File

@ -41,7 +41,7 @@ Server builds are bundled with each released build (in Releases). If you'd rathe
1. Install the Android SDK [here.](https://developer.android.com/studio#downloads) Make sure you're downloading the "Command line tools only", as Android Studio is not required.
2. Create a file named `local.properties` inside the Mindustry directory, with its contents looking like this: `sdk.dir=<Path to Android SDK you just downloaded, without these bracket>`. For example, if you're on Windows and installed the tools to C:\\tools, your local.properties would contain `sdk.dir=C:\\tools` (*note the double backslashes are required instead of single ones!*).
3. Run `gradlew android:assembleDebug` (or `./gradlew` if on linux/mac). This will create an unsigned APK in `android/build/outputs/apk`.
4. (Optional) To debug the application on a connected phone, do `gradlew android:installDebug android:run`. It is **highly recommended** to use IntelliJ for this instead, however.
4. (Optional) To debug the application on a connected phone, do `gradlew android:installDebug android:run`. It is **highly recommended** to use IntelliJ for this instead.
##### Troubleshooting

View File

@ -166,43 +166,42 @@ public class ModsDialog extends BaseDialog{
t.top().left();
t.margin(12f);
t.add(new BorderImage(){
{
if(mod.iconTexture != null){
setDrawable(new TextureRegion(mod.iconTexture));
}else{
setDrawable(Tex.clear);
}
}
@Override
public void draw(){
super.draw();
if(mod.iconTexture == null){
Fonts.def.draw(letter, x + width/2f, y + height/2f, Align.center);
}
}
}.border(Pal.accent)).size(h - 8f).padTop(-8f).padLeft(-8f).padRight(2f);
t.defaults().left().top();
t.table(title -> {
title.left();
title.add(new BorderImage(){
{
if(mod.iconTexture != null){
setDrawable(new TextureRegion(mod.iconTexture));
}else{
setDrawable(Tex.clear);
}
border(Pal.accent);
}
@Override
public void draw(){
super.draw();
if(mod.iconTexture == null){
Fonts.def.draw(letter, x + width/2f, y + height/2f, Align.center);
}
}
}).size(h - 8f).padTop(-8f).padLeft(-8f).padRight(8f);
title.add("" + mod.meta.displayName() + "\n[lightgray]v" + mod.meta.version + (mod.enabled() ? "" : "\n" + Core.bundle.get("mod.disabled") + "")).wrap().width(170f).growX();
title.add().growX();
}).growX().left();
title.button(mod.enabled() ? "$mod.disable" : "$mod.enable", mod.enabled() ? Icon.downOpen : Icon.upOpen, Styles.transt, () -> {
t.table(right -> {
right.right();
right.button(mod.enabled() ? "$mod.disable" : "$mod.enable", mod.enabled() ? Icon.downOpen : Icon.upOpen, Styles.transt, () -> {
mods.setEnabled(mod, !mod.enabled());
setup();
}).height(50f).margin(8f).width(130f).disabled(!mod.isSupported());
if(steam && !mod.hasSteamID()){
title.button(Icon.download, Styles.clearTransi, () -> {
platform.publish(mod);
}).size(50f);
}
title.button(mod.hasSteamID() ? Icon.link : Icon.trash, Styles.clearPartiali, () -> {
right.button(mod.hasSteamID() ? Icon.link : Icon.trash, Styles.clearPartiali, () -> {
if(!mod.hasSteamID()){
ui.showConfirm("$confirm", "$mod.remove.confirm", () -> {
mods.removeMod(mod);
@ -212,7 +211,14 @@ public class ModsDialog extends BaseDialog{
platform.viewListing(mod);
}
}).size(50f);
}).growX().left();
if(steam && !mod.hasSteamID()){
right.row();
right.button(Icon.download, Styles.clearTransi, () -> {
platform.publish(mod);
}).size(50f);
}
}).growX().right();
t.row();
if(!mod.isSupported()){
@ -225,7 +231,7 @@ public class ModsDialog extends BaseDialog{
t.labelWrap("$mod.erroredcontent").growX();
t.row();
}
}, Styles.clearPartialt, () -> showMod(mod)).size(w, h);
}, Styles.clearPartialt, () -> showMod(mod)).size(w, h).growX().pad(4f);
table.row();
}
});