From 55bc9c11bf53cec49887324381f814ee7f58b885 Mon Sep 17 00:00:00 2001 From: tibz Date: Sat, 15 Aug 2026 12:55:20 -0500 Subject: [PATCH] Fixed mouse cursor in menus --- .../GameContent/Screens/Menu/BaseMapMenu.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Johnmagotchi/GameContent/Screens/Menu/BaseMapMenu.cs b/Johnmagotchi/GameContent/Screens/Menu/BaseMapMenu.cs index 3ed5083..a5dc639 100644 --- a/Johnmagotchi/GameContent/Screens/Menu/BaseMapMenu.cs +++ b/Johnmagotchi/GameContent/Screens/Menu/BaseMapMenu.cs @@ -157,28 +157,22 @@ namespace Johnmagotchi.GameContent.Screens.Menu private void HandleMouseCursor() { int x = screenManager.inputs.mouseInput.x; - int y = screenManager.inputs.mouseInput.y; + int y = screenManager.inputs.mouseInput.y - ScreenManager.getScaledIntY(2800); // subtract 2800 since y axis is negative, you want to allign with top bound vs bottom bound TibzLog.Debug("Mouse y - " + y); - - TibzLog.Debug("top bounds??? - " + ScreenManager.getScaledIntY( yPos - yDrawOffset)); - - // screenManager.getScaledIntX(xPos - xDrawOffset + textOffsetX), - //TODO STILL WORKING O{N THIS 7/18/26 - //screenManager.GetScaledRectangle(xPos - xDrawOffset, yPos - yOffset, 6400, 2800); int yOffset = yDrawOffset; for (int i = CurrentOptions.Length; i > 0; i--) { - if (y < ScreenManager.getScaledIntY(yPos - yOffset)) + if (y <= ScreenManager.getScaledIntY(yPos - yOffset)) { SelectedIndex = i-1; - - TibzLog.Debug("index set! " + i); } yOffset += 2800; } + + //ToDo = deselect on X out of bounds and Y out of bounds } } }