Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't hardcode help text: Overmap filter popup #79325

Merged
merged 2 commits into from
Jan 26, 2025

Conversation

Kilvoctu
Copy link
Contributor

Summary

SUMMARY: Interface "Don't hardcode help text: Overmap filter popup"

Purpose of change

Help text should not be hardcoded as, if end user changes their keybinds, it will cause discrepancies in the UI.
This PR targets the filter pop up window for the Overmap UI and partially addresses #78986

Describe the solution

Pull the currently set keybind for each command, then replace the help text string with a function that enumerates the keybinds.

Describe alternatives you've considered

A lot of different ways of handling displaying help text. I used the Crafting window implementation as a reference again because it looks clean, even though it has some features that won't be relevant for this popup.

Testing

Game compiles and loads.
Open overmap, open filter popup.
Confirm all filter commands work.
Query something, confirm all search result commands work (previous/next result, confirm, quit, etc.)
Change keybind for TEXT.CLEAR and confirm it updates.

Additional context

This popup is always the same width, regardless of terminal size.

Before
Screenshot 2025-01-24 120622
After (looks a little better too, right 🙂)
Screenshot 2025-01-24 120437
After changed the keybind for clear
Screenshot 2025-01-24 121019

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` labels Jan 24, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 24, 2025
@Maleclypse Maleclypse merged commit 172d64c into CleverRaven:master Jan 26, 2025
24 of 27 checks passed
@Kilvoctu Kilvoctu deleted the overmap_ui_filter_popup branch January 26, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants