Beispiel #1
0
        private void AddTextureFTEX(BFRESGroupNode ftexCont)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter      = FileFilters.FTEX;
            ofd.Multiselect = true;

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                string ResourceName = Path.GetFileNameWithoutExtension(ofd.FileName);

                FTEX ftex = new FTEX();
                ftex.texture = new ResU.Texture();
                ftex.Text    = ResourceName;
                ftex.Replace(ofd.FileName);

                if (ftex.IsEdited)
                {
                    ftexCont.AddNode(ftex);
                }
                else
                {
                    ftex.Unload();
                }

                listView1.Items.Add(ftex.Text, ftex.Text, 0);

                int lastItem = listView1.Items.Count - 1;
                listView1.Items[lastItem].Selected = true;
                listView1.Select();
            }
        }
Beispiel #2
0
        public void NewEmbeddedFile()
        {
            BFRESGroupNode   group = new BFRESGroupNode();
            ExternalFileData fshu  = new ExternalFileData("NewFile", new byte[0]);

            group.AddNode(fshu, "NewFile");
            SetupAddedNode(group, fshu);
        }
Beispiel #3
0
        public void NewModel()
        {
            BFRESGroupNode group = new BFRESGroupNode();
            FMDL           anim  = new FMDL();

            if (IsWiiU)
            {
                BfresWiiU.ReadModel(anim, new ResU.Model());
            }
            else
            {
                BfresSwitch.ReadModel(anim, new ResNX.Model());
            }

            group.AddNode(anim, "NewModel");
        }