// }
// });
// instrumentation = new DefaultInstrumentation(ClientContextJME.getWorldManager());
// The menu item for the Gesture (HUD)
gestureMI = new JCheckBoxMenuItem(bundle.getString("Gesture_UI"));
gestureMI.setSelected(false);
gestureMI.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
boolean visible = gestureMI.isSelected();
if (gestureHUDRef == null || gestureHUDRef.get() == null) {
GestureHUD hud = new GestureHUD(gestureMI);
hud.setAvatarCharacter(avatarCellRenderer.getAvatarCharacter(), visible);
gestureHUDRef = new WeakReference(hud);
}
//issue #174 hud visibility management
if (visible) {
gestureHUDRef.get().setMaximized();
}
gestureHUDRef.get().setVisible(visible);
}
});
// The menu item for the avatar configuration
avatarConfigMI = new JMenuItem(bundle.getString("Avatar_Appearance..."));
avatarConfigMI.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AvatarConfigFrame f = new AvatarConfigFrame();
f.setVisible(true);
}
});
// Check box to set collision enabled
collisionResponseEnabledMI = new JCheckBoxMenuItem(bundle.getString("Avatar_Collision_Response_Enabled"));
collisionResponseEnabledMI.setSelected(true); // TODO should be set by server
collisionResponseEnabledMI.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
boolean isCollisionResponse = collisionResponseEnabledMI.isSelected();
boolean isGravity = gravityEnabledMI.isSelected();
ClientContext.getInputManager().postEvent(
new AvatarCollisionChangeRequestEvent(isCollisionResponse, isGravity));
}
});
// Check box to set gravity (floor following) enabled
gravityEnabledMI = new JCheckBoxMenuItem(bundle.getString("Avatar_Gravity_Enabled"));
gravityEnabledMI.setSelected(true); // TODO should be set by server
gravityEnabledMI.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
boolean isCollisionResponse = collisionResponseEnabledMI.isSelected();
boolean isGravity = gravityEnabledMI.isSelected();