public EditorWindow(Anniversary_container ac)
 {
     InitializeComponent();
     type = EditorWindowType.NEW;
     buttonSave.Click += buttonSave_Click;
     buttonCancel.Click += buttonCancel_Click;
     this.ac = ac;
     editorWindow.Title = "New date";
     textHappening.Text = "Description of anniversary";
     textWhenHappening.Text = DateTime.Now.ToShortDateString();
 }
 public EditorWindow(Anniversary_container ac, Anniversary ann)
 {
     InitializeComponent();
     type = EditorWindowType.EDIT;
     buttonSave.Click += buttonSave_Click;
     buttonCancel.Click += buttonCancel_Click;
     this.ac = ac;
     this.editing = ann;
     editorWindow.Title = "Edit date";
     textHappening.Text = ann.happening;
     textWhenHappening.Text = ann.date.ToShortDateString();
     repeatingCheckBox.IsChecked = ann.repeating;
 }
Exemple #3
0
    public void OnDialogOk(string message, System.Object workingObject = null, object workingObjectSecond = null)
    {
        if (((ChapterElementNameInputPopup)workingObject) != null)
        {
            EditorWindowType callbackType = ((ChapterElementNameInputPopup)workingObject).connectedAsssetType;
            switch (callbackType)
            {
            case EditorWindowType.Scenes:
                AddScene(message);
                break;

            case EditorWindowType.Cutscenes:
                int cutsceneType = ((ChapterElementNewCutsceneInputPopup)workingObject).cutsceneType;

                if (cutsceneType == Controller.CUTSCENE_SLIDES)
                {
                    AddCutsceneSlide(message);
                }
                else if (cutsceneType == Controller.CUTSCENE_VIDEO)
                {
                    AddCutsceneVideo(message);
                }

                break;

            case EditorWindowType.Books:
                AddBook(message);
                break;

            case EditorWindowType.Items:
                AddItem(message);
                break;

            case EditorWindowType.SetItems:
                AddSetItem(message);
                break;

            case EditorWindowType.Characters:
                AddNPC(message);
                break;

            case EditorWindowType.Conversations:
                AddConversation(message);
                break;
            }
        }
    }
 void OnWindowTypeChanged(EditorWindowType type_)
 {
     openedWindow = type_;
 }
Exemple #5
0
 /// <summary>
 /// Finds if mouse is hovering given editor window type.
 /// </summary>
 /// <param name="windowType">Editor window type.</param>
 /// <returns>True if the mouse is hovering given window type, otherwise false.</returns>
 public static bool IsMouseOverWindow(EditorWindowType windowType)
 {
     return(IsMouseOverWindow("UnityEditor." + windowType.ToString()));
 }
Exemple #6
0
 public static void RefreshChapter()
 {
     chapterWindow = new ChapterWindow(windowRect, new GUIContent(TC.get("Element.Name0")), "Window");
     openedWindow  = EditorWindowType.Chapter;
 }