public override void OnDrawNodeGUI(Rect rect) { InitStyles(); node.speaker = CharacterGUI.CharacterDropDown(new Rect(0f, 0f, rect.width, 16f), node.speaker); float height = (rect.height - 64f) / 3f; GUILayout.BeginArea(new Rect(0f, 32f, rect.width, height), styleGroup); EditorGUI.LabelField(new Rect(8f, 4f, rect.width - 16f, 16f), new GUIContent("Friendly")); string copyTextA = node.decisionAText.text; NorthwindGUI.FillingTextField(new Rect(8f, 24f, rect.width - 16f, height - 56f), ref copyTextA, node.decisionAText[LanguageSystem.LangSys.DATA.mainLang]); node.decisionAText.text = copyTextA; node.decisionAAudio.audio = (AudioClip)EditorGUI.ObjectField(new Rect(8f, height - 24f, rect.width - 16f, 16f), node.decisionAAudio.audio, typeof(AudioClip), false); GUILayout.EndArea(); GUILayout.BeginArea(new Rect(0f, 32f + height + 16f, rect.width, height), styleGroup); EditorGUI.LabelField(new Rect(8f, 4f, rect.width - 16f, 16f), new GUIContent("Strategic")); string copyTextB = node.decisionBText.text; NorthwindGUI.FillingTextField(new Rect(8f, 24f, rect.width - 16f, height - 56f), ref copyTextB, node.decisionBText[LanguageSystem.LangSys.DATA.mainLang]); node.decisionBText.text = copyTextB; node.decisionBAudio.audio = (AudioClip)EditorGUI.ObjectField(new Rect(8f, height - 24f, rect.width - 16f, 16f), node.decisionBAudio.audio, typeof(AudioClip), false); GUILayout.EndArea(); GUILayout.BeginArea(new Rect(0f, 32f + height * 2f + 32f, rect.width, height), styleGroup); EditorGUI.LabelField(new Rect(8f, 4f, rect.width - 16f, 16f), new GUIContent("Aggressive")); string copyTextC = node.decisionCText.text; NorthwindGUI.FillingTextField(new Rect(8f, 24f, rect.width - 16f, height - 56f), ref copyTextC, node.decisionCText[LanguageSystem.LangSys.DATA.mainLang]); node.decisionCText.text = copyTextC; node.decisionCAudio.audio = (AudioClip)EditorGUI.ObjectField(new Rect(8f, height - 24f, rect.width - 16f, 16f), node.decisionCAudio.audio, typeof(AudioClip), false); GUILayout.EndArea(); }
public override void OnDrawNodeGUI(Rect rect) { node.speaker = CharacterGUI.CharacterDropDown(new Rect(0f, 0f, rect.width, 16f), node.speaker); GUILayout.BeginArea(new Rect(new Rect(0f, 18f, rect.width, 16f))); GUILayout.BeginHorizontal(); node.isAuto = GUILayout.Toggle(node.isAuto, new GUIContent("Auto")); node.showTime = EditorGUILayout.FloatField(new GUIContent("Time"), node.showTime); GUILayout.EndHorizontal(); GUILayout.EndArea(); string copyText = node.textSource.text; NorthwindGUI.FillingTextField(new Rect(0f, 40f, rect.width, rect.height - 64f), ref copyText, node.textSource[LanguageSystem.LangSys.DATA.mainLang]);// EditorGUI.TextArea(rect, node.text.text); node.textSource.text = copyText; node.audioSource.audio = (AudioClip)EditorGUI.ObjectField(new Rect(0f, rect.height - 16f, rect.width, 16f), node.audioSource.audio, typeof(AudioClip), false); }