示例#1
0
        void CacheTransformInspector()
        {
            // add Transform separately
            var transformInspector = new InspectorList(_entity.Transform);

            transformInspector.Initialize(_table, _skin, kLeftCellWidth);
            _inspectors.Add(transformInspector);
        }
示例#2
0
        /// <summary>
        /// attempts to find a cached version of the InspectorList and if it cant find one it will create a new one
        /// </summary>
        /// <returns>The or create inspector list.</returns>
        /// <param name="comp">Comp.</param>
        InspectorList GetOrCreateInspectorList(object comp)
        {
            var inspector = _inspectors.FirstOrDefault(i => i.Target == comp);

            if (inspector == null)
            {
                inspector = new InspectorList(comp);
                inspector.Initialize(_table, _skin, kLeftCellWidth);
                _inspectors.Add(inspector);
            }

            return(inspector);
        }