예제 #1
0
 public void init(GameContainer gc, StateBasedGame sbg) throws SlickException {
   super.init(gc, sbg);
   multiLb = new MKLabelNode("Multiplayer");
   multiLb.setPostion(new MKPoint(50, 50));
   multiLb.setFont(new Font("Verdana", Font.BOLD, 50));
   // gc font x y w h
   textField =
       new TextField(
           gc, new TrueTypeFont(new Font("Verdana", Font.BOLD, 30), false), 50, 10, 500, 50);
   textField.setText("username...");
   textField.setCursorPos("username...".length());
 }
예제 #2
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);
 }