@Override
	public void render(GameContainer container, Graphics g) {
		Font f = g.getFont();
		if (font != null)
			f = font;
		Rectangle rec = getRectangle();
		g.drawImage(graphic, rec.x, rec.y, rec.x + rec.width, rec.y +rec.height,
				0, 0, graphic.getWidth(), graphic.getHeight());
		String s = "";
		if (renderStars) {
			for (int i = 0; i < sb.length(); i++)
				s += "*";
		} else {
			s = sb.toString();
		}
		int w = f.getWidth(s);
		if (rec.height - 2 * margin >= f.getLineHeight()) {
			int i = (int) ((rec.width - w) * 0.5f);
			g.drawString(s, rec.x + i, rec.y + margin);
		}
	}