private void DrawOtherScriptsField() { EditorGUI.BeginChangeCheck(); prefs.OtherScriptFields = EditorGUILayout.TextField(new GUIContent("Other Script Fields", "(Optional) Other fields that contain articy:expresso code that should be converted to Lua. Separate fields with semicolons (;)."), prefs.OtherScriptFields); if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); } }
/// <summary> /// Draws the Overwrite checkbox. /// </summary> private void DrawOverwriteCheckbox() { EditorGUI.BeginChangeCheck(); prefs.Overwrite = EditorGUILayout.Toggle("Overwrite", prefs.Overwrite); if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); } }
/// <summary> /// Draws the encoding popup. /// </summary> private void DrawEncodingPopup() { EditorGUI.BeginChangeCheck(); prefs.EncodingType = (EncodingType)EditorGUILayout.EnumPopup(new GUIContent("Encoding", "articy:draft exports to XML using your system's current text encoding setting. Use the same encoding value here to properly import special characters."), prefs.EncodingType, GUILayout.Width(300)); if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); } }
/// <summary> /// Draws the recursion mode dropdown. /// </summary> private void DrawRecursionMode() { EditorGUI.BeginChangeCheck(); prefs.RecursionMode = (ConverterPrefs.RecursionModes)EditorGUILayout.EnumPopup(new GUIContent("Recursion", "Specify whether to link nested conversations."), prefs.RecursionMode, GUILayout.Width(300)); if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); } }
private void DrawDocumentsSubmenu() { EditorGUI.BeginChangeCheck(); prefs.DocumentsSubmenu = EditorGUILayout.TextField(new GUIContent("Documents Submenu", "When converting documents to conversations, group them under this submenu. Leave blank for no submenu."), prefs.DocumentsSubmenu); prefs.TextTableDocument = EditorGUILayout.TextField(new GUIContent("TextTable Document", "Optional name of document whose text should be written to a TextTable asset."), prefs.TextTableDocument); if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); } }
/// <summary> /// Draws the Slots handling checkbox. /// </summary> private void DrawSlotsPopup() { var newValue = (ConverterPrefs.ConvertSlotsModes)EditorGUILayout.EnumPopup(new GUIContent("Slots as ", "Specify how to import slots."), prefs.ConvertSlotsAs, GUILayout.Width(300)); if (newValue != prefs.ConvertSlotsAs) { prefs.ConvertSlotsAs = newValue; articyData = null; ConverterPrefsTools.Save(prefs); } }
/// <summary> /// Draws the Stage Dirs handling popup. /// </summary> private void DrawStageDirectionsPopup() { var mode = prefs.StageDirectionsAreSequences ? ConverterPrefs.StageDirModes.Sequences : ConverterPrefs.StageDirModes.NotSequences; mode = (ConverterPrefs.StageDirModes)EditorGUILayout.EnumPopup(new GUIContent("Stage Directions are ", "Specify whether articy:draft Stage Directions contain Dialogue System sequences."), mode, GUILayout.Width(300)); EditorGUI.BeginChangeCheck(); prefs.StageDirectionsAreSequences = (mode == ConverterPrefs.StageDirModes.Sequences); if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); } }
private void DrawVoiceOverOptions() { EditorGUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); prefs.VoiceOverProperty = EditorGUILayout.TextField(new GUIContent("VoiceOverFile Property", "If using Nevigo's beta voice-over plugin, specify the property as defined in the plugin."), prefs.VoiceOverProperty); if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); } if (GUILayout.Button(new GUIContent("Info", "How to get the voice-over plugin."), GUILayout.Width(50))) { Application.OpenURL("http://www.nevigo.com/redirect/Mdk.VoiceOverHelper.Installer"); } EditorGUILayout.EndHorizontal(); }
/// <summary> /// Draws the articy:draft Project filename field. /// </summary> private void DrawProjectFilenameField() { EditorGUI.BeginChangeCheck(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.TextField(new GUIContent("articy:draft Project", "The XML file that you exported from articy:draft."), prefs.ProjectFilename); if (GUILayout.Button("...", EditorStyles.miniButtonRight, GUILayout.Width(22))) { prefs.ProjectFilename = EditorUtility.OpenFilePanel("Select articy:draft Project", EditorWindowTools.GetDirectoryName(prefs.ProjectFilename), "xml"); GUIUtility.keyboardControl = 0; } EditorGUILayout.EndHorizontal(); if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); articyData = null; } }
/// <summary> /// Draws the Save To field. /// </summary> private void DrawSaveToField() { EditorGUI.BeginChangeCheck(); EditorGUILayout.BeginHorizontal(); prefs.OutputFolder = EditorGUILayout.TextField("Save To", prefs.OutputFolder); if (GUILayout.Button("...", EditorStyles.miniButtonRight, GUILayout.Width(22))) { prefs.OutputFolder = EditorUtility.SaveFolderPanel("Path to Save Database", prefs.OutputFolder, ""); prefs.OutputFolder = "Assets" + prefs.OutputFolder.Replace(Application.dataPath, string.Empty); GUIUtility.keyboardControl = 0; } EditorGUILayout.EndHorizontal(); if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); } }
/// <summary> /// Draws the Portrait Folder field. /// </summary> private void DrawPortraitFolderField() { EditorGUI.BeginChangeCheck(); EditorGUILayout.BeginHorizontal(); prefs.PortraitFolder = EditorGUILayout.TextField(new GUIContent("Portrait Folder", "The importer will look here for actor entities' portrait textures."), prefs.PortraitFolder); if (GUILayout.Button("...", EditorStyles.miniButtonRight, GUILayout.Width(22))) { prefs.PortraitFolder = EditorUtility.OpenFolderPanel("Location of Portrait Textures", prefs.PortraitFolder, ""); prefs.PortraitFolder = "Assets" + prefs.PortraitFolder.Replace(Application.dataPath, string.Empty); GUIUtility.keyboardControl = 0; } EditorGUILayout.EndHorizontal(); if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); } }
/// <summary> /// Draws the flow fragments dropdown. /// </summary> private void DrawFlowFragmentMode() { EditorGUI.BeginChangeCheck(); prefs.FlowFragmentMode = (ConverterPrefs.FlowFragmentModes)EditorGUILayout.EnumPopup(new GUIContent("FlowFragments are ", "Specify how flow fragments should be treated."), prefs.FlowFragmentMode, GUILayout.Width(300)); if (prefs.FlowFragmentMode == ConverterPrefs.FlowFragmentModes.ConversationGroups || prefs.FlowFragmentMode == ConverterPrefs.FlowFragmentModes.NestedConversationGroups) { prefs.FlowFragmentScript = EditorGUILayout.TextField(new GUIContent("FlowFragment Script", "When a dialogue references a flow fragment, invoke this Lua function, passing the flow fragment's display name. Leave blank for no script."), prefs.FlowFragmentScript); if (!string.IsNullOrEmpty(prefs.FlowFragmentScript)) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.HelpBox("Note: Because FlowFragment Script is specified, you must register a custom Lua function named '" + prefs.FlowFragmentScript + "' or the Dialogue System will report errors. If you don't want to do this, clear FlowFragment Script.", MessageType.Info); if (GUILayout.Button("Info", GUILayout.Width(40))) { Application.OpenURL("http://pixelcrushers.com/dialogue_system/manual/html/lua_in_scripts.html#luaClassRegisterFunction"); } EditorGUILayout.EndHorizontal(); } } if (EditorGUI.EndChangeCheck()) { ConverterPrefsTools.Save(prefs); } }
void OnDisable() { ConverterPrefsTools.Save(prefs); instance = null; }