//for the first just display the menu for char selection which steers the display
//Name, Sex, Race, Class, (HairStyle, HairColor, Face)
SwingUtilities.invokeLater(new Runnable() {
public void run() {
final CharCreateJPanel pan = Singleton.get().getGuiController()
.displayCharCreateJPanel();
// action that gets executed in the update thread:
pan.addCreateActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
clientInfo.sendGamePacket(new CharacterCreate(pan.getNewCharSummary()));
//dialog will stay open, will be closed on
//create ok package or cancel
}
});
pan.addCancelActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// this gets executed in jme thread
// do 3d system calls in jme thread only!
doCharPresentation();
}
});
pan.addModelchangedListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// this gets executed in jme thread
// do 3d system calls in jme thread only!
Singleton.get().getSceneManager().removeChar();
//FIXME reevaluate model composition
charSummary.setNewCharSummary(pan.getNewCharSummary());
charSummary.attachVisuals();
charSummary.setLocalTranslation(.126f, -0.1224f, 7.76f);
Singleton.get().getSceneManager().changeCharNode(charSummary,Action.ADD);
//FIXME end of move this out
}
});
pan.afterDisplayInit();
}
});
//NICE TO HAVE:
//display x characters for x races
//change input handler to only allow left,right, escape and enter