diff options
Diffstat (limited to 'src/tesseract/objects/remote')
-rw-r--r-- | src/tesseract/objects/remote/BlimpMenuItem.java | 20 | ||||
-rw-r--r-- | src/tesseract/objects/remote/RemoteObjectMenu.java | 5 |
2 files changed, 24 insertions, 1 deletions
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<RemoteObject>(); // Objects that can be added add(new TankMenuItem(this)); + add(new BlimpMenuItem(this)); // Separator addSeparator(); |