(add schem hud setting)
This commit is contained in:
sharlottes
2022-04-05 20:55:57 +09:00
parent bf0ecd4042
commit 4f5b456ce7
5 changed files with 12 additions and 4 deletions

View File

@@ -35,6 +35,8 @@ setting.emptywave.name = Wave UI: Display Empty Wave
setting.emptywave.description = Displays empty waves in the wave list.
setting.itemcal.name = Resource UI: Calculate item inc/dec speed.
setting.itemcal.description = Calculate increase/decrease speed of core item and display results.
setting.schem.name = Display Schematic HUD
setting.schem.description = Displays schem hud on right-side, which helps quick select.
setting.rangeRadius.name = Near Range Margin
setting.rangeRadius.description = Sets the range detection distance.

View File

@@ -32,6 +32,8 @@ setting.emptywave.name = 빈 단계 표시
setting.emptywave.description = 단계 탭에서 빈 단계를 표시합니다.
setting.itemcal.name = 자원 탭: 입출력 속도 계산
setting.itemcal.description = 아이템의 증가/감소 속도를 계산하여 표시합니다.
setting.schem.name = 설계도 HUD 표시
setting.schem.description = 빠른 설계도 선택을 보조해주는 설계도 HUD를 화면 우측에 표시합니다.
setting.rangeRadius.name = 사거리 접근 거리
setting.rangeRadius.description = 사거리 감지 거리를 설정합니다.

View File

@@ -37,6 +37,7 @@ public class HudUi {
public UnitDisplay unitTable;
public WaveDisplay waveTable;
public CoreDisplay itemTable;
public SchemDisplay schemTable;
public Teamc shotTarget;
public Teamc lockedTarget;
@@ -73,6 +74,7 @@ public class HudUi {
return Vars.world.tileWorld(input.mouseWorldX(), input.mouseWorldY());
}
float heat = 0;
public void setEvents() {
Events.on(EventType.WaveEvent.class, e -> waveTable.rebuild());
Events.on(EventType.WorldLoadEvent.class, e -> itemTable.rebuild());
@@ -85,6 +87,8 @@ public class HudUi {
lockedTarget = null;
locked = false;
}
heat+=Time.delta;
if(heat>60) schemTable.setSchemTable();
if(Scl.scl(modUiScale) != settings.getInt("infoUiScale") / 100f){
modUiScale = settings.getInt("infoUiScale") / 100f;
@@ -218,11 +222,9 @@ public class HudUi {
}
public void addSchemTable() {
if(mobile) return;
Table table = (Table) scene.find("minimap/position");
table.row();
table.add(new SchemDisplay());
table.add(schemTable=new SchemDisplay());
}
public void addWaveInfoTable() {

View File

@@ -114,6 +114,7 @@ public class SettingS {
addGraphicCheckSetting("pastwave", false, tapSeq);
addGraphicCheckSetting("emptywave", true, tapSeq);
addGraphicCheckSetting("itemcal", false, tapSeq);
addGraphicCheckSetting("schem", !mobile, tapSeq);
Seq<SharSetting> rangeSeq = new Seq<>();
addGraphicTypeSetting("rangeRadius", 0, 500, 70, true, () -> true, s -> s + "tiles", rangeSeq);

View File

@@ -37,8 +37,9 @@ public class SchemDisplay extends Table {
}
void setSchemTable() {
public void setSchemTable() {
clear();
if(!settings.getBool(("schem"))) return;
right();
button(bundle.get("hud.schematic-list"), Icon.downOpen, Styles.squareTogglet, () -> schemShown = !schemShown).width(160f).height(60f).checked(b -> {
Image image = (Image)b.getCells().first().get();