Example #1
0
 public static void PopupTaskWindow()
 {
     instance = GetWindow <GKToyMakerDialogueCom>(GKToyDialogueMaker._GetDialogueLocalization("Dialogue fragment"), true);
     _styleCenrer.alignment = TextAnchor.MiddleCenter;
     _styleRight.alignment  = TextAnchor.MiddleRight;
     instance.minSize       = new Vector2(300, 260);
     instance.maxSize       = new Vector2(300, 260);
     instance._data         = null;
 }
Example #2
0
 public void ShowDialogue(GKToyBaseOverlord overlord)
 {
     _instance = GetWindow <GKToyDialogueMaker>(_GetDialogueLocalization("Dialogue Editor"), true);
     _Init();
     wantsMouseMove = true;
     minSize        = new Vector2(ToyMakerBase._minWidth, ToyMakerBase._minHeight);
     maxSize        = new Vector2(ToyMakerBase._minWidth, ToyMakerBase._minHeight);
     _ResetSelected(overlord);
     _isLocking = true;
 }
Example #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);
     }
 }
Example #4
0
        public string[] GetActionTypeArray()
        {
            if (0 < _strActionTypeLst.Count)
            {
                return(_strActionTypeLst.ToArray());
            }

            foreach (var ct in _actionTypeData)
            {
                _strActionTypeLst.Add(GKToyDialogueMaker._GetDialogueLocalization(ct.actionType));
            }

            return(_strActionTypeLst.ToArray());
        }
Example #5
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();
        }