Fixed mouse cursor in menus
This commit is contained in:
parent
4835b187e1
commit
55bc9c11bf
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user