Esempio n. 1
0
 private void GameResize(float scaling)
 {
     _currentScale = scaling;
     _graphObject.Resize(Settings.WindowWidth, Settings.WindowHeight, scaling, PBGame);
     ClientSize = new Size(Convert.ToInt32(Settings.WindowWidth * scaling), Convert.ToInt32(Settings.WindowHeight * scaling));
     if (_gameMenu != null)
     {
         _gameMenu.Scaling = scaling;
     }
     if (_game != null)
     {
         _game.Scaling = scaling;
     }
 }
Esempio n. 2
0
 private void GameResize(float scaling)
 {
     _currentScale = scaling;
     _graphObject.Resize(Settings.WindowWidth, Settings.WindowHeight, scaling);
     _graphObject.Clip = new Rectangle(0, 0, Convert.ToInt32(Settings.WindowWidth * scaling),
                                       Convert.ToInt32(Settings.WindowHeight * scaling));
     this.ClientSize = new Size(Convert.ToInt32(Settings.WindowWidth * scaling),
                                Convert.ToInt32(Settings.WindowHeight * scaling));
     GL.Viewport(this.ClientSize);
     if (_gameMenu != null)
     {
         _gameMenu.Scaling = scaling;
     }
     if (_game != null)
     {
         _game.Scaling = scaling;
     }
 }