-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Autopickup Manager #79564
base: master
Are you sure you want to change the base?
Conversation
and provide the help text three lines to work with
348a199
to
ce0d758
Compare
I'll take this opportunity to squash in a minor name change Co-Authored-By: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
add3809
to
66e3aa1
Compare
Personally, I have no problems at all with just removing all the help text and leaving a There are three other similar "manager" windows (auto notes, safe mode, color), and it'd make things a lot simpler for everyone involved if we do it this way. |
display only "switch" and keybindings help
Summary
SUMMARY: Interface "Don't hardcode help text: Autopickup Manager"
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 autopickup manager 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. Add one extra line for the help text.Clean up the help text and leave just the autopickup toggle, and keybinds.
Describe alternatives you've considered
I initially wrote out a string for each line manually (can be seen in initial commit); however, there wasn't enough space, so I gave the help text a third line. Then I realized I can simply implement this the same as my previous PRs, which is cleaner imo.
2nd implementation kept all the help text, but there's still not enough space in the window when accounting for various circumstances as mentioned by moxian.
The help text area could change height to accomodate any amount of help text, but I'm feeling at that point the window is too bloated.
Testing
Game compiles and loads.
Look at autopickup manager on main menu.
Load world and look at autopickup manager.
Press all the command buttons.
Change the keybinds and see the text update.
Press all the new command buttons.
Additional context
The "switch" command after I changed the keybind to
![Screenshot 2025-02-06 164953](https://private-user-images.githubusercontent.com/2993060/410685893-0c2f178e-5b12-4376-8b88-613ba48e94db.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTYxODUsIm5iZiI6MTczODg5NTg4NSwicGF0aCI6Ii8yOTkzMDYwLzQxMDY4NTg5My0wYzJmMTc4ZS01YjEyLTQzNzYtOGI4OC02MTNiYTQ4ZTk0ZGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDIzODA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzQzYmZkODc1ZWIzMDQzZTYzM2VmNWVkM2M0ZjA1NjA1MTYxMTU5ZGRiNjBiNzZjMmM2NDBmZTBjYjZkZDY5MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.9BqOSubZNbadmphPCfycgKbltO-uuTzH0KsAc9ieyKU)
BACKSPACE
Earlier commit
Screenshot
![Screenshot 2025-02-06 120604](https://private-user-images.githubusercontent.com/2993060/410588047-56cff297-795b-4737-bc02-5ec056abbb6d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTYxODUsIm5iZiI6MTczODg5NTg4NSwicGF0aCI6Ii8yOTkzMDYwLzQxMDU4ODA0Ny01NmNmZjI5Ny03OTViLTQ3MzctYmMwMi01ZWMwNTZhYmJiNmQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDIzODA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGUxMmMzMDU1ZWYwYjZmNWMzNmRlNzYxYzRlMTNiOTA3OTM5MmU3NmY0OTk1OGZmNWI3YWJmMzQwZGNmN2NkOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.jUDOMGag_Yo1WDaq8mA67Zm2InjwUf76PWG9vBwc2ho)
After I changed a bunch of the keybinds. Still fits.
![Screenshot 2025-02-06 120843](https://private-user-images.githubusercontent.com/2993060/410588065-5965ea2f-00e5-4012-a8ab-b84a34e53b86.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTYxODUsIm5iZiI6MTczODg5NTg4NSwicGF0aCI6Ii8yOTkzMDYwLzQxMDU4ODA2NS01OTY1ZWEyZi0wMGU1LTQwMTItYThhYi1iODRhMzRlNTNiODYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDIzODA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTViOTRjY2RlMDJlMTQ1NDNjZmFiOTVjM2Y1YzE1MDFjNTczMDY5YTZhOTJkNWY5ZjA1ZmNkNTQ5MTQ2Y2MwNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.sfEqr3p6aAQ7KIwcesguMD75sHDu0E_9A1z-rTTt6v4)
I realized after looking at these screenshots, the light gray lines on the outside border aren't lined up. Fixed now
![Screenshot 2025-02-06 131443](https://private-user-images.githubusercontent.com/2993060/410605759-f7a61416-e325-491c-a542-5f3623297863.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTYxODUsIm5iZiI6MTczODg5NTg4NSwicGF0aCI6Ii8yOTkzMDYwLzQxMDYwNTc1OS1mN2E2MTQxNi1lMzI1LTQ5MWMtYTU0Mi01ZjM2MjMyOTc4NjMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDIzODA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MWNhNzkyNGJjODRjMzRhNTliNTlmYTk0YjdlZWRkNGUzZjRkYjAyZTcwNzIwNjY2MjZlMmNjMDQ5ZGQ1NmQwOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.pOq9C9TOUGpp8rs1Gu6z9TiOQOlax0u224J3Aa8YN90)