Example #1
0
 public MainLoadingForm()
 {
     InitializeComponent();
     textBoxLoadingHelpfulHint.Text = HelpfulHintUtilities.GetRandomHelpfulHint();
     ControlUtilities.AddContextMenuStripFunctions(
         textBoxLoadingHelpfulHint,
         new List <string>()
     {
         "Show All Helpful Hints"
     },
         new List <Action>()
     {
         () => HelpfulHintUtilities.ShowAllHelpfulHints()
     });
 }
Example #2
0
        private void SetUpContextMenuStrips()
        {
            ControlUtilities.AddContextMenuStripFunctions(
                labelVersionNumber,
                new List <string>()
            {
                "Open Mapping",
                "Clear Mapping",
                "Inject Hitbox View Code",
                "Free Movement Action",
                "Everything in File",
                "Go to Closest Floor Vertex",
                "Save as Savestate",
                "Show MHS Vars",
                "Download Latest STROOP Release",
                "Documentation",
                "Show All Helpful Hints",
                "Enable TASer Settings",
                "Show Image Form",
                "Show Coin Ring Display Form",
                "Format Subtitles",
            },
                new List <Action>()
            {
                () => MappingConfig.OpenMapping(),
                () => MappingConfig.ClearMapping(),
                () => gfxTab.InjectHitboxViewCode(),
                () => Config.Stream.SetValue(MarioConfig.FreeMovementAction, MarioConfig.StructAddress + MarioConfig.ActionOffset),
                () => fileTab.DoEverything(),
                () => trianglesTab.GoToClosestVertex(),
                () => saveAsSavestate(),
                () =>
                {
                    string varFilePath = @"Config/MhsData.xml";
                    List <WatchVariableControlPrecursor> precursors =
                        XmlConfigParser.OpenWatchVariableControlPrecursors(varFilePath);
                    List <WatchVariableControl> controls = precursors.ConvertAll(
                        precursor => precursor.CreateWatchVariableControl());
                    VariablePopOutForm form = new VariablePopOutForm();
                    form.Initialize(controls);
                    form.ShowForm();
                },
                () => Process.Start("https://github.com/SM64-TAS-ABC/STROOP/releases/download/vDev/STROOP.zip"),
                () => Process.Start("https://ukikipedia.net/wiki/STROOP"),
                () => HelpfulHintUtilities.ShowAllHelpfulHints(),
                () =>
                {
                    tasTab.EnableTASerSettings();
                    tabControlMain.SelectedTab = tabPageTas;
                },
                () =>
                {
                    ImageForm imageForm = new ImageForm();
                    imageForm.Show();
                },
                () =>
                {
                    CoinRingDisplayForm form = new CoinRingDisplayForm();
                    form.Show();
                },
                () => SubtitleUtilities.FormatSubtitlesFromClipboard(),
            });

            ControlUtilities.AddCheckableContextMenuStripFunctions(
                labelVersionNumber,
                new List <string>()
            {
                "Update Cam Hack Angle",
                "Update Floor Tri",
            },
                new List <Func <bool> >()
            {
                () =>
                {
                    TestingConfig.UpdateCamHackAngle = !TestingConfig.UpdateCamHackAngle;
                    return(TestingConfig.UpdateCamHackAngle);
                },
                () =>
                {
                    TestingConfig.UpdateFloorTri = !TestingConfig.UpdateFloorTri;
                    return(TestingConfig.UpdateFloorTri);
                },
            });

            ControlUtilities.AddContextMenuStripFunctions(
                buttonMoveTabLeft,
                new List <string>()
            {
                "Restore Recommended Tab Order"
            },
                new List <Action>()
            {
                () => SavedSettingsConfig.InvokeRecommendedTabOrder()
            });

            ControlUtilities.AddContextMenuStripFunctions(
                buttonMoveTabRight,
                new List <string>()
            {
                "Restore Recommended Tab Order"
            },
                new List <Action>()
            {
                () => SavedSettingsConfig.InvokeRecommendedTabOrder()
            });

            ControlUtilities.AddContextMenuStripFunctions(
                trackBarObjSlotSize,
                new List <string>()
            {
                "Reset to Default Object Slot Size"
            },
                new List <Action>()
            {
                () =>
                {
                    trackBarObjSlotSize.Value = ObjectSlotsManager.DefaultSlotSize;
                    ChangeObjectSlotSize(ObjectSlotsManager.DefaultSlotSize);
                }
            });
        }
Example #3
0
        private void SetUpContextMenuStrips()
        {
            ControlUtilities.AddContextMenuStripFunctions(
                labelVersionNumber,
                new List <string>()
            {
                "Enable TASer Settings",
                "Show MHS Vars",
                "Download Latest STROOP Release",
                "Show All Helpful Hints",
                "Add Gfx Vertices",
                "Test Something",
            },
                new List <Action>()
            {
                () =>
                {
                    Config.RamSize                    = 0x800000;
                    checkBoxUseRomHack.Checked        = true;
                    splitContainerTas.Panel1Collapsed = true;
                    splitContainerTas.Panel2Collapsed = false;
                    Config.TasManager.ShowTaserVariables();
                    tabControlMain.SelectedTab = tabPageTas;
                },
                () =>
                {
                    string varFilePath = @"Config/MhsData.xml";
                    List <WatchVariableControlPrecursor> precursors =
                        XmlConfigParser.OpenWatchVariableControlPrecursors(varFilePath);
                    List <WatchVariableControl> controls = precursors.ConvertAll(
                        precursor => precursor.CreateWatchVariableControl());
                    VariablePopOutForm form = new VariablePopOutForm();
                    form.Initialize(controls);
                    form.ShowForm();
                },
                () => Process.Start("https://github.com/SM64-TAS-ABC/STROOP/releases/download/vDev/STROOP.zip"),
                () => HelpfulHintUtilities.ShowAllHelpfulHints(),
                () => TestUtilities.AddGraphicsTriangleVerticesToTriangleTab(),
                () => TestUtilities.TestSomething(),
            });

            ControlUtilities.AddCheckableContextMenuStripFunctions(
                labelVersionNumber,
                new List <string>()
            {
                "Disable Locking",
                "Show Invisible Objects as Signs",
                "Show Cog Tris",
                "Show Shapes",
            },
                new List <Func <bool> >()
            {
                () =>
                {
                    LockConfig.LockingDisabled = !LockConfig.LockingDisabled;
                    return(LockConfig.LockingDisabled);
                },
                () =>
                {
                    TestingConfig.ShowInvisibleObjectsAsSigns = !TestingConfig.ShowInvisibleObjectsAsSigns;
                    return(TestingConfig.ShowInvisibleObjectsAsSigns);
                },
                () =>
                {
                    TestingConfig.ShowCogTris = !TestingConfig.ShowCogTris;
                    return(TestingConfig.ShowCogTris);
                },
                () =>
                {
                    TestingConfig.ShowShapes = !TestingConfig.ShowShapes;
                    return(TestingConfig.ShowShapes);
                },
            });

            ControlUtilities.AddContextMenuStripFunctions(
                buttonMoveTabLeft,
                new List <string>()
            {
                "Restore Recommended Tab Order"
            },
                new List <Action>()
            {
                () => SavedSettingsConfig.InvokeRecommendedTabOrder()
            });

            ControlUtilities.AddContextMenuStripFunctions(
                buttonMoveTabRight,
                new List <string>()
            {
                "Restore Recommended Tab Order"
            },
                new List <Action>()
            {
                () => SavedSettingsConfig.InvokeRecommendedTabOrder()
            });
        }