mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 19:39:04 +07:00
Removed difficulty
This commit is contained in:
parent
122f43ddb9
commit
89b3d3b670
core
@ -153,7 +153,7 @@ confirm = Confirm
|
|||||||
delete = Delete
|
delete = Delete
|
||||||
ok = OK
|
ok = OK
|
||||||
open = Open
|
open = Open
|
||||||
customize = Customize
|
customize = Customize Rules
|
||||||
cancel = Cancel
|
cancel = Cancel
|
||||||
openlink = Open Link
|
openlink = Open Link
|
||||||
copylink = Copy Link
|
copylink = Copy Link
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package io.anuke.mindustry.ui.dialogs;
|
package io.anuke.mindustry.ui.dialogs;
|
||||||
|
|
||||||
import io.anuke.arc.Core;
|
import io.anuke.arc.Core;
|
||||||
import io.anuke.arc.math.Mathf;
|
|
||||||
import io.anuke.arc.scene.event.Touchable;
|
|
||||||
import io.anuke.arc.scene.ui.ScrollPane;
|
import io.anuke.arc.scene.ui.ScrollPane;
|
||||||
import io.anuke.arc.scene.ui.layout.Table;
|
import io.anuke.arc.scene.ui.layout.Table;
|
||||||
import io.anuke.arc.util.Scaling;
|
import io.anuke.arc.util.Scaling;
|
||||||
@ -13,7 +11,6 @@ import io.anuke.mindustry.ui.BorderImage;
|
|||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
public class MapPlayDialog extends FloatingDialog{
|
public class MapPlayDialog extends FloatingDialog{
|
||||||
Difficulty difficulty = Difficulty.normal;
|
|
||||||
CustomRulesDialog dialog = new CustomRulesDialog();
|
CustomRulesDialog dialog = new CustomRulesDialog();
|
||||||
Rules rules;
|
Rules rules;
|
||||||
Gamemode selectedGamemode = Gamemode.survival;
|
Gamemode selectedGamemode = Gamemode.survival;
|
||||||
@ -55,33 +52,7 @@ public class MapPlayDialog extends FloatingDialog{
|
|||||||
|
|
||||||
cont.add(selmode);
|
cont.add(selmode);
|
||||||
cont.row();
|
cont.row();
|
||||||
|
cont.addImageTextButton("$customize", "icon-tools", 14*2, () -> dialog.show(rules, () -> rules = (selectedGamemode == null ? map.rules() : selectedGamemode.apply(map.rules())))).width(230);
|
||||||
Difficulty[] ds = Difficulty.values();
|
|
||||||
|
|
||||||
float s = 50f;
|
|
||||||
|
|
||||||
Table sdif = new Table();
|
|
||||||
|
|
||||||
sdif.add("$setting.difficulty.name").colspan(3);
|
|
||||||
sdif.row();
|
|
||||||
sdif.defaults().height(s + 4);
|
|
||||||
sdif.addImageButton("icon-arrow-left", 10 * 3, () -> {
|
|
||||||
difficulty = (ds[Mathf.mod(difficulty.ordinal() - 1, ds.length)]);
|
|
||||||
state.wavetime = difficulty.waveTime;
|
|
||||||
}).width(s);
|
|
||||||
|
|
||||||
sdif.addButton("", () -> {}).update(t -> {
|
|
||||||
t.setText(difficulty.toString());
|
|
||||||
t.touchable(Touchable.disabled);
|
|
||||||
}).width(180f);
|
|
||||||
|
|
||||||
sdif.addImageButton("icon-arrow-right", 10 * 3, () -> {
|
|
||||||
difficulty = (ds[Mathf.mod(difficulty.ordinal() + 1, ds.length)]);
|
|
||||||
state.wavetime = difficulty.waveTime;
|
|
||||||
}).width(s);
|
|
||||||
sdif.addButton("$customize", () -> dialog.show(rules, () -> rules = (selectedGamemode == null ? map.rules() : selectedGamemode.apply(map.rules())))).width(140).padLeft(10);
|
|
||||||
|
|
||||||
cont.add(sdif);
|
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.add(new BorderImage(map.texture, 3f)).size(mobile && !Core.graphics.isPortrait() ? 150f : 250f).get().setScaling(Scaling.fit);
|
cont.add(new BorderImage(map.texture, 3f)).size(mobile && !Core.graphics.isPortrait() ? 150f : 250f).get().setScaling(Scaling.fit);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user