Esempio n. 1
0
        public static void ShowPopUp(TranslationDictionaryEditor editor)
        {
            ImportCsvPopUp window = GetWindow <ImportCsvPopUp>(true, "Import CSV", true);

            window.Editor           = editor;
            window.DictionaryToEdit = (TranslationDictionary)editor.serializedObject.targetObject;
            window.minSize          = DefaultWindowSize;
            window.Show();
        }
Esempio n. 2
0
        private void DrawSyncCsv()
        {
            // Draw label
            EditorGUILayout.Space();
            EditorGUILayout.LabelField("Sync with CSV file", EditorStyles.boldLabel);

            // Draw the buttons
            EditorGUILayout.BeginHorizontal();
            if (GUILayout.Button("Import...") == true)
            {
                // Create a separate pop-up window for this, rather than a serious of pop-ups like this ridiculous monstrosity.
                ImportCsvPopUp.ShowPopUp(this);
            }
            if (GUILayout.Button("Export...") == true)
            {
                ExportCsv((TranslationDictionary)target);
            }
            EditorGUILayout.EndHorizontal();
        }