Commit Graph
14 Commits
Author SHA1 Message Date
wushenghua bb07610547 UI rebuild slice 1: scene-focused Skyport/World/Settlement presentation
Replace control-list composition with scene + entity focus on three pages:
Skyport training seats use real 96px hero frames; World node tokens become
80px landmarks with compact chapter underlines; Settlement becomes a single
spoils plaque with one emphasized exit. Restore authored scene colour on
Skyport/World and keep settlement darkening. Rebind authority callbacks to
rebuilt world tokens so real ScreenTouch keeps routing.

Presentation only: no CH numeric, battle, economy, save, route, locale-key
or touch-target key changes. No new art or assets.
2026-11-29 15:43:00 +08:00
wushenghua 87ea67c91e feat(ui): visual-language candidate - quiet rows, framed surfaces, skill-bar material
Reduce the stacked-rectangle look without touching behaviour. Repeated roster,
route and side-ledger rows become translucent quiet bands with a single accent
rule; the few real surfaces reuse the existing pixel nine-slice as material;
the battle skill bar reuses the stage nine-slice. Touch areas, routes, text,
economy, save and CH data are unchanged. No new art dependency.

Evidence: 10 real before/after shots, 48-shot UI slice PASS, touch/scroll/
modal/battle-exit regressions PASS, strict Godot import clean.
2026-11-29 10:16:02 +08:00
wushenghua 4f4b7d918a fix(ui): polish skill bar, victory modal, 360px underlines and raw keys
- battle manual actions now share one skill bar backing with accent rules and
  dividers; button rects, mouse_filter and callbacks unchanged
- victory/dialog panel is opaque with a darker dim so battle chrome no longer
  shows through; action labels and 44px hit areas unchanged
- idle underline and tab baselines brightened/thickened for 360px readability
- UiText.node_name() falls back to localized chapter theme + node number, so
  full-game nodes no longer render [content.node.*] raw keys; locale keys intact

Evidence: 9ba98ef-polish before/after runtime captures, strict import and
focused touch/UI regressions all PASS. No merge, push or release.
2026-11-29 08:23:08 +08:00
wushenghua 0cf7c6117d feat(ui): give primary CTA nine-slice material and readable secondary states 2026-11-29 00:15:40 +08:00
wushenghua 2f71468719 feat(ui): visual-language candidate — quiet secondary actions, tab chrome, skill slots 2026-11-29 00:15:37 +08:00
wushenghua 796ca6840d U1 UI slice: Skyport/World/Settlement shells with fixed CTA dock
Additive UI vertical slice on baseline 28e8247. Owned scope only: page
shells, PrimaryCTADock, UiTheme helpers, U1 probe/capture runner and
evidence. No battle, numeric, save or locale files touched.

48 real-render shots: 360/390/430 x zh/en x normal/reduced, plus
scrolled/locked/defeat states. Real InputEventScreenTouch fires the CTA
and changes world node selection; >=48px tap targets, fixed CTA position
across scroll, no missing text keys, no SCRIPT ERROR.
2026-11-28 01:44:08 +08:00
wushenghua 28e824763b improve: battle action clarity, visible feedback, explicit exit
Owner feedback: too few visible animations, button rows feel list-like, battle
actions unclear, and tapping a bottom tab silently left the fight.

- Battle manual actions now have icons and three distinct weights: sword =
  repeated hit (brass primary), bolt = storm (quiet), fireball = ultimate
  (purple special). A "tight" icon-button mode keeps all three plus dynamic
  cooldown/energy text inside the 358px row (verified by geometry probe).
- Added an always-visible flagged "退出战斗" button in the battle header; the
  stage hint now reads "tap enemy to retarget / buttons below to act".
- Leaving battle via any tab shows a shell-level toast "已离开战斗 · 前往 X"
  so the player knows the fight ended and where they landed.
- Game feel: idle sprites have a 6fps floor (authored 4-frame/3fps idle read as
  frozen), damage numbers get a short overshoot-and-settle pop, and manual-hit
  shake trauma doubled (still small tier). All respect reduced motion/low power.
- New regression assertions: labeled exit button + exit toast; 108 gates pass.

Normal-render capture inspected at 390x844 zh_CN. agent_visual_reviewed only;
owner must confirm on device whether the motion level now feels right.
2026-11-20 14:33:44 +08:00
wushenghua 8918a9cc01 redesign: roll flat dark UI + tab states across all remaining pages
Owner approved the hierarchy/icons direction and asked for every page to be
converted. The first commit only changed skyport/growth; other pages still
used the old gold nine-slice frames.

- UiTheme.build_theme: global PanelContainer/Panel and Button normal/pressed/
  hover/disabled are now flat dark sharp-edged styles (brass reserved for the
  primary action + selected tab). make_panel() switched from frame_style() to
  the flat dark box (its own override was bypassing the global theme).
