Skip to content

Commit

Permalink
Add functionality to open map with X button
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBigz committed Nov 26, 2024
1 parent 2d28393 commit 697d66b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion TABGVR/Player/VRControls.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using JetBrains.Annotations;
using Landfall.Network;
using TABGVR.Util;
using UnityEngine;
using UnityEngine.XR;
Expand Down Expand Up @@ -183,7 +184,14 @@ private void Update()
}

if (yButton && !_yButtonPressed) InventoryUI.ToggleInventoryState();

if (xButton && !_xButtonPressed)
{
var activeSelf = mapHandler.images.activeSelf;

MapHandler.isMiniMap = !activeSelf;
mapHandler.images.SetActive(!activeSelf);
}

_aButtonPressed = aButton;
_bButtonPressed = bButton;
_xButtonPressed = xButton;
Expand Down

0 comments on commit 697d66b

Please sign in to comment.