Fabulously Optimized

Fabulously Optimized

2M Downloads

AdaptiveTooltips

isXander opened this issue ยท 25 comments

commented

CurseForge link

https://curseforge.com/minecraft/mc-mods/adaptive-tooltips

CurseForge Mod Distribution

Allowed

Modrinth link

https://modrinth.com/mod/adaptive-tooltips

Source/other link

https://github.com/isxander/adaptivetooltips

Mod file size

64.75 KB

License

(any other license)

What it does

AdaptiveTooltips contains various modifications to vanilla tooltips to allow users to always read them, no matter how badly implemented they are by server owners.

Why should it be in the modpack

It is a frequent problem where players cannot read large tooltips. This mod contains a a few tweaks that make sense for FO:

  • Bedrock Centering - Parity with Bedrock edition, if the tooltip is cut off on the left and right of the screen, AT places it above (or below if required) the cursor. This fix feels very vanilla and fits right in in Minecraft.
  • Text Wrapping - When required, AT can wrap text in tooltips into multiple lines so it can always fit on the screen. Screen Width mode feels very natural with Bedrock Centering enabled while Remaining Width is similar to tooltipfix that can feel a bit unnatural when you move the cursor.
  • Tooltip Scrolling - It is common for FO users to go on servers such as Hypixel, where they implement wrapping themselves so vanilla users can read tooltips, the problem is, there is only so much a server can do to help with this. Tooltips end up being taller than your screen, so being able to scroll on them can help with this.
  • Prioritize Tooltip Top - This follows the previous tweak very well; by default, when a tooltip is taller than your screen, it moves it upwards so the bottom of the tooltip fits on the screen while the top is clipped off. This fix changes this so it is instead moved down, allowing the (often more important) top of the tooltip to be read.

Why shouldn't it be in the modpack

This gives server owners an excuse to not implement better server-side handling of tooltips for vanilla users, however this shouldn't be FO's problem to enforce these kind of things and not being included in FO is unlikely to convince a server owner to do this.

Additional details

No response

commented

play.wynncraft.net at FO default GUI scale:

