feat(hand): draw card popup — show drawn card centre-screen, click to add

- New Settings.draw_card_popup bool (default true, persisted)
- Toggle in InGameSettings under Gameplay: "Show drawn card popup"
- _rebuild_hand detects brand-new cards and queues them in
  _pending_popup_cards instead of adding to hand immediately
- _show_next_card_popup builds a CanvasLayer overlay (layer 20) with a
  dimmed background + full-size card widget; click card or background to
  dismiss
- _dismiss_card_popup pops the queue, adds the card to hand via
  _apply_display_hand in server order, then shows the next queued popup

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-04-14 23:05:51 -04:00
co-authored by Claude Happy
parent 01ca65e121
commit 7023004046
4 changed files with 158 additions and 5 deletions
@@ -64,6 +64,14 @@ var click_to_focus_camera : bool = false :
_save()
settings_changed.emit()
## When true, newly drawn cards pop up in the centre of the screen and must be
## clicked before they slide into the hand.
var draw_card_popup : bool = true :
set(v):
draw_card_popup = v
_save()
settings_changed.emit()
## Skybox display mode in gameplay scenes.
## "live" — near-black sky with emissive stars; each star = an active game session.
## "cdn" — server-configured panoramic or animated skybox image.
@@ -157,6 +165,7 @@ func _load() -> void:
sfx_muted = bool(cfg.get_value(SECTION, "sfx_muted", false))
camera_follow_unit = bool(cfg.get_value(SECTION_GAMEPLAY, "camera_follow_unit", true))
click_to_focus_camera = bool(cfg.get_value(SECTION_GAMEPLAY, "click_to_focus_camera", false))
draw_card_popup = bool(cfg.get_value(SECTION_GAMEPLAY, "draw_card_popup", true))
touch_camera_mode = str(cfg.get_value(SECTION_CAMERA, "touch_camera_mode", "gesture"))
skybox_mode = str(cfg.get_value(SECTION_VISUAL, "skybox_mode", "live"))
var raw_overrides = cfg.get_value(SECTION_HIGHLIGHTS, "highlight_overrides", {})
@@ -172,6 +181,7 @@ func _save() -> void:
cfg.set_value(SECTION, "sfx_muted", sfx_muted)
cfg.set_value(SECTION_GAMEPLAY, "camera_follow_unit", camera_follow_unit)
cfg.set_value(SECTION_GAMEPLAY, "click_to_focus_camera", click_to_focus_camera)
cfg.set_value(SECTION_GAMEPLAY, "draw_card_popup", draw_card_popup)
cfg.set_value(SECTION_CAMERA, "touch_camera_mode", touch_camera_mode)
cfg.set_value(SECTION_VISUAL, "skybox_mode", skybox_mode)
cfg.set_value(SECTION_HIGHLIGHTS, "highlight_overrides", highlight_overrides)