mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 19:39:04 +07:00
Fixed numerical rules resetting on Android
This commit is contained in:
parent
132d058098
commit
43280ee077
@ -3,7 +3,7 @@ package io.anuke.mindustry.ui.dialogs;
|
||||
import io.anuke.arc.function.*;
|
||||
import io.anuke.arc.graphics.Color;
|
||||
import io.anuke.arc.scene.ui.layout.Table;
|
||||
import io.anuke.arc.util.Strings;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.content.Blocks;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.core.Platform;
|
||||
|
@ -22,7 +22,9 @@ public class MapPlayDialog extends FloatingDialog{
|
||||
|
||||
onResize(() -> {
|
||||
if(lastMap != null){
|
||||
Rules rules = this.rules;
|
||||
show(lastMap);
|
||||
this.rules = rules;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -53,6 +55,7 @@ public class MapPlayDialog extends FloatingDialog{
|
||||
modes.addButton(mode.toString(), "toggle", () -> {
|
||||
selectedGamemode = mode;
|
||||
rules = mode.apply(map.rules());
|
||||
Log.info("toggle rules " + rules);
|
||||
}).update(b -> b.setChecked(selectedGamemode == mode)).size(140f, 54f).disabled(!mode.valid(map));
|
||||
if(i++ % 2 == 1) modes.row();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user