Should fix issue where wide screen ratios would display item in wrong location

This commit is contained in:
Collin Smith 2019-04-15 18:49:58 -07:00
parent 60816c9e6d
commit 1ad3349bb3

View File

@ -97,7 +97,7 @@ public class Cursor {
if (dc != null) {
BBox box = dc.getBox();
coords.set(Gdx.input.getX(), Gdx.input.getY());
Riiablo.viewport.unproject(coords);
Riiablo.extendViewport.unproject(coords);
coords.sub(box.width / 2f, box.height / 2f);
batch.begin();
@ -110,7 +110,7 @@ public class Cursor {
if (DEBUG_ITEM_BOUNDS) {
ShapeRenderer shapes = Riiablo.shapes;
shapes.setProjectionMatrix(Riiablo.viewport.getCamera().combined);
shapes.setProjectionMatrix(Riiablo.extendViewport.getCamera().combined);
shapes.begin(ShapeRenderer.ShapeType.Line);
shapes.setColor(Color.GREEN);
shapes.rect(coords.x, coords.y, box.width, box.height);