mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
24 lines
No EOL
879 B
C#
24 lines
No EOL
879 B
C#
using ABI_RC.Core.Player;
|
|
|
|
namespace NAK.DesktopVRSwitch.VRModeTrackers;
|
|
|
|
public class HudOperationsTracker : VRModeTracker
|
|
{
|
|
public override void TrackerInit()
|
|
{
|
|
VRModeSwitchManager.OnPostVRModeSwitch += OnPostSwitch;
|
|
}
|
|
|
|
public override void TrackerDestroy()
|
|
{
|
|
VRModeSwitchManager.OnPostVRModeSwitch -= OnPostSwitch;
|
|
}
|
|
|
|
private void OnPostSwitch(object sender, VRModeSwitchManager.VRModeEventArgs args)
|
|
{
|
|
DesktopVRSwitch.Logger.Msg("Switching HudOperations worldLoadingItem & worldLoadStatus.");
|
|
|
|
HudOperations.Instance.worldLoadingItem = args.IsUsingVr ? HudOperations.Instance.worldLoadingItemVr : HudOperations.Instance.worldLoadingItemDesktop;
|
|
HudOperations.Instance.worldLoadStatus = args.IsUsingVr ? HudOperations.Instance.worldLoadStatusVr : HudOperations.Instance.worldLoadStatusDesktop;
|
|
}
|
|
} |