Bugfixes
This commit is contained in:
@@ -325,8 +325,9 @@ public class UI implements ApplicationListener, Loadable{
|
||||
cont.row();
|
||||
cont.addImage().width(300f).pad(2).height(4f).color(Color.scarlet);
|
||||
cont.row();
|
||||
cont.add(text).pad(2f).growX().wrap();
|
||||
buttons.addButton("$ok", this::hide).size(120, 50).pad(4);
|
||||
cont.add(text).pad(2f).growX().wrap().get().setAlignment(Align.center);
|
||||
cont.row();
|
||||
cont.addButton("$ok", this::hide).size(120, 50).pad(4);
|
||||
}}.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -67,33 +67,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
public MobileInput(){
|
||||
Events.on(ClientLoadEvent.class, e -> {
|
||||
GestureDetector dec = new GestureDetector(20, 0.5f, 0.4f, 0.15f, this){
|
||||
boolean clearMouse = false;
|
||||
|
||||
@Override
|
||||
public boolean touchDown(int x, int y, int pointer, KeyCode button){
|
||||
if(Core.scene.hasMouse(x, y)){
|
||||
clearMouse = true;
|
||||
return false;
|
||||
}
|
||||
return super.touchDown(x, y, pointer, button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean touchDragged(int x, int y, int pointer){
|
||||
if(!clearMouse){
|
||||
return super.touchDragged(x, y, pointer);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean touchUp(int x, int y, int pointer, KeyCode button){
|
||||
clearMouse = false;
|
||||
return super.touchUp(x, y, pointer, button);
|
||||
}
|
||||
};
|
||||
Core.input.getInputProcessors().insert(0, dec);
|
||||
Core.input.getInputProcessors().add(new GestureDetector(20, 0.5f, 0.4f, 0.15f, this));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -53,12 +53,18 @@ public class MapsDialog extends FloatingDialog{
|
||||
|
||||
buttons.addImageTextButton("$editor.newmap", Icon.add, () -> {
|
||||
ui.showTextInput("$editor.newmap", "$name", "", text -> {
|
||||
ui.loadAnd(() -> {
|
||||
Runnable show = () -> ui.loadAnd(() -> {
|
||||
hide();
|
||||
ui.editor.show();
|
||||
ui.editor.editor.getTags().put("name", text);
|
||||
Events.fire(new MapMakeEvent());
|
||||
});
|
||||
|
||||
if(maps.byName(text) != null){
|
||||
ui.showErrorMessage("$editor.exists");
|
||||
}else{
|
||||
show.run();
|
||||
}
|
||||
});
|
||||
}).size(210f, 64f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user