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

Add Tooltip system based on Tooltippery #60

Merged
merged 10 commits into from
Aug 22, 2024
Merged

Add Tooltip system based on Tooltippery #60

merged 10 commits into from
Aug 22, 2024

Conversation

Banane9
Copy link
Member

@Banane9 Banane9 commented Aug 14, 2024

Based on Psychpsyo/Tooltippery. The only factor for backwards compatibility with old tooltippery content is supporting tooltips on buttons with a Comment component with the Text TooltipperyLabel:.

@Banane9 Banane9 added the enhancement New feature or request label Aug 14, 2024
@Banane9 Banane9 self-assigned this Aug 14, 2024
@Banane9 Banane9 marked this pull request as ready for review August 21, 2024 22:10
@Banane9 Banane9 requested a review from Nytra August 21, 2024 22:10
@Banane9
Copy link
Member Author

Banane9 commented Aug 21, 2024

Basic version of tooltips, huzzah.

The locale strings should be defined in a separate package, so that they can be updated without a whole release of the gamepack.
It may also need extra code for tooltips where more particular details are required to be added, or to properly determine what to show - e.g. Setting session roles only has their index as an argument.

Mods can also add tooltips to their buttons using the LocalActionButtonExtensions.WithTooltip extension methods.

@Nytra
Copy link
Contributor

Nytra commented Aug 21, 2024

Maybe the tooltips should only show up if you have the dev tool equipped?

Copy link
Contributor

@Nytra Nytra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and I tested it

@Banane9
Copy link
Member Author

Banane9 commented Aug 22, 2024

Maybe the tooltips should only show up if you have the dev tool equipped?

Well, they can appear on any kind of button, I just happened to pick some inspector ones to show it.

Also whoops on the other local slot ones lol

@Banane9 Banane9 merged commit 8c44c39 into master Aug 22, 2024
2 checks passed
@Banane9 Banane9 deleted the feature/tooltips branch August 22, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants