Beispiel #1
0
        // ======================================================================
        // Initialization
        // ----------------------------------------------------------------------
        public DSAccordionView(RectOffset margins, bool shouldDisplayFrame, int selectionsPerLine = 1)
        {
            mySelectionsPerLine = selectionsPerLine;
            mySelectionIds      = new GUIContent[0];
            mySubviews          = new DSView[0];

            myMainView      = new DSVerticalLayoutView(margins, shouldDisplayFrame);
            mySelectionView = new DSCellView(new RectOffset(0, 0, 0, 0), false, DisplaySelection, GetSelectionSize);
            myMainView.AddSubview(mySelectionView, new RectOffset(0, 0, kSpacer, 0));
        }
        // ---------------------------------------------------------------------------------
        void BuildViews()
        {
            var typeName = new GUIContent(NameUtility.ToDisplayName(iCS_Types.TypeName(myTarget.RuntimeType)));

            myVariablesController = new iCS_ClassVariablesController(myTarget.RuntimeType, myStorage, typeName, myTarget);

            // Build class wizard layout view.
            myLayoutView = new DSVerticalLayoutView(new RectOffset(0, 0, 0, 0), false);
            myLayoutView.AddSubview(myVariablesController.View, new RectOffset(0, 0, 0, kSpacer), DSView.AnchorEnum.Center);

            // Build class wizard title view.
            string     instanceTitle       = myTarget.DisplayName;
            GUIContent instanceEditorTitle = new GUIContent(instanceTitle);

            myMainView = new DSTitleView(new RectOffset(0, 0, 0, 0), false, instanceEditorTitle, DSView.AnchorEnum.Center, true);
            myMainView.SetSubview(myLayoutView);
        }