GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
TrueTypeFont trueTypeFont = new TrueTypeFont(font, false);
int code;
do{
Display.update();
trueTypeFont.drawString(10, 18, "Press a KEY for " + place, 1, -1);
trueTypeFont.drawString(10, 34, "Last assign was " + Keyboard.getKeyName(lastkey), 1, -1);
trueTypeFont.drawString(10, 50, "Press ESC or close to cancel", 1, -1);
Keyboard.next();
if(Display.isCloseRequested() || Keyboard.getEventKey() == Keyboard.KEY_ESCAPE)
code = lastkey;
else
code = Keyboard.getEventKey();
}
while(code == Keyboard.CHAR_NONE);
trueTypeFont.destroy();
Display.destroy();
return code;
}