cdaragorn / Ui-Info-Suite

Mod for Stardew Valley.
86 stars 360 forks source link

Zooming in/out breaks mod features #64

Open jaydee0004 opened 3 years ago

jaydee0004 commented 3 years ago

Zooming and out basically makes everything out of place and the calendar/billboard is unclickable.

bconn96 commented 3 years ago

Changing the UI scale to match the Zoom fixes the issue.

JoaoPedroPR commented 3 years ago

It is still a bug. On the "ShowCalendarAndBillboardOnGameMenuButton": private void ActivateBillboard() { if (Game1.activeClickableMenu is GameMenu && (Game1.activeClickableMenu as GameMenu).currentTab == 0 && _showBillboardButton.containsPoint(Game1.getMouseX(), Game1.getMouseY()) && _heldItem == null) ...

The _showBillboardButton.containsPoint(Game1.getMouseX(), Game1.getMouseY()) returns false if on a different scale than 1 between UI size and Zoom.

JoaoPedroPR commented 3 years ago

Managed to fix by changing Game1.getMouseX() to Game1.getMousePosition(true).X. The fix is here: #72 I only fixed the CalendarAndBillboard but I suggest doing the same across the mod in general to support UI Scaling.

Annosz commented 3 years ago

It also has a general fix in #61 in which the UI scaling works for every mod option that has been added.