Ejemplo n.º 1
0
  @Override
  public void render(GameContainer container, Graphics g) throws SlickException {
    nameInput.render(container, g);
    float w = font.getWidth(text);
    float h = font.getLineHeight();
    font.drawString(container.getWidth() / 2 - w / 2, container.getHeight() / 2 - h / 2, text);

    UnicodeFont namefont = Database.instance().getDefaultFont();
    namefont.drawString(
        container.getWidth() / 8, container.getHeight() / 2 - h / 2 + font.getLineHeight(), name);
    nameInput.setLocation(
        container.getWidth() / 8 + namefont.getWidth(name) + 20,
        (int) (container.getHeight() / 2 - h / 2 + font.getLineHeight()));

    nameInput.render(container, g);
  }
Ejemplo n.º 2
0
 @Override
 public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException {
   knight.draw(594, 360);
   mage.draw(784, 360);
   thief.draw(976, 360);
   g.setColor(Color.white);
   g.drawString("Name:", 650, 500);
   tf.render(gc, g);
   tf.setFocus(true);
   for (int i = 0; i < buttons.size(); i++) {
     buttons.get(i).draw(g);
   }
 }
Ejemplo n.º 3
0
 public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException {
   super.render(gc, sbg, g);
   multiLb.render(gc, g);
   textField.render(gc, g);
 }