public void OnDrag(PointerEventData data) { if (BorderlessWindow.framed) { return; } _deltaValue += data.delta; if (data.dragging) { BorderlessWindow.MoveWindowPos(_deltaValue, Screen.width, Screen.height); } }
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); }
/// <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); }
/// <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)); }
public void OnClickMinimizeButton() { EventSystem.current.SetSelectedGameObject(null); BorderlessWindow.MinimizeWindow(); }
/// <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; }