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 RenderTooltipEvent #81

Merged
merged 8 commits into from
Dec 20, 2024
Merged

Add RenderTooltipEvent #81

merged 8 commits into from
Dec 20, 2024

Conversation

glowredman
Copy link
Member

@glowredman glowredman commented Oct 11, 2024

Adds an event to modify the way item tooltips are rendered.

I chose to redirect the call to GuiScreen.drawHoveringText() (which does the actual rendering) in GuiScreen.renderToolTip() instead of modifying GuiScreen.drawHoveringText() itself because that method is not aware of the ItemStack of which the tooltip is being rendered and the method may also used for other, unrelated texts.

Examples

Modifying the background and border colors (including translucency)

grafik

Modifying the coordinates

23-26-47.mp4

Changing the font

grafik

... and combinations of all of the above.

@glowredman glowredman marked this pull request as ready for review December 17, 2024 21:05
@glowredman glowredman requested review from a team and removed request for a team December 17, 2024 21:05
Copy link

@YannickMG YannickMG left a comment

Choose a reason for hiding this comment

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

Works great and code looks good. Had some comments and questions but I don't think they're blockers.

image

@glowredman glowredman requested a review from YannickMG December 20, 2024 13:15
Copy link

@YannickMG YannickMG left a comment

Choose a reason for hiding this comment

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

@glowredman
Copy link
Member Author

Thanks for the review!

@glowredman glowredman merged commit bdf4234 into master Dec 20, 2024
1 check passed
@glowredman glowredman deleted the rendertooltipevent branch December 20, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants