Example #1
0
            public MenuExt()
            {
                experimentalMenu[0] = new STToolStripItem("BEA");

                STToolStripItem batchLUA = new STToolStripItem("Batch Extract LUA");

                batchLUA.Click += BatchExtractLUA;


                experimentalMenu[0].DropDownItems.Add(batchLUA);
            }
Example #2
0
        bool MenuHasItem(ToolStripMenuItem target, STToolStripItem item)
        {
            foreach (ToolStripItem i in target.DropDownItems)
            {
                if (i.Text == item.Text)
                {
                    return(true);
                }
            }

            return(false);
        }
Example #3
0
        STToolStripItem GetDuplicateMenuItem(ToolStripMenuItem target, STToolStripItem item)
        {
            foreach (STToolStripItem i in target.DropDownItems)
            {
                if (i.Text == item.Text)
                {
                    return(i);
                }
            }

            return(null);
        }
        public void AddContextMenu(STToolStripItem menu)
        {
            foreach (ToolStripItem item in stContextMenuStrip1.Items)
            {
                if (item.Text == menu.Text)
                {
                    return;
                }
            }

            stContextMenuStrip1.Items.Add(menu);
        }
Example #5
0
            public MenuExt()
            {
                toolsExt[0] = new STToolStripItem("Super Mario Odyssey");
                toolsExt[0].DropDownItems.Add(new STToolStripItem(" Kingdom Selector", OpenKingdomSelector));
                toolsExt[0].DropDownItems.Add(new STToolStripItem(" Costume Selector", OpenSelector));

                toolsExt[1] = new STToolStripItem("Mario Kart 8");
                toolsExt[1].DropDownItems.Add(new STToolStripItem("Probe Light Converter", GenerateProbeLightBounds));


                toolsExt[2] = new STToolStripItem("Breath Of The Wild");
                toolsExt[2].DropDownItems.Add(new STToolStripItem("Actor Editor", ActorEditor));
            }
Example #6
0
        public void UpdateByaml(System.Collections.IEnumerable by, bool _pathSupport, ushort _ver, ByteOrder defaultOrder = ByteOrder.LittleEndian, bool IsSaveDialog = false, BYAML byaml = null)
        {
            FileFormat = byaml;

            treeView1.Nodes.Clear();

            stTabControl1.myBackColor = FormThemes.BaseTheme.FormBackColor;

            if (byaml.FileName == "course_muunt_debug.byaml" && useMuunt)
            {
                pathSupport = true;

                stPanel1.Controls.Remove(splitContainer1);

                TurboMunntEditor editor = new TurboMunntEditor();
                editor.Dock = DockStyle.Fill;
                editor.LoadCourseInfo(by, byaml.FilePath);
                stPanel1.Controls.Add(editor);
                return;
            }


            byteOrder   = defaultOrder;
            FileName    = byaml.FileName;
            byml        = by;
            pathSupport = _pathSupport;
            bymlVer     = _ver;

            if (byml == null)
            {
                return;
            }
            ParseBymlFirstNode();

            stPanel4.Controls.Clear();

            textEditor = new TextEditor();
            textEditor.ClearContextMenus(new string[] { "Search" });
            textEditor.AddContextMenu("Decompile", TextEditorToYaml);
            textEditor.AddContextMenu("Compile", TextEditorFromYaml);

            var formatMenu = new STToolStripItem("Change Formatting");

            formatMenu.DropDownItems.Add(xmlOldToolstrip);
            formatMenu.DropDownItems.Add(xmlToolstrip);
            formatMenu.DropDownItems.Add(yamlToolstrip);

            textEditor.AddContextMenu(formatMenu);

            stPanel4.Controls.Add(textEditor);
        }
Example #7
0
 public KCL()
 {
     ContextMenuStrip = new STContextMenuStrip();
     ContextMenuStrip.Items.Add(new STToolStripItem("Save", Save));
     ContextMenuStrip.Items.Add(new STToolStripItem("Export", Export));
     ContextMenuStrip.Items.Add(new STToolStripItem("Replace", Replace));
     ContextMenuStrip.Items.Add(new STToolStripItem("Open Material Editor", OpenMaterialEditor));
     EndiannessToolstrip = new STToolStripItem("Big Endian Mode", SwapEndianess)
     {
         Checked = true
     };
     ContextMenuStrip.Items.Add(EndiannessToolstrip);
     CanSave   = true;
     IFileInfo = new IFileInfo();
 }
