Skip to content

Add shortcut hints to construction tooltips#3764

Open
RED-ROSE515 wants to merge 1 commit into
OpenLoco:masterfrom
RED-ROSE515:master
Open

Add shortcut hints to construction tooltips#3764
RED-ROSE515 wants to merge 1 commit into
OpenLoco:masterfrom
RED-ROSE515:master

Conversation

@RED-ROSE515

Copy link
Copy Markdown

Closes #3757

Summary

  • Adds a shared shortcut formatter so shortcut display text can be reused outside the keyboard shortcuts window.
  • Shows configured hotkeys in construction tooltips for build, remove, rotate, and select-position actions.
  • Shows the configured rotate hotkey on station construction rotate tooltips.
  • Displays unbound when a tooltip action has no configured shortcut.

Testing

  • cmake --build build\windows-vcpkg-check --config Release --target App
  • cmake --build build\windows-vcpkg-check --config Release
  • ctest --test-dir build\windows-vcpkg-check -C Release -E "Assertions" --output-on-failure

@LeftofZen LeftofZen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • need to rebase with master
  • be consistent with terminology - either use "keyboard shortcut" or "hotkey" but not both
  • add yourself to contributors.md in a new "AI-generated" section

@LeftofZen LeftofZen added the ai label Jul 23, 2026
Comment thread data/language/en-GB.yml
2442: Preferred Company Name
2443: "Enter the preferred company name:"
2444: Can't change company name...
2445: unbound

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strings should be in double quotes

@LeeSpork

Copy link
Copy Markdown
Contributor

Although I wrote it without in the issue, it might make sense to put "unbound" in parens.
Might also want to consider using "keyboard shortcut" rather than "hotkey", to be more consistent with the language used by the existing game.

Another thing I have thought about is writing a hint to add to the unbound tooltip to go to the options window to set it, although I'm not sure if that might make the tooltip too long?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add more tooltips showing keyboard shortcuts

3 participants