Пример #1
0
 public void OnDrag(PointerEventData data)
 {
     if (BorderlessWindow.framed)
     {
         return;
     }
     _deltaValue += data.delta;
     if (data.dragging)
     {
         BorderlessWindow.MoveWindowPos(_deltaValue, Screen.width, Screen.height);
     }
 }
Пример #2
0
 public void OnMaximizeBtnClick()
 {
     EventSystem.current.SetSelectedGameObject(null);
     if (_maximized)
     {
         BorderlessWindow.RestoreWindow();
     }
     else
     {
         BorderlessWindow.MaximizeWindow();
     }
     _maximized = !_maximized;
 }
    private void Awake()
    {
        _outcomePanel.SetActive(false);
        m_waitForOutcome = new WaitForSeconds(_outComeTimer);
        var resolutionVector = _canvasScaler.referenceResolution * _sizeFactor;

        Screen.SetResolution((int)resolutionVector.x, (int)resolutionVector.y, false);
#if !UNITY_EDITOR
        BorderlessWindow.MoveWindowPos(Vector2Int.zero, (int)resolutionVector.x, (int)resolutionVector.y);
#endif

        var versionsFound = ListAllVersions();
        SetButtonsInteractables(!versionsFound);
        _animatorParameterBehaviour.SetBool(0, versionsFound);
        _animatorParameterBehaviour.SetTrigger(1);
    }
Пример #4
0
 /// <summary>
 /// Sets the expanded command.
 /// </summary>
 /// <param name="element">The element.</param>
 /// <param name="value">The value.</param>
 public static void SetExpandedCommand(BorderlessWindow element, ICommand value)
 {
     element.SetValue(ExpandedCommandProperty, value);
 }
Пример #5
0
 /// <summary>
 /// Gets the collapsed command.
 /// </summary>
 /// <param name="element">The element.</param>
 /// <returns></returns>
 public static ICommand GetCollapsedCommand(BorderlessWindow element)
 {
     return((ICommand)element.GetValue(CollapsedCommandProperty));
 }
Пример #6
0
 public void OnClickMinimizeButton()
 {
     EventSystem.current.SetSelectedGameObject(null);
     BorderlessWindow.MinimizeWindow();
 }
Пример #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BorderlessWindowWrapper" /> class.
 /// </summary>
 /// <param name="window">The window.</param>
 public BorderlessWindowWrapper(BorderlessWindow window)
 {
     window.Guard("window");
     this.window          = window;
     this.window.Closing += WindowOnClosing;
 }