Hide all button for units (#5953)

* Hide all button for units

* Add bundle property
This commit is contained in:
TranquillyUnpleasant
2021-09-07 22:38:43 +05:00
committed by GitHub
parent efae0d3b6a
commit 34d2a0d3a0
2 changed files with 12 additions and 0 deletions

View File

@@ -181,6 +181,17 @@ public class WaveGraph extends Table{
colors.clear();
colors.left();
colors.button("@waves.units.hide", Styles.fullTogglet, () -> {
if(hidden.size == usedCopy.size){
hidden.clear();
}else{
hidden.addAll(usedCopy);
}
used.clear();
used.addAll(usedCopy);
for(UnitType o : hidden) used.remove(o);
}).update(b -> b.setChecked(hidden.size == usedCopy.size)).height(32f).width(130f);
colors.pane(t -> {
t.left();
for(UnitType type : used){