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

Implement scrolling for recipe info in crafting gui #47585

Merged
merged 2 commits into from
Feb 20, 2021

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Feb 18, 2021

Summary

Interface "Implement scrolling for recipe info in crafting gui"

Purpose of change

Based on #47584. Switch to scrolling instead of "mode cycling" for recipe info in the crafting gui.

Describe the solution

  1. Moved struct availability to the anonymous namespace.
  2. Moved recipe info printing to a function that generates folded recipe info text. The returned text is cached and used in the crafting gui.
  3. Made recipe info scrolled instead of cycled between "modes".
  4. Adjusted display width of recipe list, recipe info, and item info to have consistent padding and scroll bar display.

The default keys to scroll recipe info are selected to be "[" and "]", because up/down, page up/down, "<"/">", and tab/back-tab are already taken.

Describe alternatives you've considered

Some different default keybindings such as "-"/"+"?

Testing

Opened the crafting gui and scrolled recipe info successfully.

@Qrox Qrox force-pushed the crafting-gui-recp-info branch 3 times, most recently from 197cafe to 258f37d Compare February 18, 2021 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants