Ejemplo n.º 1
0
    private void UpdatePointerInfo()
    {
        if (NoteCurser == null)
        {
            if (PointerInfo.gameObject.activeInHierarchy)
            {
                PointerInfo.gameObject.SetActive(false);
            }
            return;
        }
        if (!NoteCurser.activeInHierarchy)
        {
            if (PointerInfo.gameObject.activeInHierarchy)
            {
                PointerInfo.gameObject.SetActive(false);
            }
            return;
        }
        if (!PointerInfo.gameObject.activeInHierarchy)
        {
            PointerInfo.gameObject.SetActive(true);
        }
        Vector2 MouseInTunerWindow = LimMousePosition.MousePositionInWindow(TunerWindowRect);

        PointerInfo.anchoredPosition = CalculatePointerInfoPosition(MouseInTunerWindow);
        PointerInfoText.text         = string.Format("{0} : {1}\n{2} : {3}\n{4} : {5}", LimLanguageManager.TextDict["ClickToCreate_Timing"], NoteCursorTiming, LimLanguageManager.TextDict["ClickToCreate_Degree"],
                                                     ClampedDegree(NoteCursorDegree), LimLanguageManager.TextDict["ClickToCreate_Deltatime"], DeltaTimeBetweenSelected());
    }
Ejemplo n.º 2
0
    private void DrawBoxSelectionArea()
    {
        if (Input.GetMouseButtonUp(0))
        {
            BoxSelectionPanel.sizeDelta = new Vector2();
            _ShouldDraw = false;
        }
        Vector2 MousePositionInWindow = LimMousePosition.MousePositionInWindow(UsingWindow);

        if (Input.GetMouseButtonDown(0) && LimMousePosition.IsMouseOverWindow(UsingWindow))
        {
            BoxSelectionPanel.sizeDelta        = new Vector2();
            BoxSelectionPanel.anchoredPosition = new Vector2(MousePositionInWindow.x, MousePositionInWindow.y);
            _AnchorPosition = BoxSelectionPanel.anchoredPosition;
            _ShouldDraw     = true;
        }
        if (!_ShouldDraw)
        {
            return;
        }
        if (Input.GetMouseButton(0) && LimMousePosition.IsMouseOverWindow(UsingWindow))
        {
            BoxSelectionPanel.sizeDelta        = new Vector2(Mathf.Abs(MousePositionInWindow.x - _AnchorPosition.x), Mathf.Abs(_AnchorPosition.y - MousePositionInWindow.y));
            BoxSelectionPanel.anchoredPosition = new Vector2(MousePositionInWindow.x > _AnchorPosition.x ? _AnchorPosition.x : MousePositionInWindow.x,
                                                             _AnchorPosition.y > MousePositionInWindow.y ? _AnchorPosition.y : MousePositionInWindow.y);
        }
    }