예제 #1
0
        public float GetWidth()
        {
            var width = SystemObjectInspector.Styles.labelWidth;

            if (ResolveType())
            {
                width += LudiqGUI.GetInspectorAdaptiveWidth(parent.metadata.Cast(parent.type));
            }

            return(width);
        }
예제 #2
0
        public float GetWidth()
        {
            var width = 0f;

            if (parent.chooseType)
            {
                width = Mathf.Max(width, LudiqGUI.GetTypeFieldAdaptiveWidth(parent.type, new GUIContent("(Null)")));
            }

            if (parent.showValue)
            {
                width = Mathf.Max(width, LudiqGUI.GetInspectorAdaptiveWidth(parent.metadata.Cast(parent.type)));
            }

            width += SystemObjectInspector.Styles.labelWidth;

            return(width);
        }
        public override float GetAdaptiveWidth()
        {
            var width = 0f;

            if (chooseType)
            {
                width = Mathf.Max(width, LudiqGUI.GetTypeFieldAdaptiveWidth(type, new GUIContent("(Null)")));
            }

            if (showValue)
            {
                width = Mathf.Max(width, LudiqGUI.GetInspectorAdaptiveWidth(metadata.Cast(type)));
            }

            width += Styles.labelWidth;

            return(width);
        }
예제 #4
0
 public override float GetItemAdaptiveWidth(int index)
 {
     return(LudiqGUI.GetInspectorAdaptiveWidth(metadata[index]));
 }