![Icon](https://raw.githubusercontent.com/isXander/AdaptiveTooltips/1.19.3/src/main/resources/icon.png)
# AdaptiveTooltips
[![Mod Loader](https://img.shields.io/badge/Mod%20Loader-Fabric-lightyellow?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTEyLTE2VDE2OjU0OjE3LTA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0wNy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QjF7cNTWED8B1cgwW20yfJgAvrssAsZ1cB3g/xckAxr6FmCDU5N6f488BrpCQ4rQBJkiMYh4ACmLzwOQF0CExinkCsvw7vgGikl+OotaKRwAAAABJRU5ErkJggg==)](https://fabricmc.net)
![Enviroment](https://img.shields.io/badge/Enviroment-Client-purple)
[![Discord](https://img.shields.io/discord/780023008668287017?color=blue&logo=discord&label=Discord)](https://short.isxander.dev/discord)
[![Modrinth](https://img.shields.io/modrinth/dt/adaptive-tooltips?color=00AF5C&label=downloads&logo=modrinth)](https://modrinth.com/mod/adaptive-tooltips)
[![CurseForge](https://cf.way2muchnoise.eu/full_704346_downloads.svg)](https://curseforge.com/minecraft/mc-mods/adaptive-tooltips)
[![Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/isxander)
[![](https://www.bisecthosting.com/partners/custom-banners/08bbd3ff-5c0d-4480-8738-de0f070a04dd.png)](https://bisecthosting.com/xander)
Highly configurable tooltip rendering, so you can *always* read them!
Why was this mod created?
Vanilla tooltips are not very smart: this mod aims to fix that. In vanilla, there are a lot of
situations (especially when modded) where you just cannot read a tooltip due to it being just too long
to fit on the screen. There are many solutions!
AdaptiveTooltips aims to dream up and implement these solutions into Minecraft for a vanilla-like
tooltip experience without the frustrations.
Features
There are many methods in which AdaptiveTooltips can save your tooltips from the clutches of the bezels;
below are a list of all the (toggleable) options to fix this.
Text Wrapping
There is one very obvious fix to tooltips going off-screen horizontally: text wrapping! If a line
is too long to fit on your screen, AdaptiveTooltips intelligently splits it into however many
necessary, using words as cut-offs to not interrupt your reading.
There are multiple methods of wrapping:
Screen Width
- The mod wraps with a max line width of the width of your screen (minus 15). Intended to be paired
with Bedrock Centering option.
Remaining Width
- Allows tooltip lines to fill a maximum of what's left until the tooltip reaches the end of the
screen, picking either the left or the right depending on which would require less wrapping.
Half Screen Width
- Only allows tooltips to have a width of half of the screen.
Smart
- Wraps lines that are considerably longer than the others, with a hard limit of 3/4 of the screen width.
screenshot is using Remaining Width
wrapping method
Prioritize Tooltip Top
I'm actually surprised even Mojang didn't think of adding this one, by default, tooltips that are taller than
your screen limit their bottom to the edge of the screen, not the top. This results in you being able to read
the (often less important) bottom of the tooltip instead of the top. This fix addresses that.
Bedrock Centering
This feature grants parity between Java and Bedrock Edition. By default, Bedrock automatically centers
the tooltip if it is too long to fit on either the left or the right, this adds that. For the best
experience, it is best to pair this with Screen Width Text Wrapping.
Align To Corner
When all else fails, this feature is a good fallback. If after all the above features fail to keep the
tooltip on the screen, AdaptiveTooltips just places the tooltip in any of the 4 corners of the window,
determining that based on the least obstruction of the mouse cursor.
Tooltip Scrolling
Yes, that's right, scrolling. It's been tried on Fabric many a times with little success with annoying
edge-cases and bugs that make using scrolling annoying, but I've fixed all grievances! You can scroll
vertically and horizontally with smooth animations and fine-tuning from the scroll direction to the
sensitivity of the scrolling. AdaptiveTooltips is also smart and knows the difference between two different
tooltips and discards scrolling data when necessary.
Transparency Modification
You may be bothered that tooltips may obstruct the view of the next few items in your inventory, this
fix aims to mitigate that by allowing you to adjust the transparency of the tooltip, allowing you to
decide what's best for in terms of visibility and transparency.
YACL-style GUI Tooltips
Capture the style of YetAnotherConfigLib's tooltip positioning
by placing tooltips above or below a hovered button.
License
This mod is under the GNU Lesser General Public License, v3.0.