mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-23 06:07:47 +07:00
Fixed minimap zoom not resetting after map load
This commit is contained in:
@ -111,7 +111,8 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
ui.showError(Core.bundle.format("editor.errorload", Strings.parseException(e, false)));
|
||||
Log.err(e);
|
||||
}
|
||||
}), true, "png")));
|
||||
}), true, "png"))
|
||||
);
|
||||
|
||||
t.addImageTextButton("$editor.export", "icon-save-map", isize, () ->
|
||||
Platform.instance.showFileChooser("$editor.savemap", "Map Files", file -> {
|
||||
|
@ -25,7 +25,7 @@ public class MinimapRenderer implements Disposable{
|
||||
private Pixmap pixmap;
|
||||
private Texture texture;
|
||||
private TextureRegion region;
|
||||
private Rectangle rect = new Rectangle(), scissor = new Rectangle();
|
||||
private Rectangle rect = new Rectangle();
|
||||
private float zoom = 4;
|
||||
|
||||
public MinimapRenderer(){
|
||||
@ -60,6 +60,7 @@ public class MinimapRenderer implements Disposable{
|
||||
pixmap.dispose();
|
||||
texture.dispose();
|
||||
}
|
||||
setZoom(4f);
|
||||
pixmap = new Pixmap(world.width(), world.height(), Format.RGBA8888);
|
||||
texture = new Texture(pixmap);
|
||||
region = new TextureRegion(texture);
|
||||
|
Reference in New Issue
Block a user