Implementation of relative offset lock (keep mouse in position relative to you as yo umove).

master
bradjrenshaw 2022-05-10 15:22:32 -04:00
parent c8bf29b6d0
commit 955ffac65b
1 changed files with 12 additions and 1 deletions

View File

@ -63,7 +63,18 @@ namespace stardew_access.Features
public void HandleInput() public void HandleInput()
{ {
if (MainClass.Config.TileCursorPreciseUpKey.JustPressed()) if (MainClass.Config.ToggleRelativeCursorLockKey.JustPressed())
{
this.relativeOffsetLock = !this.relativeOffsetLock;
if (this.relativeOffsetLock)
{
this.relativeOffsetLockPosition = this.PlayerFacingVector + this.ViewingOffset;
} else {
this.relativeOffsetLockPosition = Vector2.Zero;
}
MainClass.ScreenReader.Say("Relative cursor lock " + (this.relativeOffsetLock ? "enabled" : "disabled") + ".", true);
}
else if (MainClass.Config.TileCursorPreciseUpKey.JustPressed())
{ {
this.cursorMoveInput(new Vector2(0, -MainClass.Config.TileCursorPreciseMovementDistance), true); this.cursorMoveInput(new Vector2(0, -MainClass.Config.TileCursorPreciseMovementDistance), true);
} }