Add settings menu to control audio and return to main menu

This commit is contained in:
Ben Calegari 2026-07-28 22:01:28 -07:00
parent c88d3fc625
commit 0b7bc936ef
13 changed files with 697 additions and 22 deletions

View file

@ -73,10 +73,11 @@ namespace TD.Gameplay
var keyboard = Keyboard.current;
// Right-click or Escape exits paint mode. (Escape is ignored while a HUD text
// field has focus so it means "cancel typing" there, matching other systems.)
// field has focus or the gear menu is open, so it means "cancel typing" /
// "back out of the menu" there, matching other systems.)
bool escape = keyboard != null
&& keyboard.escapeKey.wasPressedThisFrame
&& !HUDController.IsTextInputActive;
&& !HUDController.IsUiCapturingInput;
if (mouse.rightButton.wasPressedThisFrame || escape)
{
CancelPaint();