mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-05 16:49:41 +00:00
Modified 'disable bot dialog' implementation
This commit is contained in:
@@ -52,13 +52,8 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
|||||||
JMenu scripts = new JMenu("Script");
|
JMenu scripts = new JMenu("Script");
|
||||||
|
|
||||||
JMenuItem proxy = new JMenuItem("Network");
|
JMenuItem proxy = new JMenuItem("Network");
|
||||||
final JMenuItem dialog = new JCheckBoxMenuItem("Disable dialog");
|
JMenuItem dialog = new JCheckBoxMenuItem("Disable dialog");
|
||||||
dialog.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
BotDialog.getInstance().setVisible(!dialog.isSelected());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
JMenuItem exit = new JMenuItem("Exit");
|
JMenuItem exit = new JMenuItem("Exit");
|
||||||
|
|
||||||
run = new JMenuItem("Run");
|
run = new JMenuItem("Run");
|
||||||
@@ -73,6 +68,7 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
|||||||
stop.setIcon(new ImageIcon(Images.getResource("/org/parabot/core/ui/images/stop.png")));
|
stop.setIcon(new ImageIcon(Images.getResource("/org/parabot/core/ui/images/stop.png")));
|
||||||
|
|
||||||
proxy.addActionListener(this);
|
proxy.addActionListener(this);
|
||||||
|
dialog.addActionListener(this);
|
||||||
exit.addActionListener(this);
|
exit.addActionListener(this);
|
||||||
|
|
||||||
run.addActionListener(this);
|
run.addActionListener(this);
|
||||||
@@ -129,6 +125,9 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
|||||||
break;
|
break;
|
||||||
case "Stop":
|
case "Stop":
|
||||||
setScriptState(Script.STATE_STOPPED);
|
setScriptState(Script.STATE_STOPPED);
|
||||||
|
break;
|
||||||
|
case "Disable dialog":
|
||||||
|
BotDialog.getInstance().setVisible(!dialog.isVisible());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
System.out.println("Invalid command: " + command);
|
System.out.println("Invalid command: " + command);
|
||||||
|
|||||||
Reference in New Issue
Block a user