Resolution --->
v Version v
854x480 (default) 1920x1080
Vanilla 1.19.2 2022-11-22_16 05 22 2022-11-22_16 05 09
1.19.2
with AT
2022-11-22_16 09 30 2022-11-22_16 09 16
Vanilla 1.19.3
(Wynncraft doesn't yet support 1.19.3)
2022-11-22_17 03 57 2022-11-22_17 03 52

command: /give @p stick{display:{Lore:['"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"']}}

commented

Because it was an issue in the past and people convinced me to add it.
But in 1.19.3 snapshot Mojang fixed it - not perfectly, but covers 90%+ of use cases imo.

So - I need more convincing about the big bad use cases that Mojang's fix does not cover.

commented

Still don't know any use cases outside that one Hypixel minigame where this would be still needed.

commented

Why was Debugify's fix and tooltipfix added in the past?

commented

Alright, did some quick testing - here's the results:
The vanilla instances were adjusted to use GUI scale 3 to match the default FO.
Command if you want to test yourself: give <user> stick{display:{Name:'{"text":"this is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltip"}'}}

FO 4.5.2 (fixes it the right way IMO):
FO-4 5 2

Vanilla 1.19.2 (for comparison only):
Vanilla-1 19 2

Vanilla 22w46a:
Vanilla-22w46a

TL;DR Mojang doesn't wrap tooltips which is needed here.

I have a friend who made a game with one item having an extremely large tooltip, so I'll retest it if I can get my hands on said item now (which may qualify more as a 'practical example').

commented

Mojang didn't fix it. All they did was prevent it going off the left side of the screen.

This is bad for a few reasons:

  • Tooltips would cover up a whole row in the inventory, including the item the user is hovering over.
  • It can still happen; if a line is just a little longer than in 1.19.2, it will still go off-screen (and look bad)
commented

Also, you must remember, tooltips can appear in other aspects of the game other than the inventory, it can help other mods too.

commented

Those long lines of text are an easy way to demonstrate the possibility of recreating the problem, but not prove it in practice.

In survival, it is not possible to do this. Minigame servers, custom maps and datapacks would not intentionally do this.

So I want examples where actual content would accidentally overflow.

commented

Tooltips would cover up a whole row in the inventory, including the item the user is hovering over.

That's a minor visual detail, which can be but does not necessarily have to be fixed.

It can still happen; if a line is just a little longer than in 1.19.2, it will still go off-screen (and look bad)
Also, you must remember, tooltips can appear in other aspects of the game other than the inventory, it can help other mods too.

Indeed, that is the theory. Now I want practical examples to prove it (as of 1.19.3).

commented

Languages with long words? That was used when suggesting tooltipfix.

commented

In singleplayer survival it wouldn't. But FO isn't just that and there are an infinite amount of servers that would.

What I don't understand is why you previously added these other mods/fixes. I don't see any situation where 1.19.3 fix would actually change anything in those scenarios.

commented

What I don't understand is why you previously added these other mods/fixes. I don't see any situation where 1.19.3 fix would actually change anything in those scenarios.

The mods were added primarily for the alignment, with wrapping being a bonus. Now I feel that because the alignment is fixed, the necessity of including a new mod just for wrapping needs to be elaborated - where is wrapping still critical and simple alignment is insufficient?

there are an infinite amount of servers that would.
Languages with long words?

Screenshots?

commented

What I don't understand is why you previously added these other mods/fixes. I don't see any situation where 1.19.3 fix would actually change anything in those scenarios.

The mods were added primarily for the alignment, with wrapping being a bonus. Now I feel that because the alignment is fixed, the necessity of including a new mod just for wrapping needs to be elaborated - where is wrapping still critical and simple alignment is insufficient?

There is a lot more than just wrapping in AT:

  • Transparency modification is QOL
  • Prioritize Tooltip Top is very useful for most servers (see above)
  • Tooltip scrolling is very useful for most servers (see above)
  • Bedrock centering is parity

And wrapping is also very versatile allowing the power user to decide which technique they like best: tooltipfix or debugify.

commented

Also a lot to come for the 1.19.3 update, more info soon.

commented

New features for 1.19.3:

  • Overwrite vanilla wrapping: prevents vanilla wrapping gui button tooltips and replaces with AdaptiveTooltip's (makes the game feel more consistent with AT on, all tooltips wrapped the same)
  • New 'half screen width' wrapping option: self explanatory
  • Only reposition hover tooltips: As of 1.19.3, Minecraft added two types of tooltip positioning: Hover & Focused. 'Hover' is the old method, 'Focused' places tooltips above or below a button widget. Disabling this setting allows AdaptiveTooltips to reposition all types of positioners, including focused and any other modded ones. This option is needed because it may result in unexpected behaviour with modded tooltips and such.
  • Prevent vanilla clamping: Removes the 1.19.3 "fix", required for some tweaks to function properly (Bedrock Centering).
  • Use YACL-style Tooltips: In GUIs, tooltips are positioned with the same method they are in YetAnotherConfigLib.
  • Remove first line padding: for some reason a 2px gap was made between the first and second line of tooltips which can look inconsistent in guis such as descriptions of vanilla options.

As you can see AdaptiveTooltips is more than just wrapping and has a lot more of QOL that makes the game just feel easier to deal with.

commented

Because it was an issue in the past and people convinced me to add it. But in 1.19.3 snapshot Mojang fixed it - not perfectly, but covers 90%+ of use cases imo.

So - I need more convincing about the big bad use cases that Mojang's fix does not cover.

What previous practical use cases got covered by this new .3 fix? Screenshots? I don't believe this fix actually does anything helpful.

commented

Well, 4.6.0-alpha.1 is out so y'all can have a test how it works in vanilla now :P

commented

Is there any interest for this on the upcoming beta(s)? @Madis0

commented

No. 1.19.4 and even the April Fools snapshot showed that Mojang is taking tooltips more seriously now, so I don't see a need in a mod anymore.

commented

Even the April Fools snapshot

How so?

commented

image
image
buttons being Copy to clipboard, Done

This will probably be properly introduced in the next 1.20 snapshot.

commented

I hope they add something good, similar & serious (:trollface:) in vanilla, though this mod is super good

commented

I don't think a whole screen is really a good solution.

commented

I see the thumbs, so what things are still missing in vanilla 1.20.1?

commented

Long tooltips can still get off-screen, Mojang's implementation is rather a workaround than a patch. When too long, tooltips are moved to the top left of the screen (which is also visually unpleasant for some people) and there, if they are even longer, they can still get cut off the screen. Adaptive Tooltips fixes that, tooltips stay on place without getting cut off and when they are too long, the is a tooltip scrolling option which can also be enabled. I think this sums it up..