Exemplo n.º 1
0
        public void OnNoBorderBtnClick()
        {
            if (!WindowsControl.framed)
            {
                return;
            }

            WindowsControl.SetFramelessWindow();
            WindowsControl.MoveWindowPos(Vector2Int.zero, Screen.width - borderSize.x, Screen.height - borderSize.y);
        }
Exemplo n.º 2
0
        public void OnBorderBtnClick()
        {
            if (WindowsControl.framed)
            {
                return;
            }

            WindowsControl.SetFramedWindow();
            WindowsControl.MoveWindowPos(Vector2Int.zero, Screen.width + borderSize.x, Screen.height + borderSize.y); // Compensating the border offset.
        }
Exemplo n.º 3
0
        public void OnDrag(PointerEventData data)
        {
            if (WindowsControl.framed)
            {
                return;
            }

            _deltaValue += data.delta;
            if (data.dragging)
            {
                WindowsControl.MoveWindowPos(_deltaValue, Screen.width, Screen.height);
            }
        }
Exemplo n.º 4
0
        public void OnMaximizeBtnClick()
        {
            EventSystem.current.SetSelectedGameObject(null);

            if (_maximized)
            {
                WindowsControl.RestoreWindow();
            }
            else
            {
                WindowsControl.MaximizeWindow();
            }

            _maximized = !_maximized;
        }
Exemplo n.º 5
0
 public void OnMinimizeBtnClick()
 {
     EventSystem.current.SetSelectedGameObject(null);
     WindowsControl.MinimizeWindow();
 }
Exemplo n.º 6
0
 public void ResetWindowSize()
 {
     WindowsControl.MoveWindowPos(Vector2Int.zero, defaultWindowSize.x, defaultWindowSize.y);
 }