Hi guys! This is my first thread on this awesome forum. I have been reading a lot of threads, learning a lot of things thanks to all of you. Now I have another problem and I guess that nobody before posted it (i searched but find anything) (sorry for my bad english)
Im trying to use fonts on slick2D to simple draw “info strings” like player position, currentState and that kind of things.
The code:
import java.awt.Font;
import org.newdawn.slick.UnicodeFont;
import org.newdawn.slick.Graphics;
Font font = new Font(“Serif”, Font.BOLD, 15);
UnicodeFont ufont= new UnicodeFont(font, font.getSize(), font.isBold(), font.isItalic());
g.setFont(ufont);
g.drawString(cad, 15, 45); <----------doesn’t work (compile ok)
ufont.drawString(15, 45, cad); <----------doesn’t work either (compile ok)
Really dunno why.
Game runs fine. No warnings. No errors. No crashes. Just dont want to draw the Strings.
Any idea?
Thanks!!
P.D.: cad is already innitiated.