예제 #1
0
        void OnGUI()
        {
            //スクロール
            this.scrollPosition = EditorGUILayout.BeginScrollView(this.scrollPosition);

            GUILayout.Space(4f);
            EditorGUILayout.BeginHorizontal();
//			GUIStyle style = new GUIStyle();
//			style.richText = true;
            UtageEditorToolKit.BoldLabel("Project", GUILayout.Width(80f));
            EditorGUILayout.EndHorizontal();
            GUILayout.Space(4f);

            AdvScenarioDataProject project = EditorGUILayout.ObjectField("", ProjectData, typeof(AdvScenarioDataProject), false) as AdvScenarioDataProject;

            if (project != ProjectData)
            {
                ProjectData = project;
            }

            if (ProjectData != null)
            {
                DrawProject();
            }

            EditorGUILayout.EndScrollView();
        }
예제 #2
0
        //シナリオラベルデータを表示
        void OnScnearioLabelData(AdvScenarioLabelData data)
        {
            if (data == null)
            {
                UtageEditorToolKit.BoldLabel("Not found scenario data");
            }
            else
            {
                //エディタ上のビュワーで表示するラベル
                string viewerLabel = "*" + data.ScenaioLabel + "   " + data.FileLabel;
                if (currentCommand != null && currentCommand.RowData != null)
                {
                    viewerLabel += " : " + currentCommand.RowData.RowIndex;
                }
                GUILayout.Label(viewerLabel);

                //位置を記憶しておく
                if (Event.current.type == EventType.Repaint)
                {
                    Rect rect = GUILayoutUtility.GetLastRect();
                    scrollTopY = rect.y + rect.height;
                }

                this.scrollPosition2 = EditorGUILayout.BeginScrollView(this.scrollPosition2);
                data.PageDataList.ForEach(x => OnGuiPage(x));
                EditorGUILayout.EndScrollView();
            }
        }
예제 #3
0
        protected override void OnGUISub()
        {
            AdvEngine engine = UtageEditorToolKit.FindComponentAllInTheScene <AdvEngine>();

            if (engine == null)
            {
                UtageEditorToolKit.BoldLabel("Not found AdvEngine");
            }
            else
            {
                OnGuiParam(engine);
            }
        }
예제 #4
0
 protected override void OnGUISub()
 {
     this.engine = UtageEditorToolKit.FindComponentAllInTheScene <AdvEngine>();
     if (engine == null)
     {
         UtageEditorToolKit.BoldLabel("Not found AdvEngine");
         return;
     }
     else
     {
         OnGuiCurrentScenario();
     }
 }
예제 #5
0
 //ページデータを描画
 void OnGuiPage(AdvScenarioPageData page)
 {
     if (page == null)
     {
         UtageEditorToolKit.BoldLabel("Not found page data");
     }
     else
     {
         EditorGUILayout.BeginVertical(WindowStyle);
         page.CommnadList.ForEach(x => OnGuiCommand(x));
         EditorGUILayout.EndVertical();
     }
 }
        void OnGUI()
        {
            UtageEditorToolKit.BeginGroup("Create New Project");
//			GUIStyle style = new GUIStyle();
            GUILayout.Space(4f);
            UtageEditorToolKit.BoldLabel("Input New Project Name", GUILayout.Width(200f));
            newProjectName = EditorGUILayout.TextField(newProjectName);

            GUILayout.Space(4f);
            UtageEditorToolKit.BoldLabel("Select Create Type", GUILayout.Width(200f));
            Type type = (Type)EditorGUILayout.EnumPopup("Type", createType);

            if (createType != type)
            {
                createType = type;
            }
            UtageEditorToolKit.EndGroup();

            //レイヤー設定
            bool isDisableLayer = false;

            if (type == Type.AddToCurrentScene)
            {
                UtageEditorToolKit.BeginGroup("Layer Setting");
                layerName   = EditorGUILayout.TextField("Layer Name", layerName);
                layerNameUI = EditorGUILayout.TextField("UI Layer Name", layerNameUI);
                UtageEditorToolKit.EndGroup();

                if (string.IsNullOrEmpty(layerName) || string.IsNullOrEmpty(layerNameUI))
                {
                    isDisableLayer = true;
                }
            }

            //ゲームの画面サイズ
            EditorGUI.BeginDisabledGroup(!(createType != Type.CreateScenarioAssetOnly));
            GUILayout.Space(4f);
            UtageEditorToolKit.BeginGroup("Game Screen Size");
            int width = EditorGUILayout.IntField("Width", gameScreenWidth);

            if (gameScreenWidth != width && width > 0)
            {
                gameScreenWidth = width;
            }
            int height = EditorGUILayout.IntField("Height", gameScreenHeight);

            if (gameScreenHeight != height && height > 0)
            {
                gameScreenHeight = height;
            }
            UtageEditorToolKit.EndGroup();
            EditorGUI.EndDisabledGroup();

            //ゲームの画面サイズ
            EditorGUI.BeginDisabledGroup(!(createType != Type.CreateScenarioAssetOnly));
            GUILayout.Space(4f);
            UtageEditorToolKit.BeginGroup("Font");
            this.uiFont = EditorGUILayout.ObjectField("Font", UiFont, typeof(Font), false) as Font;
            UtageEditorToolKit.EndGroup();
            EditorGUI.EndDisabledGroup();

            //秘密キー
            EditorGUI.BeginDisabledGroup(!(createType != Type.CreateScenarioAssetOnly));
            GUILayout.Space(4f);
            UtageEditorToolKit.BeginGroup("Security");
            this.secretKey = EditorGUILayout.TextField("File Write Key", this.secretKey);
            bool isEnableSecretKey = !string.IsNullOrEmpty(this.secretKey);

            EditorGUI.EndDisabledGroup();
            UtageEditorToolKit.EndGroup();

            bool isProjectNameEnable = IsEnableProjcetName(newProjectName);

            EditorGUI.BeginDisabledGroup(!isProjectNameEnable || isDisableLayer || !isEnableSecretKey);
            bool isCreate = GUILayout.Button("Create", GUILayout.Width(80f));

            EditorGUI.EndDisabledGroup();
            if (isCreate)
            {
                Create();
            }
        }