You can try using ShapeRenderer to draw the border first, then batch.draw above it. This is done exclusively in code, without using texture. The blue frame is added in the code below.
In render() add the following after batch.end() .
batch.end(); // Add the following after this line sr.setProjectionMatrix(camera.combined); sr.begin(ShapeType.Line); sr.setColor(new Color(0,0,1,0)); sr.rect((mapPosX * Block.WIDTH), (mapPosY * Block.HEIGHT), Block.WIDTH, Block.HEIGHT)); sr.end();
Of course, you need to initialize the ShapeRenderer in your implementation of Screen or ApplicationListener . Just do it in the code where you declare and initialize the package.
In the class Game:
SpriteBatch batch;
In your constructor:
batch = new SpriteBatch(); //Put the following below this line sr = new ShapeRenderer();
edit: I rewrote the function so that you can draw the shape after drawing the texture pack.
nedR
source share