mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-12-22 23:14:00 +07:00
Better portrait UI for mobile in-game editor
This commit is contained in:
parent
144229803a
commit
2112c5c654
@ -271,6 +271,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
));
|
||||
world.endMapLoad();
|
||||
player.set(world.width() * tilesize/2f, world.height() * tilesize/2f);
|
||||
Core.camera.position.set(player);
|
||||
player.clearUnit();
|
||||
|
||||
for(var unit : Groups.unit){
|
||||
|
@ -770,7 +770,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
}
|
||||
|
||||
//zoom camera
|
||||
if(!locked && Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!player.isBuilder() || !isPlacing() || !block.rotate) && selectPlans.isEmpty()))){
|
||||
if(!locked && !scene.hasKeyboard() && !scene.hasScroll() && Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!player.isBuilder() || !isPlacing() || !block.rotate) && selectPlans.isEmpty()))){
|
||||
renderer.scaleCamera(Core.input.axisTap(Binding.zoom));
|
||||
}
|
||||
|
||||
|
@ -391,6 +391,7 @@ public class HudFragment{
|
||||
if(mobile){
|
||||
editorMain.row().spacerY(() -> {
|
||||
if(control.input instanceof MobileInput mob){
|
||||
if(Core.graphics.isPortrait()) return Core.graphics.getHeight() / 2f / Scl.scl(1f);
|
||||
if(mob.hasSchematic()) return 156f;
|
||||
if(mob.showCancel()) return 50f;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user