Beispiel #1
0
        void OnGUI()
        {
            //居中样式
            fontStyle.alignment  = TextAnchor.MiddleCenter;
            titleStyle.alignment = TextAnchor.MiddleCenter;
            fontStyle.fontSize   = 10;
            titleStyle.fontSize  = 20;


            GUILayout.Space(30);

            GUILayout.BeginHorizontal();
            GUILayout.Label(DataTableEditorConfig.GetConfig().MainTitle, titleStyle);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label(DataTableEditorConfig.GetConfig().SubTitle, fontStyle);
            GUILayout.EndHorizontal();

            GUILayout.Space(30);

            //按钮
            if (GUILayout.Button(DataTableEditorConfig.GetConfig().New, GUILayout.Height(50)))
            {
                CreateDataTable();
            }

            if (GUILayout.Button(DataTableEditorConfig.GetConfig().Load, GUILayout.Height(50)))
            {
                OpenDataTable();
            }

            if (GUILayout.Button(DataTableEditorConfig.GetConfig().Setting, GUILayout.Height(50)))
            {
                this.Close();
                DataTableEditorSettingWindow.OpenWindow(this.position.position);
            }

            if (GUILayout.Button(DataTableEditorConfig.GetConfig().Generate, GUILayout.Height(50)))
            {
                this.Close();
                DataTableGenerateWindow.OpenWindow(this.position.position);
            }

            GUILayout.Space(60);

            GUILayout.BeginHorizontal();
            GUILayout.Label("Author:Jrimmmmmrz", fontStyle);
            GUILayout.EndHorizontal();

            GUILayout.Space(5);

            GUILayout.BeginHorizontal();
            GUILayout.Label(DataTableEditorConfig.GetConfig().Verision, fontStyle);
            GUILayout.EndHorizontal();

            GUILayout.Space(5);
        }
Beispiel #2
0
        /// <summary>
        /// 打开设置窗口
        /// </summary>
        /// <param name="position">窗口位置</param>
        public static void OpenWindow(Vector2 position)
        {
            GetProcessorData();

            Rect rect = new Rect(DataTableEditorLaunchWindow.WindowRect);

            rect.position = position;
            var window = DataTableEditorSettingWindow.GetWindowWithRect <DataTableEditorSettingWindow>(rect, true, DataTableEditorConfig.GetConfig().Setting);

            window.minSize  = windowSize;
            window.maxSize  = windowSize;
            window.position = rect;
            window.ShowUtility();
        }