Improved hover state hover logic

This commit is contained in:
bigguy345 committed 2025-12-26 18:15:13 +02:00
1 parent a4692388a8
commit 2c645beddf
2 files changed
+3 -2

No files matched your search

@@ -1020,7 +1020,7 @@ public class GuiScriptTextArea extends GuiNpcTextField {
*/
private void updateHoverState(int xMouse, int yMouse) {
// Don't show tooltips when not active, clicking, or when overlays are visible
if (!active || !isEnabled() || clicked || searchBar.isVisible() ||
if (!isEnabled() || clicked || searchBar.isVisible() ||
goToLineDialog.isVisible() || KEYS_OVERLAY.isVisible() || renameHandler.isActive()) {
hoverState.clearHover();
return;
@@ -19,7 +19,7 @@ import noppes.npcs.client.gui.util.script.interpreter.Token;
public class HoverState {
/** Minimum hover time (ms) before showing tooltip */
private static final long HOVER_DELAY_MS = 500;
private static final long HOVER_DELAY_MS = 100;
// ==================== STATE ====================
@@ -151,6 +151,7 @@ public class HoverState {
public void update(int mouseX, int mouseY, Token token, int tokenX, int tokenY, int tokenW) {
lastMouseX = mouseX;
lastMouseY = mouseY;
clickToPinEnabled=false;
// If a token has been pinned by click, ignore mouse movement updates
if (pinnedToken != null) {
// keep pinned tooltip visible