void DisplayGUI() { DrawDefaultInspector(); EditorGUILayout.Space(); EditorGUILayout.LabelField("Copy String Tables", EditorStyles.boldLabel); GUILayoutHelper.Indent(() => { targetInternalStrings = EditorGUILayout.TextField("Internal Strings > ", targetInternalStrings); targetRSCStrings = EditorGUILayout.TextField("RSC Strings > ", targetRSCStrings); }); overwriteTargetStringTables = EditorGUILayout.Toggle(new GUIContent("Overwrite Target String Tables?", "When enabled will copy over existing strings in target string tables."), overwriteTargetStringTables); if (overwriteTargetStringTables) { EditorGUILayout.HelpBox("Warning: Existing keys in the target string tables will be replaced by source.", MessageType.Warning); } else { EditorGUILayout.HelpBox("Copy will create all missing keys in target string tables from source. Existing keys will not be overwritten.", MessageType.Info); } EditorGUILayout.Space(); if (GUILayout.Button("Copy All")) { DaggerfallStringTableImporter.CopyInternalStringTable(targetInternalStrings, overwriteTargetStringTables); //DaggerfallStringTableImporter.ImportTextRSCToStringTables(rscCollectionName.stringValue); } }
void DisplayGUI() { var runtimeInternalStrings = Prop("runtimeInternalStrings"); var runtimeRSCStrings = Prop("runtimeRSCStrings"); var runtimeBOKStrings = Prop("runtimeBOKStrings"); var runtimeFlatStrings = Prop("runtimeFlatStrings"); var tableCopyOverwriteTargetStringTables = Prop("tableCopyOverwriteTargetStringTables"); var tableCopyTargetInternalStrings = Prop("tableCopyTargetInternalStrings"); var tableCopyTargetRSCStrings = Prop("tableCopyTargetRSCStrings"); var tableCopyTargetBOKStrings = Prop("tableCopyTargetBOKStrings"); var tableCopyTargetFlatStrings = Prop("tableCopyTargetFlatStrings"); EditorGUILayout.Space(); EditorGUILayout.LabelField("Live String Tables", EditorStyles.boldLabel); GUILayoutHelper.Indent(() => { runtimeInternalStrings.stringValue = EditorGUILayout.TextField("Internal Strings", runtimeInternalStrings.stringValue); runtimeRSCStrings.stringValue = EditorGUILayout.TextField("RSC Strings", runtimeRSCStrings.stringValue); runtimeBOKStrings.stringValue = EditorGUILayout.TextField("BOK Strings", runtimeBOKStrings.stringValue); runtimeFlatStrings.stringValue = EditorGUILayout.TextField("FLATS.CFG Strings", runtimeFlatStrings.stringValue); }); EditorGUILayout.Space(); EditorGUILayout.LabelField("Copy String Tables", EditorStyles.boldLabel); GUILayoutHelper.Indent(() => { tableCopyTargetInternalStrings.stringValue = EditorGUILayout.TextField("Internal Strings > ", tableCopyTargetInternalStrings.stringValue); tableCopyTargetRSCStrings.stringValue = EditorGUILayout.TextField("RSC Strings > ", tableCopyTargetRSCStrings.stringValue); tableCopyTargetBOKStrings.stringValue = EditorGUILayout.TextField("BOK Strings > ", tableCopyTargetBOKStrings.stringValue); tableCopyTargetFlatStrings.stringValue = EditorGUILayout.TextField("FLATS.CFG Strings > ", tableCopyTargetFlatStrings.stringValue); tableCopyOverwriteTargetStringTables.boolValue = EditorGUILayout.Toggle(new GUIContent("Overwrite String Tables?", "When enabled will copy over existing strings in target string tables."), tableCopyOverwriteTargetStringTables.boolValue); }); if (tableCopyOverwriteTargetStringTables.boolValue) { EditorGUILayout.HelpBox("Warning: Existing keys in the target string tables will be replaced by source.", MessageType.Warning); } else { EditorGUILayout.HelpBox("Copy will create all missing keys in target string tables from source. Existing keys will not be overwritten.", MessageType.Info); } EditorGUILayout.Space(); if (GUILayout.Button("Copy All")) { DaggerfallStringTableImporter.CopyInternalStringTable(tableCopyTargetInternalStrings.stringValue, tableCopyOverwriteTargetStringTables.boolValue); DaggerfallStringTableImporter.CopyTextRSCToStringTable(tableCopyTargetRSCStrings.stringValue, tableCopyOverwriteTargetStringTables.boolValue); //DaggerfallStringTableImporter.CopyTextBOKToStringTable(tableCopyTargetBOKStrings.stringValue, tableCopyOverwriteTargetStringTables.boolValue); DaggerfallStringTableImporter.CopyTextFlatsToStringTable(tableCopyTargetFlatStrings.stringValue, tableCopyOverwriteTargetStringTables.boolValue); } }