From 8590799f7678ee63dfb449c9c7b26d2af54f6d24 Mon Sep 17 00:00:00 2001 From: sharlotte Date: Sat, 21 Aug 2021 21:09:24 +0900 Subject: [PATCH] marged core tap to item tap --- assets/bundles/bundle.properties | 1 - assets/bundles/bundle_ko.properties | 1 - src/UnitInfo/core/HudUi.java | 217 ++++++------------------- src/UnitInfo/core/Main.java | 9 +- src/UnitInfo/core/SettingS.java | 2 +- src/UnitInfo/ui/CoresItemsDisplay.java | 215 +++++++++++++++--------- src/UnitInfo/ui/SBar.java | 8 +- 7 files changed, 202 insertions(+), 251 deletions(-) diff --git a/assets/bundles/bundle.properties b/assets/bundles/bundle.properties index eb931ed..4ae1e48 100644 --- a/assets/bundles/bundle.properties +++ b/assets/bundles/bundle.properties @@ -91,7 +91,6 @@ warning = Too many waves to display! Lag may occur. #Hud hud.unit = Unit Info hud.wave = Wave Info -hud.core = Core Info hud.item = Resource Info hud.cancel = Hidden diff --git a/assets/bundles/bundle_ko.properties b/assets/bundles/bundle_ko.properties index af84e3f..2f2991d 100644 --- a/assets/bundles/bundle_ko.properties +++ b/assets/bundles/bundle_ko.properties @@ -93,7 +93,6 @@ warning = 표시될 웨이브 수가 너무 많습니다! 많은 랙이 걸릴 #Hud hud.unit = 유닛 정보 hud.wave = 단계 정보 -hud.core = 코어 정보 hud.item = 자원 정보 hud.cancel = 닫음 diff --git a/src/UnitInfo/core/HudUi.java b/src/UnitInfo/core/HudUi.java index fa15715..9ffecb9 100644 --- a/src/UnitInfo/core/HudUi.java +++ b/src/UnitInfo/core/HudUi.java @@ -35,9 +35,6 @@ import mindustry.world.blocks.distribution.MassDriver; import mindustry.world.blocks.payloads.Payload; import mindustry.world.blocks.payloads.PayloadMassDriver; import mindustry.world.blocks.power.PowerNode; -import mindustry.world.blocks.storage.*; - -import java.util.Arrays; import static UnitInfo.SVars.*; import static arc.Core.*; @@ -45,7 +42,6 @@ import static mindustry.Vars.*; public class HudUi { Seq bars = new Seq<>(); - Table weapon = new Table(); Table mainTable = new Table(); Table baseTable = new Table(); Table unitTable = new Table(); @@ -54,7 +50,6 @@ public class HudUi { Table itemTable = new Table(); Table waveInfoTable = new Table(); float waveScrollPos; - float coreScrollPos; float itemScrollPos; Teamc lockedTarget; @@ -334,12 +329,9 @@ public class HudUi { } }); - Events.on(EventType.ResetEvent.class, e -> { - if(settings.getBool("allTeam")) coreItems.teams = Team.all; - else coreItems.teams = Team.baseTeams; - coreItems.resetUsed(); - coreItems.tables.each(Group::clear); - }); + Events.on(EventType.BlockDestroyEvent.class, e -> coreItems.resetUsed()); + Events.on(EventType.CoreChangeEvent.class, e -> coreItems.resetUsed()); + Events.on(EventType.ResetEvent.class, e -> coreItems.resetUsed()); } public void reset(int index, Seq