- UiTheme.tab_style(selected): flat brass/dark tab state. Replaced every
  explicit FRAME_TAB/FRAME_TAB_SELECTED/FRAME_PANEL override across world
  regions/chapters, side tabs, loadout hero tabs, map node actions and battle
  HUD nav. Battle hero cards use a flat card box instead of FRAME_TILE.
- ui_scroll_layout_test now asserts global Button and panel styles are
  StyleBoxFlat so the gold frames cannot silently return.

Inspected normal-render captures: map, world, side, settings, skyport, growth
and battle at 390x844 zh_CN all read consistently; 108 gates pass.
agent_visual_reviewed only -- owner still needs to confirm on device.
2026-11-20 13:33:17 +08:00
wushenghua c9b3817578 redesign: menu UI hierarchy + icons, remove gold-box-everywhere look
Owner rejected the parchment gold-frame UI as ugly after seeing it on device:
every button was an identical thick gold box (primary CTA indistinguishable
from tertiary links), all text, no icons, background buried.

Applied the low-risk direction (reuse existing 32px pixel icons, keep palette):
- UiTheme.make_menu_button: three tiers (primary filled brass banner / secondary
  dark icon+label row / quiet text link), sharp flat pixel-grid-safe styles,
  consistent icon slot, PASS for scroll drags. Overrides disabled stylebox too
  (the theme's gold frame was reappearing on every unaffordable button).
- UiTheme.make_status_strip: quiet translucent header instead of a gold panel.
- Skyport menu: sword=expedition (primary), bolt=endless, hammer=rebuild,
  leaf=growth, flag=world, gear=side, bow=loadout, prestige=quiet link.
- Growth page star/talent/back buttons use the quiet secondary style.
- Removed _refresh_skyport's per-refresh gold FRAME_BUTTON stylebox override;
  affordability is now text color + dimming only.

Verified by normal-render capture at 390x844 zh_CN (p3a_skyport, p3a_growth),
visually inspected before/after; 108 gates pass. This is agent_visual_reviewed,
not human_reviewed -- owner must confirm on device.
2026-11-20 13:18:44 +08:00
wushenghua 4d8d8582b8 fix: mobile UI/UX - list scroll, safe area, text overflow, battle top-right
Owner device feedback after seeing parchment skin:
- Lists could not scroll when the finger started on a button/frame; only blank
  areas scrolled. Root cause: buttons/panels defaulted to MOUSE_FILTER_STOP and
  swallowed drags. make_button/make_panel/glass_panel now use MOUSE_FILTER_PASS
  (still tappable, but drags bubble to the parent ScrollContainer).
- Header pushed ~quarter screen down: safe area subtracted window_get_position()
  (Godot 4 get_display_safe_area() is already in window coords). Now uses the
  rect directly and clamps insets to sane bounds (top<=96, bottom<=64).
- Growth page talent buttons overflowed: 4-in-a-row HBox squeezed labels. Now a
  2-column GridContainer with wider buttons; star button widened to 150px;
  buttons get an 8px content margin so text no longer touches the frame.
- Battle top-right had no text: the timer Label was created empty and never
  assigned. Added an always-on info label (enemy count / boss name) and populate
  the countdown text when a timer is visible.
- New ui_scroll_layout_test gate asserts button/panel PASS filters, 2-col grid,
  and non-empty battle top-right info. 108 gates pass.

Owner must re-verify on device; these are automated_verified, not human_reviewed.
2026-11-20 13:00:03 +08:00
wushenghua 35d801b69b feat: parchment UI skin (owner chose #2) + in-game skin switcher
Owner reviewed a 4-skin comparison sheet and chose the parchment+brass skin
(matches the design doc's "parchment cards + brass frames + wind engravings").

- Generated 4 AI skin candidates; converted the chosen one into a clean
  48x48 nine-slice set (7 frames: panel/button/pressed/tab/tab_selected/tile/
  stage) with flat center so nine-slice stretching never smears.
- UiTheme.build_theme(skin) + skin_path(): frames resolve to assets/skins/<skin>/
  with default fallback; make_panel/frame_style follow the active skin.
- profile.ui_skin field (validated); parchment is the new default so the
  player sees it immediately; settings page "skin" row cycles default<->parchment
  and reloads the scene so baked styleboxes rebuild.
- skin_test PASS (profile field, skin_path remap, all 7 frames exist,
  build_theme works). 107 gates pass; rebuilt + installed on iPhonewsh.

Art generation cost: 4 gpt-image-2.6 1K calls (1 candidate chosen). All source
AI images + conversion tools + comparison sheet committed for traceability.
prototype/ untracked.
2026-11-20 08:48:41 +08:00
wushenghua 5b15269be1 fix: ship CJK font so text renders on iOS (device screenshot showed blank labels)
Owner photographed the physical iPhone: icons and pixel background rendered,
but ALL text was blank. Root cause: ui_theme used SystemFont with macOS font
names (PingFang SC etc.); iOS has no matching family, so every label was empty.

- Bundled NotoSansSC-Bold.fontdata (7.6MB, 30890 glyphs, already verified on
  iPhone in the autoknights project) at assets/fonts/.
- build_font() now preloads that real FontFile instead of SystemFont.
- Rebuilt (ios_device_build.sh PASS), re-signed, reinstalled and relaunched on
  iPhonewsh (iOS 26.7.2); 105 gates still pass (no local text-layout regression).

This is a real device-found fix. Owner must confirm text now renders on screen;
command success does not prove visual correctness. prototype/ untracked.
2026-11-19 23:51:04 +08:00
wushenghua b430ded18d art: immersive battle layout, reward celebration, idle breathing (1-2-3)
Implemented the three improvements the owner approved after reviewing the
screenshots. Kept the visual evidence levels honest: layout/reward/breathing
behaviour is automated_verified, the style judgment is agent_visual_reviewed,
and whether it is actually appealing/comfortable stays a human gate.

1 - immersive battle layout (battle_hud.gd, ui_theme.gd): the backdrop now
   covers the full screen instead of living only inside the stage; six HUD
   regions use a translucent UiTheme.glass_panel (dark + top border) instead
   of gold frames, and the stage drops its second background and frame to
   become a transparent interaction layer. Region coordinate contract is
   UNCHANGED (REFERENCE_RECTS intact, capture matrix green at 390/360/430,
   zh/en). Fixed a real parse error found during review: Side.TOP -> SIDE_TOP.

2 - reward celebration (game_root.gd): victory now runs a dedicated row with a
   coin icon, a number rolling from 0 to gold (0.6s ease-out) and an icon pop;
   reduced motion shows the final value immediately. Body copy changed to the
   new shell.victory.celebrate key so it does not duplicate the number. The
   capture runner drives BattleScene (old path), so reward_celebration_test.gd
   drives GameRoot's external-progress path - observed +2 -> +30 roll and a
   direct +30 under reduced motion.

3 - idle breathing (unit_view.gd): the 13 single-frame characters no longer
   look static. An eased looping 2.5% sprite squash starts on idle, stops on
   non-idle, resumes on return, and is disabled/reset under reduced motion with
   _exit_tree cleanup. Hero 0.82 node scale/modulate composes with the sprite
   tween without conflict.

Added two focused gates (run_breathing_test.sh, run_reward_celebration_test.sh)
registered in run_p2_checks.sh. breathing_test proves the tween actually runs
in the real configure-before-tree path (scale 1.0004 -> 1.0086), stops on
attack, resumes on idle, and respects reduced motion. Full gate P2_CHECKS_PASS
with clean log audit. Docs 44/46 record the outcomes, evidence levels and the
still-open human/device gates. prototype/ remains untracked and untouched.
2026-11-17 23:32:38 +08:00
wushenghua e7b55e1c17 feat: align runtime with paper numbers and build the battle HUD carrier
Numbers. The paper runner (tools/mvp_validation_sim.py) and the Godot
runtime adapter were two independent rewrites of the same rules and had
drifted: seed derivation, damage order, the weakness rule and the shield
rebuild semantics all differed, so the runtime never actually reproduced
the paper numbers and P2-BAT-01 could never pass.

- add data/mvp_battle_rules.json as the single source of balance data and
  of the per-run seed derivation, read by both engines
- derive the efficiency factor from SHA-256 (48-bit prefix) so Python and
  GDScript land on the same float64
- port the paper semantics into battle_sim.gd and expose the simulation as
  a stepwise state machine so a live scene can drive it at 1x/2x/3x
- add tools/mvp_parity_gate.py: diffs 300 results field by field, event
  log by event log, and exits non-zero on any difference
- freeze data/mvp_validation_seed_reference.json so unapproved numeric
  drift fails the gate
- note that GDScript's roundf() is half-away-from-zero while Python's
  round() is banker's rounding; the runtime uses String.num instead

UI. The sample had no real UI carrier, no localization and no touch path,
so the NinePatch, dynamic text, safe area and input cases had nothing to
be proven against.

- add the battle HUD, laid out from the contract table rather than container
  stretch ratios, reproducing the 390x844 rectangles exactly and adapting
  360x800 / 430x932 with the stage kept as priority space
- add runtime text tables for zh_CN and en_US and a key validator that
  proves both locales carry the same keys and every content id has a string
- add NinePatch frames with a 6px border band and 6px cut corners
- add the live battle scene, the capture runner and the 1x/2x/3x
  equivalence test

tools/run_p2_checks.sh runs the nine gates in one command; all pass.
2026-11-16 22:22:55 +08:00