mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
Stickers: added lazy placement preview
This commit is contained in:
parent
d409bf1743
commit
9433779641
6 changed files with 157 additions and 19 deletions
|
@ -1,4 +1,6 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core;
|
||||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.Savior;
|
||||
using ABI_RC.Systems.InputManagement;
|
||||
using MelonLoader;
|
||||
using NAK.Stickers.Integrations;
|
||||
|
@ -35,11 +37,19 @@ public class StickerMod : MelonMod
|
|||
if (StickerSystem.Instance == null)
|
||||
return;
|
||||
|
||||
if (StickerSystem.Instance.IsInStickerMode
|
||||
&& 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 (!MetaPort.Instance.isUsingVr
|
||||
&& StickerSystem.Instance.IsInStickerMode)
|
||||
{
|
||||
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;
|
||||
}
|
||||
StickerSystem.Instance.PlaceStickerFromControllerRay(PlayerSetup.Instance.activeCam.transform, CVRHand.Left, true);
|
||||
}
|
||||
|
||||
StickerSystem.Instance.UpdateStickerPreview(); // flashy flash
|
||||
|
||||
if (!ModSettings.Entry_UsePlaceBinding.Value)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue