Disabled 'import github' button on Android because Android is garbage and can't even do something as simple as an HTTP request without 5 workaround for different versions

This commit is contained in:
Anuken
2019-10-27 10:51:35 -04:00
parent 4e946ae52b
commit 34db321577
3 changed files with 33 additions and 32 deletions

View File

@@ -14,7 +14,6 @@
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:isGame="true" android:isGame="true"
android:appCategory="game" android:appCategory="game"
android:usesCleartextTraffic="true"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/GdxTheme" android:fullBackupContent="@xml/backup_rules"> android:theme="@style/GdxTheme" android:fullBackupContent="@xml/backup_rules">
<meta-data android:name="android.max_aspect" android:value="2.1"/> <meta-data android:name="android.max_aspect" android:value="2.1"/>

View File

@@ -29,8 +29,9 @@ public class ModsDialog extends FloatingDialog{
buttons.addImageTextButton("$mods.guide", Icon.wiki, buttons.addImageTextButton("$mods.guide", Icon.wiki,
() -> Core.net.openURI(modGuideURL)) () -> Core.net.openURI(modGuideURL))
.size(210f, 64f); .size(android ? 210f + 250f + 10f : 210, 64f).colspan(android ? 2 : 1);
if(!android){
buttons.addImageTextButton("$mod.import.github", Icon.github, () -> { buttons.addImageTextButton("$mod.import.github", Icon.github, () -> {
ui.showTextInput("$mod.import.github", "", 64, "Anuken/ExampleMod", text -> { ui.showTextInput("$mod.import.github", "", 64, "Anuken/ExampleMod", text -> {
ui.loadfrag.show(); ui.loadfrag.show();
@@ -62,6 +63,7 @@ public class ModsDialog extends FloatingDialog{
}, t -> Core.app.post(() -> ui.showException(t))); }, t -> Core.app.post(() -> ui.showException(t)));
}); });
}).size(250f, 64f); }).size(250f, 64f);
}
shown(this::setup); shown(this::setup);

View File

@@ -241,7 +241,7 @@ public class Block extends BlockStorage{
} }
public void drawCracks(Tile tile){ public void drawCracks(Tile tile){
if(!tile.entity.damaged()) return; if(!tile.entity.damaged() || size > maxCrackSize) return;
int id = tile.pos(); int id = tile.pos();
TextureRegion region = cracks[size - 1][Mathf.clamp((int)((1f - tile.entity.healthf()) * crackRegions), 0, crackRegions-1)]; TextureRegion region = cracks[size - 1][Mathf.clamp((int)((1f - tile.entity.healthf()) * crackRegions), 0, crackRegions-1)];
Draw.colorl(0.2f, 0.1f + (1f - tile.entity.healthf())* 0.6f); Draw.colorl(0.2f, 0.1f + (1f - tile.entity.healthf())* 0.6f);