Esempio n. 1
0
        /// <summary>
        /// Gets the Game View window's top left Position.
        /// </summary>
        /// <remarks>Overridden in test project. Do not remove without updating tests.</remarks>
        protected virtual Vector2 GetWindowPosition()
        {
            var windowPosition = new Win32Helpers.POINT();

            Win32Helpers.ClientToScreen(Hwnd, ref windowPosition);
            return(new Vector2(windowPosition.x, windowPosition.y));
        }
Esempio n. 2
0
        /// <summary>
        /// Gets the Game View window's bottom right corner Position.
        /// </summary>
        /// <remarks>Overridden in test project. Do not remove without updating tests.</remarks>
        protected virtual Vector2 GetWindowBottomRight()
        {
            var clientRect = new Win32Helpers.RECT();

            Win32Helpers.GetClientRect(Hwnd, ref clientRect);

            var bottomRight = new Win32Helpers.POINT {
                x = clientRect.right, y = clientRect.bottom
            };

            Win32Helpers.ClientToScreen(Hwnd, ref bottomRight);

            return(new Vector2(bottomRight.x, bottomRight.y));
        }