void OnGUI() { if (!IsReady()) { EditorGUILayout.HelpBox("DaggerfallUnity instance not ready. Have you set your Arena2 path?", MessageType.Info); return; } // Select class source EditorGUILayout.Space(); careerSource = (CareerSource)EditorGUILayout.EnumPopup(new GUIContent("Source"), (CareerSource)careerSource); // Select class from specified source selectedCareer = null; if (careerSource == CareerSource.PlayerClasses && classNames != null && classNames.Length > 0) { if (selectedTemplate > classNames.Length) { selectedTemplate = 0; } selectedTemplate = EditorGUILayout.Popup(new GUIContent("Class"), selectedTemplate, classNames); selectedCareer = classTemplates[selectedTemplate]; } else if (careerSource == CareerSource.Monsters && monsterNames != null && monsterNames.Length > 0) { if (selectedTemplate > monsterNames.Length) { selectedTemplate = 0; } selectedTemplate = EditorGUILayout.Popup(new GUIContent("Class"), selectedTemplate, monsterNames); selectedCareer = monsterTemplates[selectedTemplate]; } else { return; } // Show foldouts if (selectedCareer != null) { scrollPos = GUILayoutHelper.ScrollView(scrollPos, () => { ShowAdvancementGUI(); ShowAttributesGUI(); ShowSecondaryAttributesGUI(); ShowSkillsGUI(); ShowTolerancesGUI(); ShowProficienciesGUI(); ShowForbiddenMaterialsGUI(); ShowForbiddenArmorGUI(); ShowForbiddenShieldsGUI(); ShowMagickaGUI(); ShowMiscellaneousGUI(); //ShowUnknownGUI(); }); } }
void OnGUI() { if (!IsReady()) { EditorGUILayout.HelpBox("DaggerfallUnity instance not ready. Have you set your Arena2 path?", MessageType.Info); return; } // Select class source EditorGUILayout.Space(); careerSource = (CareerSource)EditorGUILayout.EnumPopup(new GUIContent("Source"), (CareerSource)careerSource); // Select class from specified source selectedCareer = null; if (careerSource == CareerSource.PlayerClasses && classNames != null && classNames.Length > 0) { if (selectedTemplate > classNames.Length) selectedTemplate = 0; selectedTemplate = EditorGUILayout.Popup(new GUIContent("Class"), selectedTemplate, classNames); selectedCareer = classTemplates[selectedTemplate]; } else if (careerSource == CareerSource.Monsters && monsterNames != null && monsterNames.Length > 0) { if (selectedTemplate > monsterNames.Length) selectedTemplate = 0; selectedTemplate = EditorGUILayout.Popup(new GUIContent("Class"), selectedTemplate, monsterNames); selectedCareer = monsterTemplates[selectedTemplate]; } else { return; } // Show foldouts if (selectedCareer != null) { scrollPos = GUILayoutHelper.ScrollView(scrollPos, () => { ShowAdvancementGUI(); ShowAttributesGUI(); ShowSecondaryAttributesGUI(); ShowSkillsGUI(); ShowTolerancesGUI(); ShowProficienciesGUI(); ShowForbiddenMaterialsGUI(); ShowForbiddenArmorGUI(); ShowForbiddenShieldsGUI(); ShowMagickaGUI(); ShowMiscellaneousGUI(); //ShowUnknownGUI(); }); } }