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

Drawing to the world is offset when zoom == 100 and UI scale != 100 #936

Open
yuri-moens opened this issue Mar 21, 2024 · 2 comments
Open

Comments

@yuri-moens
Copy link

Describe the bug
When drawing to the world on zoom 100% and UI scale anything except 100% the draws don't appear in the correct location. They seem to appear in the correct location for every other zoom/UI combination except zoom == 100 and UI != 100. I've never seen this issue before so I believe it must be new with 1.6/4.0.0. I wrote a simple test mod to better illustrate the issue, see below. Apologies if this is the wrong channel to report this, I've tried Discord a couple of times but no luck, the messages tend to get lost quickly due to activity.

To Reproduce

  1. Build test mod: https://github.com/yuri-moens/TestMod
  2. Warp to the mines (world_setminelevel 2)
  3. Enjoy pretty white rectangles covering all stones
  4. In options, set zoom to 100% and UI scale to anything except 100%
  5. The rectangles are no longer covering the stones

Screenshots
Using 100% Zoom and 100% UI scale
https://i.imgur.com/e7ROIf2.png

Using 100% Zoom and 110% UI scale
https://i.imgur.com/cIuV1cf.png

@urbanyeti
Copy link

I can confirm this issue. Experienced this in the latest version of my mod which draws thought bubbles above farm animal heads: https://www.nexusmods.com/stardewvalley/mods/859?tab=files

I am hooking into OnRenderedWorld and drawing from there so was not expecting the the elements to be rendered in the UI mode (even confirmed that they shouldn't be because Game1.uiMode is false), but the new elements scale when the UI scale adjuster is changed.

I see the expected behavior (the rendered elements not being affected by the UI scale slider) when zoom is set to anything other that 100%, so I think there's a bug here.

I've uploaded a quick demo here:
https://imgur.com/a/EGj7Fc9

@jltaylor-us
Copy link
Contributor

Can confirm the same behavior in Range Highlight, specifically in this draw call during the RenderedWorld event
https://github.com/jltaylor-us/StardewRangeHighlight/blob/e7b3b71db64795a6ef21c2e1a972a46165daab23/RangeHighlight/RangeHighlighter.cs#L88-L110
I don't think that particular bit of code has anything SMAPI-specific in it, so maybe a game bug?

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

No branches or pull requests

3 participants