Skip to content

Commit a6cfac7

Browse files
Symb1OSVasiliy Litvinenko
authored and
Vasiliy Litvinenko
committed
stats mode
1 parent 4e8e57b commit a6cfac7

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

bdofishbot-bot/src/main/java/ru/namibios/bdofishbot/bot/Stats.java

+9
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public Stats() {
2121
private String hash;
2222
private long startWork;
2323
private long endWork;
24+
private String mode;
2425

2526
private StatSeries current;
2627
private List<StatSeries> series;
@@ -40,6 +41,14 @@ public void setHash(String hash) {
4041
this.hash = hash;
4142
}
4243

44+
public String getMode() {
45+
return mode;
46+
}
47+
48+
public void setMode(String mode) {
49+
this.mode = mode;
50+
}
51+
4352
public void updateEndWork() {
4453
endWork = new Date().getTime();
4554
}

bdofishbot-bot/src/main/java/ru/namibios/bdofishbot/bot/state/FishBot.java

+2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ public FishBot(boolean start) {
9494

9595
this.timer = new Timer();
9696
this.pauseService = new PauseService(Application.getInstance().TASK_PAUSE());
97+
9798
this.stats = new Stats();
99+
this.stats.setMode(Application.getInstance().MODE().name());
98100

99101
}
100102

bdofishbot-gui/src/main/java/ru/namibios/bdofishbot/gui/MousePointer.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ public MousePointer(JLabel mouseXY) {
1616

1717
@Override
1818
public void nativeMouseMoved(NativeMouseEvent nativeMouseEvent) {
19-
19+
mouseXY.setText(String.format("[x: %s, y: %s]",
20+
(int) MouseInfo.getPointerInfo().getLocation().getLocation().getX(),
21+
(int) MouseInfo.getPointerInfo().getLocation().getLocation().getY()));
2022
}
2123

2224
@Override
2325
public void nativeMouseDragged(NativeMouseEvent nativeMouseEvent) {
24-
mouseXY.setText(String.format("[x: %s, y: %s]",
25-
(int) MouseInfo.getPointerInfo().getLocation().getLocation().getX(),
26-
(int) MouseInfo.getPointerInfo().getLocation().getLocation().getY()));
26+
2727
}
2828

2929
}

0 commit comments

Comments
 (0)