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

Show a full recipe widget in item tooltips for bookmarked recipes #398

Merged
merged 12 commits into from Jul 10, 2023

Conversation

eigenraven
Copy link
Member

@eigenraven eigenraven commented Jul 2, 2023

Show a full recipe widget showing missing items and a hint how to overlay the recipe using the keyboard in item tooltips for bookmarked items.

image
image

@eigenraven eigenraven marked this pull request as ready for review July 4, 2023 19:11
@eigenraven eigenraven requested review from a team July 4, 2023 19:11
@wlhlm
Copy link
Member

wlhlm commented Jul 5, 2023

Testing this and seeing some glitches:

IC2 Fluid Canning Machine handler
2023-07-05_21 15 27

Out-of-bounds drawing (this is with the tiny default MC windows size)
2023-07-05_21 16 53

Also, certain recipes don't seem to work: for exmple for the Tinker's Construct Casting Table recipe handler, Emerald works, but Blank Cast doesn't show a widget. (this is with the GTNH version of TiC)

@github-actions
Copy link

github-actions bot commented Jul 8, 2023

Warning: 2 uncommitted changes
#401

Co-authored-by: GitHub GTNH Actions <>
Copy link
Collaborator

@mitchej123 mitchej123 left a comment

Choose a reason for hiding this comment

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

Seems nice as a concept. I'd like to see it as a config option (which I didn't notice at a fairly quick glance) in case people are like "REE CHANGE", or those who use smaller UIs and it's annoying

@eigenraven
Copy link
Member Author

It is a config option, I just need to test and fix the legacy handler offsets like rot13 said then it'll be done,

@eigenraven
Copy link
Member Author

@mitchej123 Please review again, I have done some more significant changes to fix the rendering order. It should be trivial, but take a look just in case I missed anything.

@wlhlm
Copy link
Member

wlhlm commented Jul 9, 2023

I can still reproduce two of the issues I have mentioned above:

Minecraft.1.7.10.2023-07-09.17-44-51.mp4
  1. it tries to draw the widget out-of-bounds above the cursor even though there seems to be enough screen space to draw it below the cursor
    • also, it seems to leave a gap if the tooltip only has one line
  2. certain recipes don't show up; I think this has something to do with the recipe having an "input" item, ie. the blank cast in the casting table just starts from a fluid, whereas the emerald cast has an emerald "input" item
    • seems like a minor issue though, not sure if it'll affect a lot of things... 🤷

@eigenraven
Copy link
Member Author

I'm not sure how to best solve the out-of-bounds drawing without redoing a lot of the vanilla tooltip rendering code, though something is clearly wrong because it should only switch to rendering the recipe above the tooltip when your mouse is below the midway point of the screen, which doesn't seem to be the case on your video? (looks like 1/4)

I'll test the tinkers problem too, hopefully it's an easy fix

@wlhlm
Copy link
Member

wlhlm commented Jul 9, 2023

Welp, that was a quick fix. Nice!

Co-authored-by: Wilhelm Schuster <dev@rot13.io>
@eigenraven eigenraven merged commit 65ffbad into master Jul 10, 2023
1 check passed
@eigenraven eigenraven deleted the recipe-tooltip branch July 10, 2023 16:38
@wlhlm wlhlm mentioned this pull request Jul 16, 2023
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.

None yet

4 participants