private void TextNodeSetting() { EditorGUILayout.LabelField("Text:", EditorStyles.boldLabel); text = GUILayout.TextArea(text); if (string.IsNullOrEmpty(text)) { EditorGUILayout.HelpBox("The text is empty.", MessageType.Warning); } GUILayout.Space(10); GUILayout.BeginHorizontal(); if (GUILayout.Button("Save", GUILayout.Height(20))) { NText dialogueNode = _node as NText; //dialogueNode.text = text; currentPopup.Close(); } if (GUILayout.Button("Cancel", GUILayout.Height(20))) { currentPopup.Close(); } GUILayout.EndHorizontal(); }
private void OnEnable() { _node = (NText)target; _characterContainers = (Container)AssetDatabase.LoadAssetAtPath("Assets/Paradox Engine/Database/Data/Characters.asset", typeof(Container)); if (_characterContainers.data == null || !_characterContainers.data.Any()) { return; } _characterSelected = new List <int>(); _avancedOptions = new List <bool>(); for (int i = 0; i < _node.data.Count; i++) { _avancedOptions.Add(_node.data[i].UseCustomKey || _node.data[i].UseDelay); if (_node.data[i].Character) { _characterSelected.Add(_characterContainers.data.IndexOf(_node.data[i].Character)); } else { _characterSelected.Add(0); } } }
void ReleaseDesignerOutlets() { if (CalculateButton != null) { CalculateButton.Dispose(); CalculateButton = null; } if (NText != null) { NText.Dispose(); NText = null; } if (ResultLabel != null) { ResultLabel.Dispose(); ResultLabel = null; } }