You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tooltips exist in a few different UI panels in the game, but the code for the creation of tooltips is currently custom to each UI panel that has them. Tooltip code currently exists in ShopPanel, ItemInfoDisplay, PreferencesPanel, MissionPanel, and LoadPanel, and there are slight differences between each of them.
Having a Tooltip class would make adding tooltips to new locations simpler.
Related Issue Links
#9825 Noticed this while adding a new tooltip to the shop.
Desired Solution
Create a Tooltip class that controls the drawing of a tooltip. Tooltips would have a max width, but automatically resize to account for shorter text. They could follow the mouse, or appear at a set location like how the ship check warnings in the outfitter/shipyard work. We could also control whether they display to the left or the right of the drawing location by default, with shared code handling cases where a tooltip may run off the edge of the screen and need to move its location.
The Tooltip class could also be in charge of the hover zone where tooltips should appear, and the hover timer for when they should appear, instead of each class that implement tooltips needing to keep track of where and when to display them.
Alternative Approaches
N/A
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Problem Description
Tooltips exist in a few different UI panels in the game, but the code for the creation of tooltips is currently custom to each UI panel that has them. Tooltip code currently exists in ShopPanel, ItemInfoDisplay, PreferencesPanel, MissionPanel, and LoadPanel, and there are slight differences between each of them.
Having a Tooltip class would make adding tooltips to new locations simpler.
Related Issue Links
#9825 Noticed this while adding a new tooltip to the shop.
Desired Solution
Create a Tooltip class that controls the drawing of a tooltip. Tooltips would have a max width, but automatically resize to account for shorter text. They could follow the mouse, or appear at a set location like how the ship check warnings in the outfitter/shipyard work. We could also control whether they display to the left or the right of the drawing location by default, with shared code handling cases where a tooltip may run off the edge of the screen and need to move its location.
The Tooltip class could also be in charge of the hover zone where tooltips should appear, and the hover timer for when they should appear, instead of each class that implement tooltips needing to keep track of where and when to display them.
Alternative Approaches
N/A
Additional Context
No response
The text was updated successfully, but these errors were encountered: