Example #1
0
        /// <summary>
        /// Initializes the control.
        /// This function should be called only when creating a new control.
        /// </summary>
        public virtual void Initialize(GUIContainer Parent)
        {
            this.Parent = Parent;

            GUIStyle = DefaultGUIStyle();
            RelativeArea = new Rect(0, 0, DefaultSize.x, DefaultSize.y);
            Name = String.Format("{0}_{1}", GetType().Name, UnityEngine.Random.Range(0, Int32.MaxValue));
            Margins = new GUIControlMargins(0, 0, 0, 0);
            #if UNITY_EDITOR
            InspectorEventsData = new List<EventData>();

            if (!(this is GUIContainer))
                GUIContent.text = "Enter text here";
            #endif
        }
Example #2
0
        public override void Initialize(GUIContainer Parent)
        {
            base.Initialize(Parent);

            Dock = GUIControlDock.Full;
        }
Example #3
0
        public override void Initialize(GUIContainer Parent)
        {
            base.Initialize(Parent);

            Controls = new List<GUIControl>();
        }