summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve <steveb9@u.washington.edu>2011-03-18 03:24:10 +0000
committerSteve <steveb9@u.washington.edu>2011-03-18 03:24:10 +0000
commit719b854c559d4d696ab8055c03371a3049419543 (patch)
tree25c8bfc857c8f9e6ef61f47d4096a09628a37fa8 /src
parent544548ac412807b38295bfb4c1159c6980ef90ff (diff)
Added about menu for controls and info
Diffstat (limited to 'src')
-rw-r--r--src/tesseract/TesseractUI.java33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/tesseract/TesseractUI.java b/src/tesseract/TesseractUI.java
index 5c7e728..e5a4ad3 100644
--- a/src/tesseract/TesseractUI.java
+++ b/src/tesseract/TesseractUI.java
@@ -237,7 +237,7 @@ public class TesseractUI extends JFrame {
((MenuItem) item).setParent(this);
}
menuBar.add(objectsMenu);
-
+
//Network
JMenu networkMenu = new JMenu("Network");
final JMenuItem join = new JMenuItem("Join Network");
@@ -421,6 +421,37 @@ public class TesseractUI extends JFrame {
// Remote Objects
menuBar.add(myRemoteObjects);
+ //About
+ JMenu aboutMenu = new JMenu("About");
+ final JMenuItem commandsMsg = new JMenuItem("KeyBoard Commands");
+ commandsMsg.addActionListener(new ActionListener() {
+
+ public void actionPerformed(ActionEvent e) {
+ JOptionPane.showMessageDialog( null,
+ "Tank:\n" +
+ "a = left\nb = right\n" +
+ "w = forward\ns = backup\n\n" +
+ "Blimp:\n" +
+ "arrows = steer up, down, left, right\n" +
+ "w = forward\na = roll left\nd = roll right\n" +
+ "s = backup\n\n" +
+ "TO FIRE ON BOTH = space");
+ }
+ });
+ final JMenuItem infoMsg = new JMenuItem("Information");
+ infoMsg.addActionListener(new ActionListener() {
+
+ public void actionPerformed(ActionEvent e) {
+ JOptionPane.showMessageDialog( null,
+ "This program allows the user\n" +
+ "to send the RC object to another\n" +
+ "world and control it remotely");
+ }
+ });
+ aboutMenu.add(infoMsg);
+ aboutMenu.add(commandsMsg);
+ menuBar.add(aboutMenu);
+
setJMenuBar(menuBar);
}