Beispiel #1
0
        private void launchCine_Click(object sender, EventArgs e)
        {
            CinematicMod cineMod = new CinematicMod(this, r2Process);

            float speedValue = speedBar.Value / 100000f;

            enableCineCommands(false);
            stopButton.Enabled = true;
            checkBox1.Enabled  = false;

            Action onCompleted = () =>
            {
                Invoke(new Action(() =>
                {
                    stopButton.Enabled = false;
                    checkBox1.Enabled  = true;
                    enableCineCommands(true);
                    cineMod.ChangeFOV(fovBar.Value / 10f);
                }));
            };

            cinematicThread = new Thread(() =>
            {
                try
                {
                    cineMod.LaunchCinematic(speedValue);
                }
                finally
                {
                    onCompleted();
                }
            });

            cinematicThread.Start();
        }
Beispiel #2
0
        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            float fovFloatValue = fovBar.Value / 10f;

            fovValue.Text = "FOV: " + fovFloatValue.ToString();

            CinematicMod cineMod = new CinematicMod(this, r2Process);

            cineMod.ChangeFOV(fovFloatValue);
        }
Beispiel #3
0
        private void setDefaultFOV_Click(object sender, EventArgs e)
        {
            fovBar.Value = 12;
            float fovFloatValue = fovBar.Value / 10f;

            fovValue.Text = "FOV: " + fovFloatValue.ToString();

            CinematicMod cineMod = new CinematicMod(this, r2Process);

            cineMod.ChangeFOV(fovFloatValue);
        }
Beispiel #4
0
        private void stopButton_Click(object sender, EventArgs e)
        {
            if (cinematicThread.IsAlive)
            {
                cinematicThread.Abort();

                CinematicMod cineMod = new CinematicMod(this, r2Process);
                stopButton.Enabled = false;
                checkBox1.Enabled  = true;
                enableCineCommands(true);
                cineMod.ChangeFOV(fovBar.Value / 10f);
            }
        }
Beispiel #5
0
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            CinematicMod cineMod = new CinematicMod(this, r2Process);

            if (checkBox1.Checked)
            {
                CineModEnabled = true;
                enableCineCommands(true);

                cineMod.ChangeFOV(fovBar.Value / 10f);
                cineMod.EnableCinematicMod();
            }
            else
            {
                CineModEnabled = false;
                enableCineCommands(false);

                cineMod.DisableCinematicMod();
            }
        }