(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

@@ -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();