Fixed unlocks not clearing / Fixed map editor not updating
This commit is contained in:
@@ -222,7 +222,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
clearChildren();
|
clearChildren();
|
||||||
margin(0);
|
margin(0);
|
||||||
build();
|
shown(this::build);
|
||||||
|
|
||||||
update(() -> {
|
update(() -> {
|
||||||
if(Core.scene.getKeyboardFocus() instanceof Dialog && Core.scene.getKeyboardFocus() != this){
|
if(Core.scene.getKeyboardFocus() instanceof Dialog && Core.scene.getKeyboardFocus() != this){
|
||||||
@@ -382,6 +382,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
float size = mobile ? (int) (Math.min(Gdx.graphics.getHeight(), Gdx.graphics.getWidth()) / amount / Unit.dp.scl(1f)) :
|
float size = mobile ? (int) (Math.min(Gdx.graphics.getHeight(), Gdx.graphics.getWidth()) / amount / Unit.dp.scl(1f)) :
|
||||||
Math.min(Gdx.graphics.getDisplayMode().height / amount, baseSize);
|
Math.min(Gdx.graphics.getDisplayMode().height / amount, baseSize);
|
||||||
|
|
||||||
|
clearChildren();
|
||||||
table(cont -> {
|
table(cont -> {
|
||||||
cont.left();
|
cont.left();
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
dialog.content().row();
|
dialog.content().row();
|
||||||
dialog.content().addButton("$text.settings.clearunlocks", "clear", () -> {
|
dialog.content().addButton("$text.settings.clearunlocks", "clear", () -> {
|
||||||
ui.showConfirm("$text.confirm", "$text.settings.clear.confirm", () -> {
|
ui.showConfirm("$text.confirm", "$text.settings.clear.confirm", () -> {
|
||||||
Settings.clearBytes("unlocks");
|
control.unlocks.reset();
|
||||||
Settings.save();
|
Settings.save();
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user