(int addr)
| 536 | } |
| 537 | |
| 538 | private Watch addWatch(int addr) { |
| 539 | Watch watch = new Watch(addr, this); |
| 540 | watch.setPadding(new Insets(5)); |
| 541 | watch.setOpaqueInsets(new Insets(10)); |
| 542 | |
| 543 | Label addCheat = new Label("Cheat >>"); |
| 544 | addCheat.setOnMouseClicked((mouseEvent) -> { |
| 545 | addCheat("Metacheat " + Integer.toHexString(addr), addr, watch.getValue()); |
| 546 | }); |
| 547 | addCheat.setTextFill(Color.WHITE); |
| 548 | watch.getChildren().add(addCheat); |
| 549 | |
| 550 | Label close = new Label("Close X"); |
| 551 | close.setOnMouseClicked((mouseEvent) -> { |
| 552 | watch.disconnect(); |
| 553 | watchesPane.getChildren().remove(watch); |
| 554 | }); |
| 555 | close.setTextFill(Color.WHITE); |
| 556 | watch.getChildren().add(close); |
| 557 | |
| 558 | watchesPane.getChildren().add(watch); |
| 559 | return watch; |
| 560 | } |
| 561 | |
| 562 | private void addCheat(String name, int addr, int val) { |
| 563 | cheatEngine.addCheat(new DynamicCheat(name, addr, val)); |
no test coverage detected