From 191bccc3d1dfb7ca728df47ae75cfb12fcaee183 Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 17 Mar 2011 05:22:42 +0000 Subject: added Jopup fix for menu in remote menu added controls to blimp removed blimp creating from ui changeed Blimpbox to get the primitive for orientation based on phil's design --- src/tesseract/objects/remote/BlimpMenuItem.java | 20 ++++++++++++++++++++ src/tesseract/objects/remote/RemoteObjectMenu.java | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/tesseract/objects/remote/BlimpMenuItem.java (limited to 'src/tesseract/objects/remote') diff --git a/src/tesseract/objects/remote/BlimpMenuItem.java b/src/tesseract/objects/remote/BlimpMenuItem.java new file mode 100644 index 0000000..1449c9c --- /dev/null +++ b/src/tesseract/objects/remote/BlimpMenuItem.java @@ -0,0 +1,20 @@ +package tesseract.objects.remote; + +import javax.vecmath.Vector3f; + +import tesseract.objects.blimp.Blimp; +import tesseract.objects.tank.Tank; + +public class BlimpMenuItem extends RemoteObjectMenuItem { + + + public BlimpMenuItem(final RemoteObjectMenu theMenu) { + super("Blimp", theMenu); + + } + + @Override + protected RemoteObject createRemoteObject() { + return new Blimp(new Vector3f(), 1f); + } +} \ No newline at end of file diff --git a/src/tesseract/objects/remote/RemoteObjectMenu.java b/src/tesseract/objects/remote/RemoteObjectMenu.java index 3d4435e..bb076d1 100644 --- a/src/tesseract/objects/remote/RemoteObjectMenu.java +++ b/src/tesseract/objects/remote/RemoteObjectMenu.java @@ -7,6 +7,7 @@ import java.util.ArrayList; import javax.swing.JCheckBoxMenuItem; import javax.swing.JMenu; +import javax.swing.JPopupMenu; import tesseract.World; @@ -22,12 +23,14 @@ public class RemoteObjectMenu extends JMenu { public RemoteObjectMenu(final World theWorld) { super("RC Objects"); - + // Added by Steve: Fixes viewing menu problem with Canvas3D on both my windows machines + JPopupMenu.setDefaultLightWeightPopupEnabled(false); myWorld = theWorld; myControlledObjects = new ArrayList(); // Objects that can be added add(new TankMenuItem(this)); + add(new BlimpMenuItem(this)); // Separator addSeparator(); -- cgit v1.2.3