Ejemplo n.º 1
0
        public void btnSaveSettings_Click(object sender, EventArgs e)
        {
            //music
            if (optMOn.Checked == true)
            {
                C_Types.Options.Music = (byte)1;
                // start music playing
                C_Sound.PlayMusic(C_Maps.Map.Music.Trim());
            }
            else
            {
                C_Types.Options.Music = (byte)0;
                // stop music playing
                C_Sound.StopMusic();
                C_Sound.CurMusic = "";
            }

            //sound
            if (optSOn.Checked == true)
            {
                C_Types.Options.Sound = (byte)1;
            }
            else
            {
                C_Types.Options.Sound = (byte)0;
                C_Sound.StopSound();
            }

            //screensize
            C_Types.Options.ScreenSize = System.Convert.ToByte(cmbScreenSize.SelectedIndex);

            if (chkHighEnd.Checked)
            {
                C_Types.Options.HighEnd = (byte)1;
            }
            else
            {
                C_Types.Options.HighEnd = (byte)0;
            }

            if (chkNpcBars.Checked)
            {
                C_Types.Options.ShowNpcBar = (byte)1;
            }
            else
            {
                C_Types.Options.ShowNpcBar = (byte)0;
            }

            // save to config.ini
            C_DataBase.SaveOptions();

            //reload options
            C_DataBase.LoadOptions();

            C_General.RePositionGui();

            this.Visible = false;
        }
Ejemplo n.º 2
0
        public static void GameInit()
        {
            C_UpdateUI.Pnlloadvisible = false;

            // Set the focus
            //This is sometimes called on a differant thread than picscreen was created on, so gotta do some more complicated stuffsss
            FrmGame.Default.picscreen.Invoke(new Action(() => FrmGame.Default.picscreen.Focus()));

            //stop the song playing
            C_Sound.StopMusic();
        }
Ejemplo n.º 3
0
        public static void GameInit()
        {
            C_UpdateUI.Pnlloadvisible = false;

            C_Discord.SetPresence(C_Constants.GameName, "In-Game"); // We can safely call this anywhere in the code, Even if it gets called every frame

            // Set the focus
            //This is sometimes called on a differant thread than picscreen was created on, so gotta do some more complicated stuffsss
            FrmGame.Default.picscreen.Invoke(new Action(() => FrmGame.Default.picscreen.Focus()));

            //stop the song playing
            C_Sound.StopMusic();
        }