Esempio n. 1
0
 private void GameForm_ResizeBeginActions(SDL.SDL_WindowEvent e)
 {
     if (Graphics.GraphicsDevice.Platform == Graphics.GraphicsPlatform.Vulkan && OriginalSize.HasValue)
     {
         // resizing not supported, return to original resolution
         Size = cachedSize = OriginalSize.Value;
     }
     else
     {
         isUserResizing = true;
         PauseRendering?.Invoke(this, EventArgs.Empty);
         cachedSize = Size;
     }
 }
Esempio n. 2
0
 private void GameForm_MinimizedActions(SDL.SDL_WindowEvent e)
 {
     previousWindowState = FormWindowState.Minimized;
     PauseRendering?.Invoke(this, EventArgs.Empty);
 }
Esempio n. 3
0
 private void GameForm_ResizeBeginActions(SDL.SDL_WindowEvent e)
 {
     isUserResizing = true;
     cachedSize     = Size;
     PauseRendering?.Invoke(this, EventArgs.Empty);
 }
Esempio n. 4
0
 /// <summary>
 /// Raises the Pause Rendering event.
 /// </summary>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void OnPauseRendering(EventArgs e)
 {
     PauseRendering?.Invoke(this, e);
 }
Esempio n. 5
0
 /// <summary>
 /// Raises the Pause Rendering event.
 /// </summary>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void OnPauseRendering(EventArgs e)
 {
     GameBase.PauseRendering = true;
     PauseRendering?.Invoke(this, e);
 }