Example #1
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());
            }
        }
        public override void DrawPanelExtra(float currentTime)
        {
            Rect rect = new Rect(0, 0, 25, 15);

            if (GUI.Button(rect, "+"))
            {
                GlobalPropertyPicker.Set(new Vector2(400, 400), 250, 12, this.component, (pr, fi) =>
                {
                    if (pr == null)
                    {
                        this.AddProp(new MovieProperty(fi));
                    }
                    else
                    {
                        this.AddProp(new MovieProperty(pr));
                    }
                });
            }
        }