Skip to content

Conversation

@AristurtleDev
Copy link
Contributor

@AristurtleDev AristurtleDev commented Jul 25, 2025

Description

This pull request addresses community feedback regarding missing ExitOnEscape functionality after following the input management tutorial, where removing the old input handling code inadvertently disabled the escape key exit behavior.

Resolves: Issue #142

Changes Made

Updated the input management tutorial to maintain consistent ExitOnEscape behavior by:

  • Added ExitOnEscape initialization in Core constructor: Set ExitOnEscape = true; in the Core.cs constructor to mimic the default MonoGame template behavior
  • Removed outdated input handling code: Eliminated the legacy GamePad.GetState() and Keyboard.GetState().IsKeyDown(Keys.Escape) checks from all Game1.cs snippet files throughout the tutorial

@SimonDarksideJ SimonDarksideJ merged commit 14acbb1 into MonoGame:main Jul 28, 2025
2 checks passed
Gaetz pushed a commit to Gaetz/docs.monogame.github.io that referenced this pull request Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tutorial error: ExitOnEscape logic not triggered as expected in “Building 2D Games”

2 participants