private void Add(object sender, EventArgs args)
 {
     GlobalComponentPicker.Set(new Vector2(this.rectGui.x + 300, this.rectGui.y - 20), 300, this.FontSize, (existing) =>
     {
         existing.InsertNewClip();
         this.take.tracks.Add(existing);
         this.curvePane.mode = CurvePane.CurvePaneMode.Curve;
         this.curvePane.SetUpdate();
     });
 }
Ejemplo n.º 2
0
        ///-------------------------------------------------------------------------
        /// <summary>GUI処理</summary>
        ///-------------------------------------------------------------------------
        public void OnGUI()
        {
            try
            {
                // 機能有効の場合
                // if( this.Enable )

                if (GizmoRender.UIVisible)
                {
                    // 補助キーの押下有無確認
                    bool isCtrl  = Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl);
                    bool isShift = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift);
                    bool isAlt   = Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt);

                    if (this.Enable)
                    {
                        float windowWidth = Screen.width / 4 - ControlBase.FixedMargin * 2;

                        Rect pluginPos = new Rect(Screen.width - windowWidth, Screen.height / 15 + ControlBase.FixedMargin, Screen.width / 5 - Screen.width / 65, Screen.height - Screen.height / 5);

                        if (selectedMode == ConstantValues.EditMode.Movie)
                        {
                            this.timelineWindow.Width          = 1000;
                            this.timelineWindow.Height         = 800;
                            this.timelineWindow.rectGui.width  = 1000;
                            this.timelineWindow.rectGui.height = 800;
                            this.timelineWindow.OnGUI();
                        }

                        GlobalCurveWindow.Update();
                        GlobalComponentPicker.Update();
                        GlobalPropertyPicker.Update();
                        GlobalComboBox.Update();
                    }
                    else
                    {
                        // 補助キーを押下していない場合
                        bool isEnableControl = (isCtrl == false && isShift == false && isAlt == false);
                        GameMain.Instance.MainCamera.SetControl(isEnableControl);
                        UICamera.InputEnable = isEnableControl;
                    }
                }
                // else
                // {
                //     GameMain.Instance.MainCamera.SetControl( true );
                //     UICamera.InputEnable = true;
                // }
            }
            catch (Exception e)
            {
                Debug.LogError(e.ToString());
            }
        }