mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-10-01 10:27:24 +00:00
Fixed pausing the bot
This commit is contained in:
@@ -28,10 +28,6 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
private JMenuItem run, pause, stop;
|
||||
private boolean runScript, pauseScript;
|
||||
|
||||
public static BotUI getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public BotUI(String username, String password) {
|
||||
if (instance != null) {
|
||||
throw new IllegalStateException("BotUI already created");
|
||||
@@ -63,6 +59,10 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
}
|
||||
}
|
||||
|
||||
public static BotUI getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void createMenu() {
|
||||
JMenuBar menuBar = new JMenuBar();
|
||||
|
||||
@@ -191,8 +191,10 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
}
|
||||
|
||||
private void setScriptState(int state) {
|
||||
if (Context.getInstance().getRunningScript() != null) {
|
||||
Context.getInstance().getRunningScript().setState(state);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void componentResized(ComponentEvent e) {
|
||||
|
||||
Reference in New Issue
Block a user