WIP: feat(menu): Longshot logo and name left of the tabs, version and a dev build name right of them #1629

Draft
HumanBean wants to merge 1 commit from HumanBean/Longshot:feat/menu-banner-title into main
Owner

Type: feat · Risk: low · Tested on: not run (opened untested, as asked) · Needs: any OS, any GPU

TL;DR

The Insert menu's top bar showed "Longshot" and the version together, in small type at its left. This PR puts the Longshot logo and a larger "Longshot" at the left of the tabs, and moves the version to the right of the tabs. A development run can also be given a name (mise run run-win -BuildName "...", or LONGSHOT_BUILD_NAME), shown under the version so testers know which change they have. It has not been run in the game yet.

Breakdown

  • Who it helps: players see a clearer title; developers and testers can tell which test build they are running.
  • What was wrong: the menu's title and version were one small line, and a dev build had no way to say what it was testing.
  • What changes: logo + "Longshot" (24 pt heading font) at the left, version at the right, an optional build name under the version.
  • What does not change: the version text itself (still version_text), its fit-to-room shrinking, the tabs, the log and the bug report.
  • How it was checked: not run; tests/test_menu_size.py updated to read the new layout (not run here).
  • What is still open: a run in the game at Small, Medium and Large, with and without a build name; screenshots.
  • Risk: low: drawing only; a narrow window shrinks or hides the title and version as before.

Why

Asked for by the maintainer: the menu's title should read as the game's name with its logo, the version should sit apart from it, and dev builds should say what they test.

What changed

The banner of the Insert (F1) menu is now split around the tabs.

  • menu: draw_options in gpu/vk/vk_menu.cpp: the left block draws ui::logo (assets/longshot.png, 1.25× the text height) and "Longshot" in c.f.heading at 24 pt, shrunk to fit the room at Small and Medium (ui::fit_px, 14 pt at the least), at its size or not at all at Large. The right block draws version_text(LONGSHOT_VERSION) right-aligned at c.w - c.safe with the same fitting as before, and, when LONGSHOT_BUILD_NAME is set, that name under it at 13 pt.
  • switches: LONGSHOT_BUILD_NAME row in gpu/vk/switches.def (diag).
  • dev run: scripts/run-vk.ps1 -BuildName "..." sets it (mise run run-win -BuildName "..."); other launches set the variable themselves.
  • tests: tests/test_menu_size.py reads the version without the "Longshot " prefix, at the right, and the logo + name block.
  • docs: docs/development.md's run-win row and the Running a test switch table.

Measurements

Verdict: nothing to measure: a few draw calls in the menu's banner.

Flags and settings

One new switch, for development runs only.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
LONGSHOT_BUILD_NAME a name for what a dev run tests — unset shown under the version in the Insert menu untested unset for players; set by devs via -BuildName

Testing

Tested: nothing yet: opened untested, as the person I work for asked. The checks were not run on this PC.

Not tested: the menu in the game; the C++ compile; mise run test.

Must be tested:

  • any OS, any GPU: open the Insert menu at Small, Medium and Large menu sizes, expecting the logo and "Longshot" left of the tabs, the version right of them, nothing overlapping the Q/E (L/R) tab keys (by hand, or Test Farm).
  • any OS: start with LONGSHOT_BUILD_NAME="my test" and open the menu, expecting "my test" under the version (by hand).

Risks

What could break: the banner's layout in a narrow window (the title or version hidden when they don't fit, as the version was before).

Turning it off: revert the commit.

Compatibility: Nothing changes.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why. (not run yet, as asked)
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named). (not run on this PC)
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • Screenshots of the same spot, captioned like the Measurements columns, for a change that shows on screen. (needs a game run)
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Docs updated.

🤖 Generated with Claude Code

