From f04f9b9bf0abdd104db79623d5c3e5133e895470 Mon Sep 17 00:00:00 2001 From: noil Date: Sat, 26 Dec 2020 12:05:10 -0500 Subject: [PATCH] MovementGraph: Update hover mechanics --- .../impl/gui/hud/component/MovementGraphComponent.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/rigamortis/seppuku/impl/gui/hud/component/MovementGraphComponent.java b/src/main/java/me/rigamortis/seppuku/impl/gui/hud/component/MovementGraphComponent.java index b820846..7f3a1f3 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/gui/hud/component/MovementGraphComponent.java +++ b/src/main/java/me/rigamortis/seppuku/impl/gui/hud/component/MovementGraphComponent.java @@ -104,9 +104,11 @@ public final class MovementGraphComponent extends ResizableHudComponent { RenderUtil.drawRect(mappedX - movementNode.size, mappedY, mappedX + movementNode.size, mappedY + movementNode.size, movementNode.color.getRGB()); // draw hover - if (mouseX >= mappedX && mouseX <= mappedX + movementNode.size && mouseY >= mappedY && mouseY <= this.getY() + this.getH()) { + if (mouseX >= mappedX && mouseX <= mappedX + movementNode.size && mouseY >= this.getY() && mouseY <= this.getY() + this.getH()) { // hover bar - RenderUtil.drawRect(mappedX - movementNode.size, mappedY, mappedX + movementNode.size, this.getY() + this.getH(), 0x40101010); + RenderUtil.drawRect(mappedX - movementNode.size, this.getY(), mappedX + movementNode.size, this.getY() + this.getH(), 0x40101010); + // hover red dot + RenderUtil.drawRect(mappedX - movementNode.size, mappedY, mappedX + movementNode.size, mappedY + movementNode.size, 0xFFFF0000); // set hovered data final DecimalFormat decimalFormat = new DecimalFormat("###.##");