cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
935 stars 211 forks source link

Render pocket computers in tooltips #2000

Open SquidDev opened 4 weeks ago

SquidDev commented 4 weeks ago

I was looking at the 1.21.3's bundle code, and realised it'd be quite easy to render a preview of a pocket computer in the tooltip, much like bundle previews do.

I'm not sure this is a good feature — I think it's cute and neat, but I'm not actually sure it's useful. It definitely takes up more screen space than I'd like.

In the current code, the computer renders at half size:

A screenshot of the Minecraft inventory GUI. The user is hovering over a pocket computer, and the tooltip shows the a preview of the pocket computer's terminal (playing the redirection game).

We could also try at quarter size:

A similar screenshot to the above, but the pocket computer preview is half the size. The screen shows a paint program, where I've drawn another pocket computer running the paint program (and so on one more time). I'm so funny.

My main concern here is the same issue that's blocking #825. When going down to fractional scales (e.g. when using a small GUI scale), you get all sorts of sampling issues, leading to unreadable text and weird Moiré patterns. Given the main purpose of this would be to read the text of the computer, it probably is a blocker.

The same screenshot as above, but at a smaller GUI scale. The text is unreadable, and there's Moiré patterns on the paint program's background. A similar version to the previous one. The paint program's "Press Ctrl to open menu" is entirely unreadable.

zyxkad commented 4 weeks ago

Definitely should add some client configs for render this or not and use what scale to render it

Lupus590 commented 4 weeks ago

Maybe the computer should be able to change the text tooltip instead? Kind of like a pager display then.

vico93 commented 3 weeks ago

Really liked it