Reputation: 160
I have tried the code given below:
Assets.font.draw(objspritebatch, chooseBackground, Gdx.graphics.getWidth()*.5f,Gdx.graphics.getHeight()*.5f);
Upvotes: 0
Views: 2286
Reputation: 3931
If you are going to draw text, it's probably in the game's HUD or in the menus. Then you should check out scene2d, and especially the scene2d.ui widget Label. And don't forget to explore the API.
However, to simply draw text on the screen, check out this wiki article. If you want to use your own custom font, you will need to package it with Hiero.
Upvotes: 2