Esempio n. 1
0
 // Token: 0x06000264 RID: 612 RVA: 0x0000F2A4 File Offset: 0x0000D4A4
 public static global::VRGIN.Native.WindowsInterop.RECT GetClientRect()
 {
     global::VRGIN.Native.WindowsInterop.RECT result = default(global::VRGIN.Native.WindowsInterop.RECT);
     global::VRGIN.Native.WindowsInterop.GetClientRect(global::VRGIN.Native.WindowManager.Handle, ref result);
     global::VRGIN.Native.WindowsInterop.POINT point = default(global::VRGIN.Native.WindowsInterop.POINT);
     global::VRGIN.Native.WindowsInterop.ClientToScreen(global::VRGIN.Native.WindowManager.Handle, ref point);
     result.Left    = point.X;
     result.Top     = point.Y;
     result.Right  += point.X;
     result.Bottom += point.Y;
     return(result);
 }
Esempio n. 2
0
        // Token: 0x06000392 RID: 914 RVA: 0x000129E4 File Offset: 0x00010BE4
        protected override void OnAwake()
        {
            global::VRGIN.Native.WindowsInterop.RECT clientRect = global::VRGIN.Native.WindowManager.GetClientRect();
            global::VRGIN.Core.VRGUI.Width  = clientRect.Right - clientRect.Left;
            global::VRGIN.Core.VRGUI.Height = clientRect.Bottom - clientRect.Top;
            this.uGuiTexture = new global::UnityEngine.RenderTexture(global::UnityEngine.Screen.width, global::UnityEngine.Screen.height, 24, 7);
            this.uGuiTexture.Create();
            this.IMGuiTexture = new global::UnityEngine.RenderTexture(global::UnityEngine.Screen.width, global::UnityEngine.Screen.height, 0, 7);
            this.IMGuiTexture.Create();
            base.transform.localPosition = global::UnityEngine.Vector3.zero;
            base.transform.localRotation = global::UnityEngine.Quaternion.identity;
            base.transform.gameObject.AddComponent <global::VRGIN.Core.VRGUI.FastGUI>();
            base.transform.gameObject.AddComponent <global::VRGIN.Core.VRGUI.SlowGUI>();
            float num  = (float)global::UnityEngine.Screen.height * 0.5f;
            float num2 = (float)global::UnityEngine.Screen.width * 0.5f;

            this._VRGUICamera = new global::UnityEngine.GameObject("VRGIN_GUICamera").AddComponent <global::UnityEngine.Camera>();
            this._VRGUICamera.transform.SetParent(base.transform, false);
            bool flag = global::VRGIN.Core.VR.Context.PreferredGUI == global::VRGIN.Core.GUIType.IMGUI;

            if (flag)
            {
                this._VRGUICamera.transform.position = new global::UnityEngine.Vector3(num2, num, -1f);
                this._VRGUICamera.transform.rotation = global::UnityEngine.Quaternion.identity;
                this._VRGUICamera.orthographicSize   = num;
            }
            this._VRGUICamera.cullingMask         = global::VRGIN.Core.VR.Context.UILayerMask;
            this._VRGUICamera.depth               = 1f;
            this._VRGUICamera.nearClipPlane       = global::VRGIN.Core.VR.Context.GuiNearClipPlane;
            this._VRGUICamera.farClipPlane        = global::VRGIN.Core.VR.Context.GuiFarClipPlane;
            this._VRGUICamera.targetTexture       = this.uGuiTexture;
            this._VRGUICamera.backgroundColor     = global::UnityEngine.Color.clear;
            this._VRGUICamera.clearFlags          = 2;
            this._VRGUICamera.orthographic        = true;
            this._VRGUICamera.useOcclusionCulling = false;
            this._Graphics = typeof(global::UnityEngine.UI.GraphicRegistry).GetField("m_Graphics", 36);
            this._Registry = (this._Graphics.GetValue(global::UnityEngine.UI.GraphicRegistry.instance) as global::System.Collections.IDictionary);
            global::UnityEngine.Object.DontDestroyOnLoad(base.gameObject);
        }
Esempio n. 3
0
 // Token: 0x06000259 RID: 601 RVA: 0x0000EF54 File Offset: 0x0000D154
 public static global::VRGIN.Native.WindowsInterop.POINT GetClientCursorPosition()
 {
     global::VRGIN.Native.WindowsInterop.POINT cursorPosition = global::VRGIN.Native.MouseOperations.GetCursorPosition();
     global::VRGIN.Native.WindowsInterop.RECT  clientRect     = global::VRGIN.Native.WindowManager.GetClientRect();
     return(new global::VRGIN.Native.WindowsInterop.POINT(cursorPosition.X - clientRect.Left, cursorPosition.Y - clientRect.Top));
 }
Esempio n. 4
0
 // Token: 0x06000258 RID: 600 RVA: 0x0000EF28 File Offset: 0x0000D128
 public static void SetClientCursorPosition(int x, int y)
 {
     global::VRGIN.Native.WindowsInterop.RECT clientRect = global::VRGIN.Native.WindowManager.GetClientRect();
     global::VRGIN.Native.WindowsInterop.SetCursorPos(x + clientRect.Left, y + clientRect.Top);
 }
Esempio n. 5
0
 // Token: 0x06000263 RID: 611 RVA: 0x0000F288 File Offset: 0x0000D488
 public static void ConfineCursor()
 {
     global::VRGIN.Native.WindowsInterop.RECT clientRect = global::VRGIN.Native.WindowManager.GetClientRect();
     global::VRGIN.Native.WindowsInterop.ClipCursor(ref clientRect);
 }
Esempio n. 6
0
 public static extern bool GetClientRect(global::System.IntPtr hWnd, ref global::VRGIN.Native.WindowsInterop.RECT lpRect);
Esempio n. 7
0
 public static extern bool GetClipCursor(out global::VRGIN.Native.WindowsInterop.RECT rcClip);