Exemplo n.º 1
0
 public static void PopupTaskWindow()
 {
     instance = GetWindow <GKToyMakerDialogueExitCom>(GKToyDialogueMaker._GetDialogueLocalization("Dialogue exit"), true);
     _styleCenrer.alignment = TextAnchor.MiddleCenter;
     _styleRight.alignment  = TextAnchor.MiddleRight;
     instance.minSize       = new Vector2(300, 80);
     instance.maxSize       = new Vector2(300, 80);
     instance._data         = null;
 }
        void OnGUI()
        {
            if (null == _data)
            {
                return;
            }

            // 主内容.
            GUILayout.BeginVertical("Box");
            {
                GUILayout.BeginHorizontal();
                {
                    GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Condition") + ": ", GUILayout.Width(60));

                    int seleIdx = EditorGUILayout.Popup(_data.CondPara.Value, ConditionType.GetConditionTypeArray(), GUILayout.Width(160));
                    if (seleIdx != _data.CondPara.Value)
                    {
                        _data.CondPara.SetValue(seleIdx);
                    }
                    GKEditor.DrawBaseControl(true, _data.CondPara.Value, (obj) => { _data.CondPara.SetValue(obj); });
                }
                GUILayout.EndHorizontal();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Condition Value") + ": ", GUILayout.Width(60));
                    GKEditor.DrawBaseControl(true, _data.CondValue.Value, (obj) => { _data.CondValue.SetValue(obj); });
                }
                GUILayout.EndHorizontal();

                GKEditor.DrawInspectorSeperator();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("OutputType") + ": ", GUILayout.Width(60));

                    int seleIdx = EditorGUILayout.Popup(_data.OutPutType.Value, ConditionOutputType.GetArray(), GUILayout.Width(160));
                    if (seleIdx != _data.OutPutType.Value)
                    {
                        _data.OutPutType.SetValue(seleIdx);
                    }
                    GKEditor.DrawBaseControl(true, _data.OutPutType.Value, (obj) => { _data.OutPutType.SetValue(obj); });
                }
                GUILayout.EndHorizontal();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("YesNodeID") + ": ", GUILayout.Width(60));
                    GUILayout.Label(_data.IfYesNode.Value.ToString(), GUILayout.Width(60));
                    GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("NoNodeID") + ": ", GUILayout.Width(60));
                    GUILayout.Label(_data.IfNoNode.Value.ToString(), GUILayout.Width(60));
                }
                GUILayout.EndHorizontal();
            }
            GUILayout.EndVertical();
        }
Exemplo n.º 3
0
 void OnEnable()
 {
     if (null == instance)
     {
         instance       = GetWindow <GKToyMakerDialogueCom>(GKToyDialogueMaker._GetDialogueLocalization("Dialogue fragment"), true);
         wantsMouseMove = true;
         minSize        = new Vector2(300, 250);
         maxSize        = new Vector2(300, 250);
     }
 }
        public string [] GetConditionTypeArray()
        {
            if (0 < _strConditionTypeLst.Count)
            {
                return(_strConditionTypeLst.ToArray());
            }

            foreach (var ct in _conditionTypeData)
            {
                _strConditionTypeLst.Add(GKToyDialogueMaker._GetDialogueLocalization(ct.conditionType));
            }

            return(_strConditionTypeLst.ToArray());
        }
Exemplo n.º 5
0
        void OnGUI()
        {
            if (null == _data)
            {
                return;
            }

            // 主内容.
            GUILayout.BeginVertical("Box");
            {
                GUILayout.BeginHorizontal();
                {
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Menu Text") + ": ", GUILayout.Width(50));
                        GKEditor.DrawBaseControl(true, _data.MenuText.Value, (obj) => { _data.MenuText.SetValue(obj); });
                    }
                    GUILayout.EndHorizontal();
                }
                GUILayout.EndHorizontal();
            }
            GUILayout.EndVertical();
        }
Exemplo n.º 6
0
        void OnGUI()
        {
            if (null == _data)
            {
                return;
            }

            // 主内容.
            GUILayout.BeginVertical("Box");
            {
                GUILayout.BeginHorizontal();
                {
                    GUILayout.BeginVertical();
                    {
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Entity") + ": ", GUILayout.Width(50));
                            GKEditor.DrawBaseControl(true, _data.Entity.Value, (obj) => { _data.Entity.SetValue(obj); });
                        }
                        GUILayout.EndHorizontal();
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Entity Name") + ": ", GUILayout.Width(50));
                            GKEditor.DrawBaseControl(true, _data.Speaker.Value, (obj) => { _data.Speaker.SetValue(obj); });
                        }
                        GUILayout.EndHorizontal();
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Content") + ": ", GUILayout.Width(50));
                            GKEditor.DrawBaseControl(true, _data.SpeakText.Value, (obj) => { _data.SpeakText.SetValue(obj); });
                        }
                        GUILayout.EndHorizontal();
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Menu Text") + ": ", GUILayout.Width(50));
                            GKEditor.DrawBaseControl(true, _data.MenuText.Value, (obj) => { _data.MenuText.SetValue(obj); });
                        }
                        GUILayout.EndHorizontal();
                        GUILayout.BeginHorizontal();
                        {
                            GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("ActionDescription") + ": ", GUILayout.Width(50));
                            GKEditor.DrawBaseControl(true, _data.SpeakText2.Value, (obj) => { _data.SpeakText2.SetValue(obj); });
                        }
                        GUILayout.EndHorizontal();
                    }
                    GUILayout.EndVertical();
                    _defaultColor = GUI.backgroundColor;
                }
                GUILayout.EndHorizontal();

                GKEditor.DrawInspectorSeperator();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Camera") + ": ", GUILayout.Width(50));
                    int seleIdx = EditorGUILayout.Popup(_data.CameraRes.Value, CameraTypeData.GeTypeArray(), GUILayout.Width(130));
                    if (seleIdx != _data.CameraRes.Value)
                    {
                        _data.CameraRes.SetValue(seleIdx);
                    }
                    GKEditor.DrawBaseControl(true, _data.CameraRes.Value, (obj) => { _data.CameraRes.SetValue(obj); });
                }
                GUILayout.EndHorizontal();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Camera Value") + ": ", GUILayout.Width(50));
                    GKEditor.DrawBaseControl(true, _data.CameraValue.Value, (obj) => { _data.CameraValue.SetValue(obj); });
                }
                GUILayout.EndHorizontal();

                GKEditor.DrawInspectorSeperator();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Animation") + ": ", GUILayout.Width(50));
                    GKEditor.DrawBaseControl(true, _data.AnimationRes.Value, (obj) => { _data.AnimationRes.SetValue(obj); });
                }
                GUILayout.EndHorizontal();

                GKEditor.DrawInspectorSeperator();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Sound") + ": ", GUILayout.Width(50));
                    int seleIdx = EditorGUILayout.Popup(_data.SoundRes.Value, SoundTypeData.GeTypeArray(), GUILayout.Width(130));
                    if (seleIdx != _data.SoundRes.Value)
                    {
                        _data.SoundRes.SetValue(seleIdx);
                    }
                    GKEditor.DrawBaseControl(true, _data.SoundRes.Value, (obj) => { _data.SoundRes.SetValue(obj); });
                }
                GUILayout.EndHorizontal();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.Label(GKToyDialogueMaker._GetDialogueLocalization("Sound Value") + ": ", GUILayout.Width(50));
                    GKEditor.DrawBaseControl(true, _data.SoundValue.Value, (obj) => { _data.SoundValue.SetValue(obj); });
                }
                GUILayout.EndHorizontal();
            }
            GUILayout.EndVertical();
        }