Beispiel #1
0
 void form1_Resize(object sender, EventArgs e)
 {
     //Hantera när maximize knappen trycks
     if (this.WindowState == FormWindowState.Maximized)
     {
         m_GameEngine.OnResize(RenderBox.Width, RenderBox.Height);
     }
     //När man återgår till "normal" state igen så hantera de också
     else if (this.WindowState == FormWindowState.Normal)
     {
         m_GameEngine.OnResize(RenderBox.Width, RenderBox.Height);
     }
 }
Beispiel #2
0
 private void RenderBox_Resize(object sender, EventArgs e)
 {
     if (m_GameEngine != null)
     {
         m_GameEngine.OnResize(RenderBox.Size.Width, RenderBox.Size.Height);
     }
 }