Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();
            GUIStyle style = EditorExtentions.ChangeStyle(13, true);

            EditorGUILayout.LabelField("Total Time : " + GetTotalTime(), style);
        }
Ejemplo n.º 2
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(position, label, property);

            float thirdWidth = EditorExtentions.GetCurrViewWidth(3);

            Rect titlePos = position;

            titlePos.width = thirdWidth;
            EditorGUI.LabelField(titlePos, property.displayName);

            f    = property.FindPropertyRelative(fName);
            sqrF = property.FindPropertyRelative(sqrFName);

            Rect fPos = EditorExtentions.MoveRectRight(thirdWidth, titlePos);

            f.floatValue = EditorGUI.FloatField(fPos, f.floatValue);
            Rect sqrFPos = EditorExtentions.MoveRectRight(thirdWidth, fPos);

            EditorGUI.LabelField(sqrFPos, sqrF.floatValue.ToString());

            CorrectSqruaredValue();

            EditorGUI.EndProperty();
        }
Ejemplo n.º 3
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            const string       selectionsName = "selections";
            SerializedProperty selectionsProp = property.FindPropertyRelative(selectionsName);
            Rect  namePos   = position;
            float halfWidth = namePos.width / 2;

            namePos.width = halfWidth;

            Rect maskPos = EditorExtentions.MoveRectRight(halfWidth, namePos);

            EditorGUI.LabelField(namePos, property.displayName);

            Object target = property.serializedObject.targetObject;

            System.Object   val       = fieldInfo.GetValue(target);
            MultiSelectType actualObj = (MultiSelectType)val;

            selectionsProp.intValue = EditorGUI.MaskField(maskPos, selectionsProp.intValue, actualObj.possiblities);
        }