mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-08 00:38:38 +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 JMenuItem run, pause, stop;
|
||||||
private boolean runScript, pauseScript;
|
private boolean runScript, pauseScript;
|
||||||
|
|
||||||
public static BotUI getInstance() {
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BotUI(String username, String password) {
|
public BotUI(String username, String password) {
|
||||||
if (instance != null) {
|
if (instance != null) {
|
||||||
throw new IllegalStateException("BotUI already created");
|
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() {
|
private void createMenu() {
|
||||||
JMenuBar menuBar = new JMenuBar();
|
JMenuBar menuBar = new JMenuBar();
|
||||||
|
|
||||||
@@ -191,8 +191,10 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setScriptState(int state) {
|
private void setScriptState(int state) {
|
||||||
|
if (Context.getInstance().getRunningScript() != null) {
|
||||||
Context.getInstance().getRunningScript().setState(state);
|
Context.getInstance().getRunningScript().setState(state);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void componentResized(ComponentEvent e) {
|
public void componentResized(ComponentEvent e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user