From cf688e50ab22dc5676b1f1b82144b6fb68795977 Mon Sep 17 00:00:00 2001 From: buthed010203 Date: Thu, 30 Sep 2021 12:44:39 -0400 Subject: [PATCH 1/2] changes --- assets/mod.json | 2 +- build.gradle | 9 +++++++++ src/UnitInfo/core/HudUi.java | 13 ++++++------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/assets/mod.json b/assets/mod.json index 61d966b..39c63c0 100644 --- a/assets/mod.json +++ b/assets/mod.json @@ -3,7 +3,7 @@ "displayName": "Unit Information", "author": "Sharlotte", "description": "The mod displays more information in-game, such as unit/building, wave, core, tile, item/unit total info etc", - "version": "1.4.3", + "version": "1.5.1", "main": "UnitInfo.core.Main", "minGameVersion": "131", "dependencies": [], diff --git a/build.gradle b/build.gradle index 03a462c..c0359d2 100644 --- a/build.gradle +++ b/build.gradle @@ -56,6 +56,15 @@ task dexify(type: Jar) { task buildDex dependsOn "build", "dexify" +task buildMove(dependsOn: build) { + doLast { + copy { + from "build/libs/UnitInfo.jar" + into System.getenv("destination") + } + } +} + tasks.withType(JavaCompile){ targetCompatibility = 8 sourceCompatibility = JavaVersion.VERSION_16 diff --git a/src/UnitInfo/core/HudUi.java b/src/UnitInfo/core/HudUi.java index f0bf477..e0a7a7d 100644 --- a/src/UnitInfo/core/HudUi.java +++ b/src/UnitInfo/core/HudUi.java @@ -758,16 +758,15 @@ public class HudUi { }); Table waveTable = (Table) scene.find("waves"); - Table table = (Table)waveTable.getChildren().first(); //HudFragment#198, name: x - Table statusTable = Version.number >= 131 ? (Table)scene.find("statustable") : (Table)waveTable.getChildren().get(1); - waveTable.removeChild(statusTable); - table.row(); - table.stack( - new Table(tt -> tt.collapser(t -> t.stack(waveInfoTable, statusTable.top(), pathlineTable), true, () -> waveShown)).top(), + Table infoTable = (Table) waveTable.getChildren().get(1); + waveTable.removeChild(infoTable); + waveTable.row(); + waveTable.stack( + new Table(tt -> tt.collapser(t -> t.stack(waveInfoTable, infoTable, pathlineTable).growX(), true, () -> waveShown).growX()).top(), new Table(tt -> tt.button(Icon.downOpen, Styles.clearToggleTransi, () -> waveShown = !waveShown).size(4 * 8f).checked(b -> { b.getImage().setDrawable(waveShown ? Icon.upOpen : Icon.downOpen); return waveShown; - })).left().top()).visible(() -> settings.getBool("waveui")); + })).left().top()).fillX().visible(() -> settings.getBool("waveui")); } public void reset(int index, Seq