From 54917091de81eab8b4084ae20739d140ed82d56d Mon Sep 17 00:00:00 2001 From: yugecin Date: Wed, 18 Jan 2017 17:32:40 +0100 Subject: [PATCH] fix tooltip causing crash --- src/itdelatrisu/opsu/ui/UI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/itdelatrisu/opsu/ui/UI.java b/src/itdelatrisu/opsu/ui/UI.java index 6fe0e50b..1afed82e 100644 --- a/src/itdelatrisu/opsu/ui/UI.java +++ b/src/itdelatrisu/opsu/ui/UI.java @@ -77,7 +77,6 @@ public class UI { // game-related variables private static DisplayContainer displayContainer; - private static Input input; // This class should not be instantiated. private UI() {} @@ -360,7 +359,8 @@ public class UI { textWidth += Fonts.SMALL.getWidth(tooltip); // get drawing coordinates - int x = input.getMouseX() + offset, y = input.getMouseY() + offset; + int x = displayContainer.mouseX + offset; + int y = displayContainer.mouseY + offset; if (x + textWidth > displayContainer.width - margin) x = displayContainer.width - margin - textWidth; else if (x < margin)