From 3d48a37f87653fadace7354ae563aaf7e27e7a23 Mon Sep 17 00:00:00 2001 From: shoaib11120 Date: Tue, 14 Dec 2021 22:51:38 +0530 Subject: [PATCH] Added `j` and `l` for cycling through items in new game menu --- stardew-access/ModEntry.cs | 1 - stardew-access/Patches/MenuPatch.cs | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stardew-access/ModEntry.cs b/stardew-access/ModEntry.cs index bac0353..fd462c4 100644 --- a/stardew-access/ModEntry.cs +++ b/stardew-access/ModEntry.cs @@ -7,7 +7,6 @@ using StardewValley.Menus; using Microsoft.Xna.Framework.Graphics; using stardew_access.Patches; using AutoHotkey.Interop; -using Microsoft.Xna.Framework; namespace stardew_access { diff --git a/stardew-access/Patches/MenuPatch.cs b/stardew-access/Patches/MenuPatch.cs index 67c135e..af40c5e 100644 --- a/stardew-access/Patches/MenuPatch.cs +++ b/stardew-access/Patches/MenuPatch.cs @@ -345,11 +345,14 @@ namespace stardew_access.Patches bool isNextArrowPressed = Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Right); bool isPrevArrowPressed = Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Left); - if (isNextArrowPressed && !isRunning) + + bool isLPressed = Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.L); + bool isJPressed = Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.J); + if ((isNextArrowPressed || isLPressed ) && !isRunning) { _ = CycleThroughItems(true, ___nameBox, ___farmnameBox, ___favThingBox, ___skipIntroButton, ___okButton, ___backButton); } - else if (isPrevArrowPressed && !isRunning) + else if ((isPrevArrowPressed || isJPressed) && !isRunning) { _ = CycleThroughItems(false, ___nameBox, ___farmnameBox, ___favThingBox, ___skipIntroButton, ___okButton, ___backButton); }