Stickers: scrollwheel to switch selected sticker

This commit is contained in:
NotAKidoS 2024-08-25 15:19:45 -05:00
parent 9638e22daf
commit 852520973c
2 changed files with 10 additions and 1 deletions

View file

@ -1,4 +1,5 @@
using ABI_RC.Core.Player;
using ABI_RC.Systems.InputManagement;
using MelonLoader;
using NAK.Stickers.Integrations;
using NAK.Stickers.Networking;
@ -31,6 +32,14 @@ public class StickerMod : MelonMod
public override void OnUpdate()
{
if (StickerSystem.Instance == null)
return;
if (Input.mouseScrollDelta.y != 0f
&& Cursor.lockState == CursorLockMode.Locked // prevent scrolling while in menus
&& !CVRInputManager.Instance.zoom) // prevent scrolling while using scroll zoom
StickerSystem.Instance.SelectedStickerSlot += (int)Input.mouseScrollDelta.y;
if (!ModSettings.Entry_UsePlaceBinding.Value)
return;