**Type:** feat · **Risk:** low · **Tested on:** not run (opened untested, as asked) · **Needs:** any OS, any GPU ## TL;DR The Insert menu's top bar showed "Longshot" and the version together, in small type at its left. This PR puts the Longshot logo and a larger "Longshot" at the left of the tabs, and moves the version to the right of the tabs. A development run can also be given a name (`mise run run-win -BuildName "..."`, or `LONGSHOT_BUILD_NAME`), shown under the version so testers know which change they have. It has not been run in the game yet. ## Breakdown - **Who it helps:** players see a clearer title; developers and testers can tell which test build they are running. - **What was wrong:** the menu's title and version were one small line, and a dev build had no way to say what it was testing. - **What changes:** logo + "Longshot" (24 pt heading font) at the left, version at the right, an optional build name under the version. - **What does not change:** the version text itself (still `version_text`), its fit-to-room shrinking, the tabs, the log and the bug report. - **How it was checked:** not run; `tests/test_menu_size.py` updated to read the new layout (not run here). - **What is still open:** a run in the game at Small, Medium and Large, with and without a build name; screenshots. - **Risk:** low: drawing only; a narrow window shrinks or hides the title and version as before. ## Why Asked for by the maintainer: the menu's title should read as the game's name with its logo, the version should sit apart from it, and dev builds should say what they test. ## What changed The banner of the Insert (F1) menu is now split around the tabs. - menu: `draw_options` in `gpu/vk/vk_menu.cpp`: the left block draws `ui::logo` (assets/longshot.png, 1.25× the text height) and "Longshot" in `c.f.heading` at 24 pt, shrunk to fit the room at Small and Medium (`ui::fit_px`, 14 pt at the least), at its size or not at all at Large. The right block draws `version_text(LONGSHOT_VERSION)` right-aligned at `c.w - c.safe` with the same fitting as before, and, when `LONGSHOT_BUILD_NAME` is set, that name under it at 13 pt. - switches: `LONGSHOT_BUILD_NAME` row in `gpu/vk/switches.def` (diag). - dev run: `scripts/run-vk.ps1 -BuildName "..."` sets it (`mise run run-win -BuildName "..."`); other launches set the variable themselves. - tests: `tests/test_menu_size.py` reads the version without the "Longshot " prefix, at the right, and the logo + name block. - docs: `docs/development.md`'s `run-win` row and the Running a test switch table. ## Measurements **Verdict:** nothing to measure: a few draw calls in the menu's banner. ### Flags and settings One new switch, for development runs only. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `LONGSHOT_BUILD_NAME` | a name for what a dev run tests | — | unset | shown under the version in the Insert menu | untested | unset for players; set by devs via `-BuildName` | ## Testing **Tested:** nothing yet: opened untested, as the person I work for asked. The checks were not run on this PC. **Not tested:** the menu in the game; the C++ compile; `mise run test`. **Must be tested:** - any OS, any GPU: open the Insert menu at Small, Medium and Large menu sizes, expecting the logo and "Longshot" left of the tabs, the version right of them, nothing overlapping the Q/E (L/R) tab keys (by hand, or Test Farm). - any OS: start with `LONGSHOT_BUILD_NAME="my test"` and open the menu, expecting "my test" under the version (by hand). ## Risks **What could break:** the banner's layout in a narrow window (the title or version hidden when they don't fit, as the version was before). **Turning it off:** revert the commit. **Compatibility:** Nothing changes. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [ ] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. (not run yet, as asked) - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [ ] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). (not run on this PC) - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [ ] Screenshots of the same spot, captioned like the Measurements columns, for a change that shows on screen. (needs a game run) - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(menu): the Longshot logo and name at the banner's left, the version and a dev run's name at its right
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
PR description / Description follows the template (pull_request_target) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 11s
Third-party parts / As their notes say (pull_request) Successful in 12s
Website / Website on Cloudflare (pull_request_target) Has been skipped
19c6121a4c
The Insert menu's banner had 'Longshot <version>' in small type at its left. Now its left is the
Longshot logo and 'Longshot' in the heading font at 24 points, and the version (without the
'Longshot ' prefix) is at its right. Under the version, a development run's LONGSHOT_BUILD_NAME,
which scripts/run-vk.ps1 sets from its new -BuildName, so a screenshot or a tester says which
change it was.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator

Possibly related, for context:

  • PR #170 fix(menu): the version shows as players know it: v3.0.0-rc.1, Nightly 46 · 434712bb — Earlier merged change established the version text in the Insert-menu banner; this redesign repositions it.
Possibly related, for context: - PR #170 fix(menu): the version shows as players know it: v3.0.0-rc.1, Nightly 46 · 434712bb — Earlier merged change established the version text in the Insert-menu banner; this redesign repositions it.
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
PR description / Description follows the template (pull_request_target) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 11s
Third-party parts / As their notes say (pull_request) Successful in 12s
Website / Website on Cloudflare (pull_request_target) Has been skipped
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/menu-banner-title:HumanBean-feat/menu-banner-title'
git switch 'HumanBean-feat/menu-banner-title'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1629
No description provided.