From c5167901b8604d9c24a646869782c69735c8dab8 Mon Sep 17 00:00:00 2001 From: Brendan Robert Date: Sat, 5 Sep 2015 12:26:35 -0500 Subject: [PATCH] Watch address is now clickable which starts inspector for that address --- src/main/java/jace/ui/Watch.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/jace/ui/Watch.java b/src/main/java/jace/ui/Watch.java index 7b4020e..6ef90f4 100644 --- a/src/main/java/jace/ui/Watch.java +++ b/src/main/java/jace/ui/Watch.java @@ -54,16 +54,11 @@ class Watch extends VBox { redraw = outer.animationTimer.scheduleAtFixedRate(this::redraw, MetacheatUI.FRAME_RATE, MetacheatUI.FRAME_RATE, TimeUnit.MILLISECONDS); setBackground(new Background(new BackgroundFill(Color.NAVY, CornerRadii.EMPTY, Insets.EMPTY))); Label addrLabel = new Label("$" + Integer.toHexString(address)); + addrLabel.setOnMouseClicked((evt)-> outer.inspectAddress(address)); addrLabel.setTextAlignment(TextAlignment.CENTER); addrLabel.setMinWidth(GRAPH_WIDTH); addrLabel.setFont(new Font(Font.getDefault().getFamily(), 14)); addrLabel.setTextFill(Color.WHITE); - addrLabel.setMouseTransparent(false); - addrLabel.setOnMouseClicked((MouseEvent evt)-> { - if (evt.isPrimaryButtonDown()) { - outer.inspectAddress(address); - } - }); graph = new Canvas(GRAPH_WIDTH, GRAPH_HEIGHT); getChildren().add(addrLabel); getChildren().add(graph);