Example #8
0
        private void SaveRecentFile(string path)
        {
            Console.WriteLine($"SaveRecentFile {path}");

            recentToolStripMenuItem.DropDownItems.Clear();
            LoadRecentList();                  //load list from file
            if (!(RecentFiles.Contains(path))) //prevent duplication on recent list
            {
                RecentFiles.Insert(0, path);   //insert given path into list
            }
            //keep list number not exceeded the given value
            while (RecentFiles.Count > MRUnumber)
            {
                RecentFiles.RemoveAt(MRUnumber);
            }
            foreach (string item in RecentFiles)
            {
                //create new menu for each item in list
                STToolStripItem fileRecent = new STToolStripItem();
                fileRecent.Click   += RecentFile_click;
                fileRecent.Text     = item;
                fileRecent.Size     = new System.Drawing.Size(170, 40);
                fileRecent.AutoSize = true;
                fileRecent.Image    = null;

                //add the menu to "recent" menu
                recentToolStripMenuItem.DropDownItems.Add(fileRecent);
            }
            //writing menu list to file
            //create file called "Recent.txt" located on app folder
            StreamWriter stringToWrite =
                new StreamWriter(Runtime.ExecutableDir + "\\Recent.txt");

            foreach (string item in RecentFiles)
            {
                stringToWrite.WriteLine(item); //write list to stream
            }
            stringToWrite.Flush();             //write stream to file
            stringToWrite.Close();             //close the stream and reclaim memory
        }
 public MenuExt()
 {
     newFileExt[0] = new STToolStripItem("BFLIM From Image", CreateNew);
 }
 public MenuExt()
 {
     toolExt[0]        = new STToolStripItem("Batch Export NUTEXB");
     toolExt[0].Click += Export;
 }
Example #11
0
 void MergeDuplicateMenus(STToolStripItem src, STToolStripItem dest)
 {
     dest.DropDownItems.AddRange(src.DropDownItems);
 }
Example #12
0
 public MenuExt()
 {
     toolExt[0] = new STToolStripItem("Textures");
     toolExt[0].DropDownItems.Add(new STToolStripItem("Batch Export (NUTEXB)", Export));
 }
Example #13
0
 public ProbeBoundingConverter()
 {
     toolsExt[0]        = new STToolStripItem("Mario Kart 8 Probe Light Converter");
     toolsExt[0].Click += GenerateProbeLightBounds;
 }
Example #14
0
 public MenuExt()
 {
     toolFileExt[0] = new STToolStripItem("BYAML to Big Endian", ConvertLEtoBE);
     toolFileExt[1] = new STToolStripItem("BYAML to Little Endian", ConvertBEtoLE);
 }
Example #15
0
 public MenuExt()
 {
     toolExt[0] = new STToolStripItem("Models");
     toolExt[0].DropDownItems.Add(new STToolStripItem("Batch Export (LM2A .bin)", BatchExport));
     toolExt[0].DropDownItems.Add(new STToolStripItem("Batch Export as Combined (LM2A .bin)", BatchExportCombined));
 }
Example #16
0
 public MenuExt()
 {
     toolFileExt[0] = new STToolStripItem("BYAML");
     toolFileExt[0].DropDownItems.Add(new STToolStripItem("Convert to Big Endian", ConvertLEtoBE));
     toolFileExt[0].DropDownItems.Add(new STToolStripItem("Convert to Little Endian", ConvertBEtoLE));
 }
Example #17
0
 public MenuExt()
 {
     newFileExt[0] = new STToolStripItem("KCL (Switch)", CreateNew);
     newFileExt[1] = new STToolStripItem("KCL (Wii U)", CreateNew);
 }
Example #18
0
 public MenuExt()
 {
     newFileMenu[0] = new STToolStripItem("SARC (Wii U)", CreateNewBigEndianSarc);
     newFileMenu[1] = new STToolStripItem("SARC (Switch/3DS)", CreateNewLittleEndianSarc);
 }
Example #19
0
 public OdysseyCostumeSelectorMenu()
 {
     toolsExt[0]        = new STToolStripItem("Odyssey Costume Selctor");
     toolsExt[0].Click += OpenSelector;
 }
Example #20
0
 public MenuExt()
 {
     toolExt[0] = new STToolStripItem("Textures");
     toolExt[0].DropDownItems.Add(new STToolStripItem("Batch Export (Wii U Textures)", Export));
     newFileExt[0] = new STToolStripItem("BFLIM From Image", CreateNew);
 }
Example #21
0
 public MenuExt()
 {
     newFileExt[0]        = new STToolStripItem("Layout Editor");
     newFileExt[0].Click += LoadNewLayoutEditor;
 }