diff --git a/core/src/sagittarius/model/MouseInfo.java b/core/src/sagittarius/model/MouseInfo.java new file mode 100644 index 0000000..20b67f0 --- /dev/null +++ b/core/src/sagittarius/model/MouseInfo.java @@ -0,0 +1,31 @@ +package sagittarius.model; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.g2d.Batch; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.scenes.scene2d.Actor; + +import sagittarius.SagittariusGame; +import sagittarius.view.GameScreen; + +public class MouseInfo extends Actor { + +// ---------- ATTRIBUTEs ---------- + + private BitmapFont font = new BitmapFont(); + +// ---------- METHODs ---------- + + @Override + public void draw(Batch batch, float parentAlpha) { + super.draw(batch, parentAlpha); + + font.draw(batch, "screen=" + (int)GameScreen.screenCursor.x + "," + (int)GameScreen.screenCursor.y, + GameScreen.worldCursor.x, GameScreen.worldCursor.y + font.getCapHeight()); + + font.draw(batch, "world=" + (int)GameScreen.worldCursor.x + "," + (int)GameScreen.worldCursor.y, + GameScreen.worldCursor.x, GameScreen.worldCursor.y + font.getCapHeight()*2); + + } + +}