Ejemplo n.º 1
0
 public override void OnInspectorGUI()
 {
     item = (Item)target;
     EditorGUILayout.LabelField("Summary");
     EditorGUILayout.BeginVertical("Box");
     UgreEditorTools.TwoLabels("Title: " + item.Title, "Id: " + item.ItemId);
     UgreEditorTools.TwoLabels("Type: " + item.Type, "Use: " + item.UseName);
     EditorGUILayout.LabelField(item.Desc, EditorStyles.textArea);
     EditorGUILayout.EndVertical();
     base.OnInspectorGUI();
 }
Ejemplo n.º 2
0
 public override void OnInspectorGUI()
 {
     dropArea = GUILayoutUtility.GetRect(0.0f, 70.0f, GUILayout.ExpandWidth(true));
     serializedObject.Update();
     for (int i = 0; i < list.arraySize; i++)
     {
         EditorGUILayout.PropertyField(list.GetArrayElementAtIndex(i));
     }
     UgreEditorTools.DropAreaGUI(dropArea, "Drop new item", HandleItem);
     serializedObject.ApplyModifiedProperties();
     // base.OnInspectorGUI();
 }
Ejemplo n.º 3
0
 public override void OnInspectorGUI()
 {
     GUILayout.Label("Summary", EditorStyles.boldLabel);
     GUILayout.BeginVertical("Box");
     GUILayout.Label(basicChar.Identity.FullName);
     UgreEditorTools.TwoLabels(basicChar.Gender.ToString(), basicChar.Race(true));
     GUILayout.EndVertical();
     UgreEditorTools.TwoBoldLabels("First name", "Last name");
     GUILayout.BeginHorizontal();
     basicChar.Identity.FirstName = EditorGUILayout.TextField(basicChar.Identity.FirstName);
     basicChar.Identity.LastName  = EditorGUILayout.TextField(basicChar.Identity.LastName);
     GUILayout.EndHorizontal();
     base.OnInspectorGUI();
 }
Ejemplo n.º 4
0
 protected void BaseDraw()
 {
     EditorGUI.BeginDisabledGroup(true);
     EditorGUILayout.ObjectField("Script: ", MonoScript.FromScriptableObject((BaseInfo)target), typeof(BaseInfo), false);
     EditorGUI.EndDisabledGroup();
     EditorGUILayout.BeginVertical();
     serializedObject.Update();
     EditorGUILayout.PropertyField(icon);
     UgreEditorTools.TextAreaWithBoldLabel(perkTitle, "Perk title");
     UgreEditorTools.TextAreaWithBoldLabel(perkInfo, "Perk info");
     UgreEditorTools.TextAreaWithBoldLabel(perkEffects, "Perk effects");
     UgreEditorTools.TwoBoldLabels("Max level", "Perk cost");
     UgreEditorTools.TwoIntSliders(maxLevel, perkCost);
     serializedObject.ApplyModifiedProperties();
     EditorGUILayout.EndVertical();
 }
Ejemplo n.º 5
0
 public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
 {
     UgreEditorTools.ProperyWithDeleteBtn(position, label, property);
 }
Ejemplo n.º 6
0
 public static void CreateCustomScript(MenuCommand cmd)
 {
     UgreEditorTools.SpawnCopyOfScript(PathToTemplate);
 }