@@ -12,20 +12,23 @@ public class DropDrawer : PropertyDrawer
1212 {
1313 public override float GetPropertyHeight ( SerializedProperty property , GUIContent label )
1414 {
15- return base . GetPropertyHeight ( property , label ) + 150 ;
15+ return base . GetPropertyHeight ( property , label ) + 75 ;
1616 }
1717 public override void OnGUI ( Rect position , SerializedProperty property , GUIContent label )
1818 {
1919 EditorGUI . BeginProperty ( position , label , property ) ;
2020
21- var item = new Rect ( position . x + 50 , position . y , 80 , 20 ) ;
22- var chance = new Rect ( position . x + 50 , position . y + 30 , 50 , 20 ) ;
21+ var title = new Rect ( position . x , position . y - 8 , 80 , 20 ) ;
22+ var item = new Rect ( position . x + 52 , position . y + 10 , 80 , 20 ) ;
23+ var chance = new Rect ( position . x + 50 , position . y + 40 , 50 , 20 ) ;
2324 var itemName = new Rect ( position . x , position . y + 10 , 50 , 20 ) ;
2425 var itemIcon = new Rect ( position . x + 10 , position . y + 30 , 32 , 32 ) ;
2526 var itemChance = new Rect ( position . x , position . y + 60 , 120 , 20 ) ;
2627
2728 var indent = EditorGUI . indentLevel ;
2829 EditorGUI . indentLevel = 0 ;
30+
31+ EditorGUI . LabelField ( title , "DROP!" ) ;
2932
3033
3134 EditorGUI . PropertyField ( item , property . FindPropertyRelative ( "item" ) , GUIContent . none ) ;
0 commit comments