//abstract protected GUIContent GetTitle();



        // --------------------
        public void Init(TouchControlPanel panel, System.Action onCreationCallback)
        {
            this.panel = panel;
            this.onCreationCallback = onCreationCallback;

            this.emulateTouchPressure = true;

            this.canvas = (Canvas)CFUtils.GetComponentHereOrInParent(this.panel, typeof(Canvas));

            this.controlName = "NewControl";

            this.dynamicMode  = ControlMode.Static;
            this.regionRect   = RegionRectPreset.LeftHalf;
            this.controlShape = TouchControl.Shape.Circle;

            this.staticAnchor = ControlAnchorPoint.BottomRight;
            this.controlSize  = 0.15f;

            this.controlDepth = Mathf.Lerp(DEPTH_MIN, DEPTH_MAX, 0.25f);
            this.regionDepth  = Mathf.Lerp(DEPTH_MIN, DEPTH_MAX, 0.70f);

            // Restore params...

            if (mStoredParamsSaved)
            {
                this.controlSize  = mStoredControlSize;
                this.staticAnchor = mStoredStaticAnchor;
                this.controlDepth = mStoredControlDepth;
                this.regionDepth  = mStoredRegionDepth;
                this.controlShape = mStoredControlShape;
            }
        }
 // -----------------
 private void StoreParameters()
 {
     mStoredParamsSaved  = true;
     mStoredControlSize  = this.controlSize;
     mStoredStaticAnchor = this.staticAnchor;
     mStoredRegionDepth  = this.regionDepth;
     mStoredControlDepth = this.controlDepth;
     mStoredControlShape = this.controlShape;
 }
        // -------------------
        virtual protected void DrawPositionAndModeGUI()
        {
            InspectorUtils.BeginIndentedSection(new GUIContent("Positioning"));

            this.dynamicMode = (ControlMode)CFGUI.EnumPopup(new GUIContent("Mode", "Positioning Mode - Static or Dynamic?"),
                                                            this.dynamicMode, MAX_LABEL_WIDTH);

            //EditorGUILayout.Toggle(new GUIContent("Dynamic Mode", "Create this control with it's own DynamicRegion."),
            //this.dynamicWithRegion, GUILayout.ExpandWidth(true));

            if (this.dynamicMode == ControlMode.DynamicWithRegion)
            {
                this.regionRect = (RegionRectPreset)CFGUI.EnumPopup(new GUIContent("Region", "Select Dynamic Region's screen position."),
                                                                    this.regionRect, MAX_LABEL_WIDTH);
            }
            else
            {
                this.staticAnchor = (ControlAnchorPoint)CFGUI.EnumPopup(new GUIContent("Anchor", "New control will be automatically placed near selected anchor point."),
                                                                        this.staticAnchor, MAX_LABEL_WIDTH);
            }

            this.controlShape = (TouchControl.Shape)CFGUI.EnumPopup(new GUIContent("Shape", "Control's shape"), this.controlShape, MAX_LABEL_WIDTH);

            this.controlSize = CFGUI.Slider(new GUIContent("Size", "Control's size relative to the shorter dimension of parent canvas."),
                                            this.controlSize, 0.05f, 0.5f, MAX_LABEL_WIDTH);


            this.controlDepth = (float)DrawDepthSlider(new GUIContent("Control Depth", "Depth of the control - how far to push the control into the screen.\n\nControls of depth closer to screen (smaller values) are picked first!"),
                                                       this.controlDepth, MAX_LABEL_WIDTH);

            if (this.dynamicMode == ControlMode.DynamicWithRegion)
            {
                this.regionDepth = (float)DrawDepthSlider(new GUIContent("Region Depth", "Depth of control's dynamic region. It's recommended to use higher depth for region than for the control itself.\n\nControls of depth closer to screen (smaller values) are picked first!"),
                                                          this.regionDepth, MAX_LABEL_WIDTH);
            }


            InspectorUtils.EndIndentedSection();
        }