|
|
@ -11,7 +11,7 @@ namespace Jumpy { |
|
|
|
SpriteFont font; |
|
|
|
KeyboardInput keyboardInput = new KeyboardInput(); |
|
|
|
bool fullScreen = false; |
|
|
|
IWindow window; |
|
|
|
IWindow display; |
|
|
|
|
|
|
|
public JumpyGame() { |
|
|
|
graphics = new GraphicsDeviceManager(this); |
|
|
@ -21,9 +21,9 @@ namespace Jumpy { |
|
|
|
|
|
|
|
// Performs initialization that's needed before starting to run.
|
|
|
|
protected override void Initialize() { |
|
|
|
window = (IWindow) Services.GetService(typeof(IWindow)); |
|
|
|
window.SetFullScreen(fullScreen, this, graphics); |
|
|
|
|
|
|
|
display = (IWindow) Services.GetService(typeof(IWindow)); |
|
|
|
display.Initialize(Window, graphics); |
|
|
|
display.SetFullScreen(fullScreen); |
|
|
|
base.Initialize(); |
|
|
|
} |
|
|
|
|
|
|
@ -45,7 +45,7 @@ namespace Jumpy { |
|
|
|
|
|
|
|
if (keysDown.Contains(Keys.F12)) { |
|
|
|
fullScreen = !fullScreen; |
|
|
|
window.SetFullScreen(fullScreen, this, graphics); |
|
|
|
display.SetFullScreen(fullScreen); |
|
|
|
} |
|
|
|
|
|
|
|
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || |
|
|
|