Added max units field for wave editor
This commit is contained in:
@@ -384,6 +384,7 @@ waves.waves = wave(s)
|
|||||||
waves.perspawn = per spawn
|
waves.perspawn = per spawn
|
||||||
waves.shields = shields/wave
|
waves.shields = shields/wave
|
||||||
waves.to = to
|
waves.to = to
|
||||||
|
waves.max = max units
|
||||||
waves.guardian = Guardian
|
waves.guardian = Guardian
|
||||||
waves.preview = Preview
|
waves.preview = Preview
|
||||||
waves.edit = Edit...
|
waves.edit = Edit...
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ public class MapResizeDialog extends BaseDialog{
|
|||||||
|
|
||||||
public MapResizeDialog(Intc2 cons){
|
public MapResizeDialog(Intc2 cons){
|
||||||
super("@editor.resizemap");
|
super("@editor.resizemap");
|
||||||
|
|
||||||
|
closeOnBack();
|
||||||
shown(() -> {
|
shown(() -> {
|
||||||
cont.clear();
|
cont.clear();
|
||||||
width = editor.width();
|
width = editor.width();
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import mindustry.gen.*;
|
|||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.io.*;
|
import mindustry.io.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.ui.*;
|
|
||||||
import mindustry.ui.dialogs.*;
|
import mindustry.ui.dialogs.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
@@ -171,9 +170,8 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
t.remove();
|
t.remove();
|
||||||
updateWaves();
|
updateWaves();
|
||||||
}).pad(-6).size(46f).padRight(-12f);
|
}).pad(-6).size(46f).padRight(-12f);
|
||||||
}, () -> showUpdate(group)).height(46f).pad(-6f).padBottom(0f);
|
}, () -> showUpdate(group)).height(46f).pad(-6f).padBottom(0f).row();
|
||||||
|
|
||||||
t.row();
|
|
||||||
t.table(spawns -> {
|
t.table(spawns -> {
|
||||||
spawns.field("" + (group.begin + 1), TextFieldFilter.digitsOnly, text -> {
|
spawns.field("" + (group.begin + 1), TextFieldFilter.digitsOnly, text -> {
|
||||||
if(Strings.canParsePositiveInt(text)){
|
if(Strings.canParsePositiveInt(text)){
|
||||||
@@ -191,8 +189,8 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
updateWaves();
|
updateWaves();
|
||||||
}
|
}
|
||||||
}).width(100f).get().setMessageText("∞");
|
}).width(100f).get().setMessageText("∞");
|
||||||
});
|
}).row();
|
||||||
t.row();
|
|
||||||
t.table(p -> {
|
t.table(p -> {
|
||||||
p.add("@waves.every").padRight(4);
|
p.add("@waves.every").padRight(4);
|
||||||
p.field(group.spacing + "", TextFieldFilter.digitsOnly, text -> {
|
p.field(group.spacing + "", TextFieldFilter.digitsOnly, text -> {
|
||||||
@@ -202,9 +200,8 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
}).width(100f);
|
}).width(100f);
|
||||||
p.add("@waves.waves").padLeft(4);
|
p.add("@waves.waves").padLeft(4);
|
||||||
});
|
}).row();
|
||||||
|
|
||||||
t.row();
|
|
||||||
t.table(a -> {
|
t.table(a -> {
|
||||||
a.field(group.unitAmount + "", TextFieldFilter.digitsOnly, text -> {
|
a.field(group.unitAmount + "", TextFieldFilter.digitsOnly, text -> {
|
||||||
if(Strings.canParsePositiveInt(text)){
|
if(Strings.canParsePositiveInt(text)){
|
||||||
@@ -221,8 +218,19 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
}).width(80f);
|
}).width(80f);
|
||||||
a.add("@waves.perspawn").padLeft(4);
|
a.add("@waves.perspawn").padLeft(4);
|
||||||
});
|
}).row();
|
||||||
t.row();
|
|
||||||
|
t.table(a -> {
|
||||||
|
a.field(group.max + "", TextFieldFilter.digitsOnly, text -> {
|
||||||
|
if(Strings.canParsePositiveInt(text)){
|
||||||
|
group.max = Strings.parseInt(text);
|
||||||
|
updateWaves();
|
||||||
|
}
|
||||||
|
}).width(80f);
|
||||||
|
|
||||||
|
a.add("@waves.max").padLeft(5);
|
||||||
|
}).row();
|
||||||
|
|
||||||
t.table(a -> {
|
t.table(a -> {
|
||||||
a.field((int)group.shields + "", TextFieldFilter.digitsOnly, text -> {
|
a.field((int)group.shields + "", TextFieldFilter.digitsOnly, text -> {
|
||||||
if(Strings.canParsePositiveInt(text)){
|
if(Strings.canParsePositiveInt(text)){
|
||||||
@@ -239,9 +247,8 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
}).width(80f);
|
}).width(80f);
|
||||||
a.add("@waves.shields").padLeft(4);
|
a.add("@waves.shields").padLeft(4);
|
||||||
});
|
}).row();
|
||||||
|
|
||||||
t.row();
|
|
||||||
t.check("@waves.guardian", b -> group.effect = (b ? StatusEffects.boss : null)).padTop(4).update(b -> b.setChecked(group.effect == StatusEffects.boss)).padBottom(8f);
|
t.check("@waves.guardian", b -> group.effect = (b ? StatusEffects.boss : null)).padTop(4).update(b -> b.setChecked(group.effect == StatusEffects.boss)).padBottom(8f);
|
||||||
}).width(340f).pad(8);
|
}).width(340f).pad(8);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user