(int address, final MetacheatUI outer)
| 48 | MemoryCell cell; |
| 49 | |
| 50 | public Watch(int address, final MetacheatUI outer) { |
| 51 | super(); |
| 52 | this.outer = outer; |
| 53 | this.address = address; |
| 54 | cell = outer.cheatEngine.getMemoryCell(address); |
| 55 | redraw = outer.animationTimer.scheduleAtFixedRate(this::redraw, MetacheatUI.FRAME_RATE, MetacheatUI.FRAME_RATE, TimeUnit.MILLISECONDS); |
| 56 | setBackground(new Background(new BackgroundFill(Color.NAVY, CornerRadii.EMPTY, Insets.EMPTY))); |
| 57 | Label addrLabel = new Label("$" + Integer.toHexString(address)); |
| 58 | addrLabel.setOnMouseClicked((evt)-> outer.inspectAddress(address)); |
| 59 | addrLabel.setTextAlignment(TextAlignment.CENTER); |
| 60 | addrLabel.setMinWidth(GRAPH_WIDTH); |
| 61 | addrLabel.setFont(new Font(Font.getDefault().getFamily(), 14)); |
| 62 | addrLabel.setTextFill(Color.WHITE); |
| 63 | graph = new Canvas(GRAPH_WIDTH, GRAPH_HEIGHT); |
| 64 | getChildren().add(addrLabel); |
| 65 | getChildren().add(graph); |
| 66 | CheckBox hold = new CheckBox("Hold"); |
| 67 | holding = hold.selectedProperty(); |
| 68 | holding.addListener((prop, oldVal, newVal) -> this.updateHold()); |
| 69 | getChildren().add(hold); |
| 70 | hold.setTextFill(Color.WHITE); |
| 71 | } |
| 72 | |
| 73 | public int getValue() { |
| 74 | return value; |
nothing calls this directly
no test coverage detected