private Rect DrawCharacterItem(ScenarioDialogue.Character chara, int index) { //EditorGUILayout.PropertyField(sChara,true); // EditorGUILayout.LabelField(""); Rect subRect = EditorGUILayout.BeginVertical(GUILayout.ExpandWidth(true)); subRect.x -= 3; subRect.width += 6; GUI.Box(subRect, ""); //Rect menuRect = new Rect(subRect); //menuRect.height = 25; string name = "character " + index; if (chara.character != null && !string.IsNullOrEmpty(chara.character.GetCharaName(chara.customName))) { name = chara.character.GetCharaName(chara.customName); //value set } EditorGUILayout.LabelField(name, EditorStyles.centeredGreyMiniLabel); GUILayout.Space(5); PBEditorUtils.DrawCustomObject(ref chara.character, false, "Base", customLabelWith, m_target); PBEditorUtils.DrawCustomToggle(ref chara.isSpeaker, "Speeker", customLabelWith, m_target); PBEditorUtils.DrawCustomText(ref chara.portaritKey, "Portarit", customLabelWith, m_target); PBEditorUtils.DrawCustomText(ref chara.customName, "Name", customLabelWith, m_target); GUILayout.Space(5); EditorGUILayout.EndVertical(); return(subRect); }
private void ScenarioSettingGUI() { GUILayout.Space(5); Rect rect = EditorGUILayout.BeginVertical(GUILayout.ExpandWidth(true)); rect.width += 12; rect.height += 10; rect.x -= 9; rect.y -= 4; GUI.Box(rect, ""); m_scenarioSettingFoldOut = EditorGUILayout.Foldout(m_scenarioSettingFoldOut, " Setting", true, EditorStyles.label); if (m_scenarioSettingFoldOut) { GUILayout.Space(5); PBEditorUtils.DrawCustomObject(ref m_target.localText, false, "Local Text", 100, m_target); PBEditorUtils.DrawCustomToggle(ref m_target.useTextReplacer, "Replace Text", 100, m_target); PBEditorUtils.DrawCustomObject(ref m_target.nextScenario, false, "Next Scene", 100, m_target); OnScenarioSettingGUI(); GUILayout.Space(5); } EditorGUILayout.EndVertical(); GUILayout.Space(5); }