public ExcelExportEditor() { SettingUI = new SettingUI(this); ExportProcessUI = new ExportProcessUI(this); PriorityConfig = new PriorityConfig(); SingleExcelConfigUI = new SingleExcelConfigUI(this); OneKeyExportUI = new ExcelOneKeyExportUI(this); }
void Update() { if (ExportProcessUI.ExportProcessMode != ExportProcessUI.ProcessMode.None) { if (ExportProcessUI.NeedUpdate()) { Repaint(); } } }
private void OnGUI() { if (ExportProcessUI.ExportProcessMode != ExportProcessUI.ProcessMode.None) { ExportProcessUI.ExportProcess(); return; } PriorityConfig.LoadPriorityConfig(); if (SingleExcelConfigUI.ShowSingleExcelUI) { SingleExcelConfigUI.ShowSingleExcelConfigUI(); return; } var iconExcel = LoadTexture("Excel.png"); var iconSetting = LoadTexture("Setting.png"); GUIContent[] guiObjs = { new GUIContent(iconExcel, "Excel Export"), new GUIContent(iconSetting, "Excel Export Setting"), }; GUILayoutOption[] options = { GUILayout.Width(100), GUILayout.Height(44), }; GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); m_ToolMode = (ToolMode)GUILayout.Toolbar((int)m_ToolMode, guiObjs, options); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); SettingUI.LoadCSSettingConfig(); if (m_LastToolMode != m_ToolMode) { EditorGUI.FocusTextInControl(""); m_LastToolMode = m_ToolMode; } switch (m_ToolMode) { case ToolMode.Excel: OneKeyExportUI.ExcelOneKeyExportEditorUI(); break; case ToolMode.Setting: SettingUI.SettingModeUI(); break; } }
void OnDestroy() { ExportProcessUI.Destory(); }