mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
23 lines
No EOL
592 B
C#
23 lines
No EOL
592 B
C#
using ABI_RC.Core.InteractionSystem;
|
|
|
|
namespace NAK.DesktopVRSwitch.VRModeTrackers;
|
|
|
|
public class ViewManagerTracker : VRModeTracker
|
|
{
|
|
public override void TrackerInit()
|
|
{
|
|
VRModeSwitchManager.OnPreVRModeSwitch += OnPreSwitch;
|
|
}
|
|
|
|
public override void TrackerDestroy()
|
|
{
|
|
VRModeSwitchManager.OnPreVRModeSwitch -= OnPreSwitch;
|
|
}
|
|
|
|
private void OnPreSwitch(object sender, VRModeSwitchManager.VRModeEventArgs args)
|
|
{
|
|
DesktopVRSwitch.Logger.Msg("Closing ViewManager - Main Menu.");
|
|
|
|
ViewManager.Instance.UiStateToggle(false);
|
|
}
|
|
} |