summaryrefslogtreecommitdiff
path: root/src/tesseract/objects/remote
diff options
context:
space:
mode:
authorSteve <steveb9@u.washington.edu>2011-03-17 05:22:42 +0000
committerSteve <steveb9@u.washington.edu>2011-03-17 05:22:42 +0000
commit191bccc3d1dfb7ca728df47ae75cfb12fcaee183 (patch)
treef697c7a9f89431c697b68d27fe46dbd357bf7cb2 /src/tesseract/objects/remote
parent825a414d92af1be3c84b61ac59e1d1291b795220 (diff)
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
Diffstat (limited to 'src/tesseract/objects/remote')
-rw-r--r--src/tesseract/objects/remote/BlimpMenuItem.java20
-rw-r--r--src/tesseract/objects/remote/RemoteObjectMenu.java5
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();