Exemplo n.º 1
0
        //Events
        private void MainWindow_DataLoaded(TaleData obj)
        {
            StoryFile.ItemCreated += StoryFile_ItemCreated;
            StoryFile.ItemRemoved += StoryFile_ItemRemoved;

            EditingClip = StoryFile.RootClip;
        }
Exemplo n.º 2
0
        private void StoryFile_ItemRemoved(StoryBlockBase item, StoryClip parentItem)
        {
            //Remove view
            dataToViewDict[item].DetachParent();
            //StoryFile.RemoveStoryBlockItem(item);

            dataToViewDict.Remove(item);
        }
Exemplo n.º 3
0
 void LoadStory(StoryClip clip)
 {
     currentClip  = Instantiate(clip);
     currentStory = currentClip.story;
     bgm          = currentClip.bgm;
     SetTextColor(currentClip.textColor);
     SetBackColor(currentClip.backgroundColor);
 }
Exemplo n.º 4
0
        private void StoryFile_ItemCreated(StoryBlockBase item, StoryClip parentItem)
        {
            if (parentItem == null)
            {
                return;
            }
            if (parentItem != EditingClip)
            {
                return;
            }

            //Create view
            StoryBlockItemView itemView = new StoryBlockItemView(item);

            StoryBlockTreeView.ChildItemCollection.Add(itemView);
            itemView.ParentItem = StoryBlockTreeView;

            dataToViewDict.Add(item, itemView);
        }