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

[BUG] Tooltip UI gets cut off for large recipes #208

Open
lukaskollmer opened this issue Feb 16, 2023 · 3 comments
Open

[BUG] Tooltip UI gets cut off for large recipes #208

lukaskollmer opened this issue Feb 16, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@lukaskollmer
Copy link

(I'm using the latest version of YAFC)

Not sure if this is actually a bug and not just a result of my screen potentially being too small, but large recipes (large w.r.t. their number of inputs and outputs) cause the tooltip view to be only partially visible, with the topmost (and bottommost?) parts being off-screen.

My screen size is 3024 × 1964 (14" MacBook Pro), which i guess shouldn't be too uncommon.
Idk how difficult this would be to change (if it is possible at all), so I don't wanna make unreasonable suggestions, but here's some ideas:

  • IMO a simple fix for this would be to try to detect situations where the tooltip would be taller than the screen size, and then scale it down so that it fits.
  • If the tooltip were made scrollable, you could allow scrolling while hovering over some tooltip-displaying item and then redirect these scroll events to the tooltip. Though I don't think that would work too well since you can currently already scroll in the production sheet view while hovering over a tooltip (and it'll just scroll the production sheet, which is probably more expected than it scrolling the tooltip).
  • Instead of scaling the tooltips, they could be multi-column if the screen height isn't sufficient to display the whole thing.

@lukaskollmer lukaskollmer added the bug Something isn't working label Feb 16, 2023
@DaleStan
Copy link
Contributor

I agree we shouldn't assume everyone has a 4k screen, but I'm not sure what you're doing here.

With a slightly different set of mods, I see this on my 2560×1440 screen:
image

It would still have troubles on a 1920×1080 screen, but your 3024×1964 should be just fine.

@lukaskollmer
Copy link
Author

lukaskollmer commented Feb 18, 2023

i think it's because, while the native screen resolution is 3024×1964, YAFC is rendered at 2x, so the effective resolution is actually just 1512x982

@veger
Copy link
Contributor

veger commented Feb 18, 2023

I have similar issues on my laptop which has a smaller screen than my desktop monitors.

I have been thinking to take a stab at this, but since UI/SDL is not my strong suit I didn't think too much on the problem and potential solutions. Bit I think, as you also propose, a redesign of the tooltip is our best bet to fix this issue.

For my summary view I had to jump to hoops to figure out ways to find the height of the 'parent space' in order to make the 2D scrollable object fill this whole space. So I doubt scaling to fit the available space is going to be possible (again SDL is not my string suit, so I might have missed something obvious)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants