Example #1
0
 public static void ToggleFullscreen()
 {
     if (!graphics.IsFullScreen)
     {
         Vector2 FullScreenSize = new Vector2(GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width, GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height);
         graphics.PreferredBackBufferWidth  = (int)FullScreenSize.X;
         graphics.PreferredBackBufferHeight = (int)FullScreenSize.Y;
         ScreenSize = FullScreenSize;
         graphics.ApplyChanges();
         graphics.IsFullScreen = true;
     }
     else
     {
         Vector2 FullScreenSize = new Vector2(1280, 720);
         graphics.PreferredBackBufferWidth  = (int)FullScreenSize.X;
         graphics.PreferredBackBufferHeight = (int)FullScreenSize.Y;
         ScreenSize = FullScreenSize;
         graphics.ApplyChanges();
         graphics.IsFullScreen = false;
     }
     if (!(CaptureFullscreen is null))
     {
         CaptureFullscreen.ForceState(graphics.IsFullScreen);
     }
     graphics.ApplyChanges();
 }
Example #2
0
 public static void DefaultSettings()
 {
     Mute         = false;
     GlobalVolume = 0.6f;
     TextEntity.TickWriteInterval      = 30;
     SaveLoadModule.ApplicableSaveType = "FullySerializedBinary";
     if (graphics.IsFullScreen)
     {
         ToggleFullscreen();
     }
     if (CaptureFullscreen != null)
     {
         CaptureFullscreen.ForceState(QueryFullscreen());
     }
     if (CaptureVolume != null)
     {
         CaptureVolume.ForceState(GlobalVolume);
         CaptureVolume.Enabled = !Mute;
     }
     if (CaptureTextrate != null)
     {
         CaptureTextrate.ForceState(TextEntity.GetSliderValueFromTicks(TextEntity.TickWriteInterval));
     }
     if (CaptureRateDisplay != null)
     {
         CaptureRateDisplay.Text = TextEntity.TickWriteInterval + (TextEntity.TickWriteInterval != 1 ? " milliseconds" : " millisecond");
         CaptureRateDisplay.ReWrite();
     }
     if (CaptureMute != null)
     {
         CaptureMute.ForceState(Mute);
     }
     if (CaptureSaveType != null)
     {
         CaptureSaveType.ForceState(SaveLoadModule.ApplicableSaveType == "ScriptStem");
     }
 }