mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-21 20:18:14 +07:00
Should fix issue where wide screen ratios would display item in wrong location
This commit is contained in:
parent
60816c9e6d
commit
1ad3349bb3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user