Hello again!
This time I want to draw a font. I simply used
BitmapFont font = new BitmapFont();
to get the default font and
font.draw(batch, text, buttonSprite.getX(), buttonSprite.getY()+1);
in the render to draw the font. I want to make a custom button using the buttonSprite (which is correctly drawn) and the font. I know there’s a Scene2D ui, however I’m interested in keyboard control of the buttons and I haven’t found how to do that with the scene2D, so I’m making my own content
The problem is that I’m using a TiledMap with a camera, so everything is scaled to 1/32 (because map’s tilesize is 32 px). For example, my 32x32 sprites are resized as sprite.setSize(1,1) in order to fit the map.
Well, the problem is that the font looks HUGE. I tried to scale it using font.scale(). For example, -0.96f is a good scale size, but, when I write less than -0.6f, the characters get clipped, or even dissapears.
Am I missing something important? Should I use another class instead of BitmapFont?
Every answer is welcome!
EDIT: Solved. I wanted on Google over 2 - 3 hours xD. I finally solved it, you can see the solution in this SE questioin. It’s a really stupid thing: http://stackoverflow.com/questions/19450627/libgdx-android-game-displaying-fixed-text-ie-score-over-a-scrolling-screen
So I only have to add font.setUseIntegerPositions(false); before scaling.