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

allow scrolling of spell info again #76265

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

ThePotatomancer
Copy link
Contributor

Summary

Interface "Fix scrolling spell info in spell casting menu"

Purpose of change

spell info scrolling was broken when the spell menu migrated to uilist.
Before this PR the only way to scroll the spell info of spells with long descriptions (like the first circle spells)
was by focusing and scrolling the spell info window with the mouse (which is not obvious as a possibility at all).

Describe the solution

I extracted the already existing scrolling logic in item menu to our helper class cataimgui, and used it both in item menu
and in the casting menu. It uses the existing previous keybinds for scrolling that were defined but non-functioning.

Describe alternatives you've considered

I tried to figure out how to make the scrollbar visible for spell info, but got stumped and decided it's better to leave it for another PR.

Testing

  1. create a world with the magicalysm mod
  2. once in game, open the debug menu, the player subsection, and the modify spells section
  3. filter for 'first circle' to find one of the mana upgrade ritual spells, and edit to learn it at any level
  4. open the spellcasting menu, and have the selection hover over the spell
  5. use the default keybinds (< and >) to scroll the spell info to show the spell components

I also tested rebinding the keys in the ? menu, and tested that the item menu scrolling still functions as before.

Additional context

spell info scrolling was broken when the spell
menu migrated to uilist
@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [C++] Changes (can be) made in C++. Previously named `Code` labels Sep 7, 2024
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Sep 7, 2024
@Maleclypse Maleclypse merged commit 057c145 into CleverRaven:master Sep 8, 2024
28 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants