Dungeon GuideHUD.handleClick returns void so HUDScene never consumes prev/next clicks #1088

Closed
opened 2026-08-13 13:55:14 +00:00 by spikerj · 1 comment
Owner

Summary

GuideHUD.handleClick is typed and implemented as void. HUDScene.handleClick only stops walking panels when the handler is truthy:

if ((entry.panel as any).handleClick?.(hudX, hudY, screenX, screenY)) {
  return true;
}

undefined is falsy, so even a successful Previous/Next click falls through to lower HUD panels (and does not consume the event). ShopHUD returns boolean and is consumed correctly; GuideHUD should do the same.

Disabled Previous also does not consume the click (canPrev is false → neither branch returns a consumed flag).

setStep has no equality guard, so updateModalHUDs rebuilds the overlay every frame while the guide is visible (C-7).

Files

  • projects/spikersoft/src/app/_components/_games/dungeon-crawler/hud/guide-hud.ts (handleClick, setStep)
  • libraries/game/gl-hud/src/lib/hud-scene.ts (handleClick)
## Summary `GuideHUD.handleClick` is typed and implemented as `void`. `HUDScene.handleClick` only stops walking panels when the handler is truthy: ```ts if ((entry.panel as any).handleClick?.(hudX, hudY, screenX, screenY)) { return true; } ``` `undefined` is falsy, so even a successful Previous/Next click falls through to lower HUD panels (and does not consume the event). ShopHUD returns `boolean` and is consumed correctly; GuideHUD should do the same. Disabled Previous also does not consume the click (`canPrev` is false → neither branch returns a consumed flag). `setStep` has no equality guard, so `updateModalHUDs` rebuilds the overlay every frame while the guide is visible (C-7). ## Files - `projects/spikersoft/src/app/_components/_games/dungeon-crawler/hud/guide-hud.ts` (`handleClick`, `setStep`) - `libraries/game/gl-hud/src/lib/hud-scene.ts` (`handleClick`)
Author
Owner

Resolved in spikersoft-angular PR #819 (merged to master). GuideHUD.handleClick returns boolean so prev/next clicks are consumed. Closing.

Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). GuideHUD.handleClick returns boolean so prev/next clicks are consumed. Closing.
Sign in to join this conversation.