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)));
|
ui.showError(Core.bundle.format("editor.errorload", Strings.parseException(e, false)));
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
}
|
}
|
||||||
}), true, "png")));
|
}), true, "png"))
|
||||||
|
);
|
||||||
|
|
||||||
t.addImageTextButton("$editor.export", "icon-save-map", isize, () ->
|
t.addImageTextButton("$editor.export", "icon-save-map", isize, () ->
|
||||||
Platform.instance.showFileChooser("$editor.savemap", "Map Files", file -> {
|
Platform.instance.showFileChooser("$editor.savemap", "Map Files", file -> {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class MinimapRenderer implements Disposable{
|
|||||||
private Pixmap pixmap;
|
private Pixmap pixmap;
|
||||||
private Texture texture;
|
private Texture texture;
|
||||||
private TextureRegion region;
|
private TextureRegion region;
|
||||||
private Rectangle rect = new Rectangle(), scissor = new Rectangle();
|
private Rectangle rect = new Rectangle();
|
||||||
private float zoom = 4;
|
private float zoom = 4;
|
||||||
|
|
||||||
public MinimapRenderer(){
|
public MinimapRenderer(){
|
||||||
@@ -60,6 +60,7 @@ public class MinimapRenderer implements Disposable{
|
|||||||
pixmap.dispose();
|
pixmap.dispose();
|
||||||
texture.dispose();
|
texture.dispose();
|
||||||
}
|
}
|
||||||
|
setZoom(4f);
|
||||||
pixmap = new Pixmap(world.width(), world.height(), Format.RGBA8888);
|
pixmap = new Pixmap(world.width(), world.height(), Format.RGBA8888);
|
||||||
texture = new Texture(pixmap);
|
texture = new Texture(pixmap);
|
||||||
region = new TextureRegion(texture);
|
region = new TextureRegion(texture);
|
||||||
|
|||||||
Reference in New Issue
Block a user