Esempio n. 1
0
        public void ShowBxlanEditor(BxlanHeader bxlan)
        {
            LayoutDocked          dock   = new LayoutDocked();
            LayoutAnimEditorBasic editor = new LayoutAnimEditorBasic();

            editor.LoadAnim(bxlan, ActiveLayout);
            editor.OnPropertyChanged += AnimPropertyChanged;
            editor.Dock = DockStyle.Fill;
            dock.Controls.Add(editor);

            dock.Show(this);

            /*    if (LayoutAnimEditor != null) {
             *      LayoutAnimEditor.LoadFile(bxlan.GetGenericAnimation());
             *      return;
             *  }
             *
             *  LayoutAnimEditor = new LayoutAnimEditor();
             *  AnimationPanel.OnNodeSelected = LayoutAnimEditor.OnNodeSelected;
             *  LayoutAnimEditor.LoadFile(bxlan.GetGenericAnimation());
             *  if (LayoutHierarchy != null)
             *      LayoutAnimEditor.Show(LayoutHierarchy.Pane, DockAlignment.Bottom, 0.5);
             *  else
             *      LayoutAnimEditor.Show(dockPanel1, DockState.DockRight);*/
        }
Esempio n. 2
0
        public PaneAnimationController()
        {
            InitializeComponent();

            AnimEditor      = new LayoutAnimEditorBasic();
            AnimEditor.Dock = DockStyle.Fill;
            stPanel1.Controls.Add(AnimEditor);

            stDropDownPanel1.ResetColors();
            stDropDownPanel2.ResetColors();
        }
Esempio n. 3
0
        public void LoadPane(BasePane pane, PaneEditor paneEditor)
        {
            ParentEditor = paneEditor;

            var    animations = ParentEditor.GetAnimations();
            var    material   = pane.TryGetActiveMaterial();
            string matName    = material != null ? material.Name : "";

            listViewCustom1.Items.Clear();

            var archive = pane.LayoutFile.FileInfo.IFileInfo.ArchiveParent;

            if (archive != null)
            {
                foreach (var file in archive.Files)
                {
                    if (Utils.GetExtension(file.FileName) == ".bflan" &&
                        !animations.Any(x => x.FileName == file.FileName))
                    {
                        if (BxlanHeader.ContainsEntry(file.FileData, new string[2] {
                            pane.Name, matName
                        }))
                        {
                            listViewCustom1.Items.Add(new ListViewItem(file.FileName)
                            {
                                Tag = file
                            });
                        }
                    }
                }
            }

            for (int i = 0; i < animations?.Count; i++)
            {
                if (animations[i].ContainsEntry(pane.Name) || animations[i].ContainsEntry(matName))
                {
                    listViewCustom1.Items.Add(new ListViewItem(animations[i].FileName)
                    {
                        Tag = animations[i]
                    });
                }
            }
            LayoutAnimEditorBasic editor = new LayoutAnimEditorBasic();

            stPanel1.Controls.Add(editor);
        }