Skip to content

Conversation

@miarodri
Copy link

@miarodri miarodri commented Oct 1, 2025

Description

Added ultrawide resolution support. In general, improves support for alternate resolutions. Addresses #3.

Fair note: I'm not a Unity dev, and most of what I've done here was based on some googling I did in the last 24 hours. As such, I'm not entirely sure this is the best solution for this.

Primarily what I've done is change the pivot of the menus and the ScreenMatchMode attribute to properly scale things in resolutions wider than 1920 x 1080. This isn't a perfect solution: due to scaling, I needed to move some of the panels upwards to prevent them from clipping into each other. This causes an issue with the top bar drop down menus, especially the "Cheats" menu. See the screenshots in testing for an example of this.

I've made some additional changes that negate the need for moving the panels. Instead, images are stretched according to the current resolution. This requires a restart whenever the resolution is changed but otherwise provides a cleaner layout.

Testing

See the comments below for newer screenshots of the changes.

Tested with both 1920 x 1080 and 3440 x 1440 resolutions.

1920 x 1080:

20251001105031_1

3440 x 1440:

20251001104957_1

NOTE: There is an issue with the top bar drop down menus clipping into the keybinds panel. This seemed like a minor enough issue that I thought it was worth continuing with this approach.

20251001105035_1

@miarodri
Copy link
Author

miarodri commented Oct 1, 2025

Ah shoot. Did some extra testing after noticing an issue on the ultrawide setting. Looks like the binds buttons aren't placed correctly, and the list can overrun the space given and display over the page buttons on the bottom. Will continue to iterate on this when I get back from work.

@miarodri
Copy link
Author

miarodri commented Oct 2, 2025

Alright, I'm not entirely happy with this, but it works, so I'm leaving it here.

I've undone the movement of the UI elements and changed how the UI scales. The issue with the new scaling is that, for some reason, the images aren't scaled properly. To fix this, I added a function that calculates how much the images should be stretched - determined by the current resolution - and modifies the size of the image to the new stretched values.

There's a problem with this fix: this only takes effect when the UI is first created. When the resolution is changed, the images are still stretched to the last resolution. You need to completely exit and relaunch to recalculate the stretch value and get the correct image sizes.

It'd be great to update all the functions to just update in size when a resolution change is detected, but I figured that changing resolution is rarely done and needing to restart is acceptable in this case.

Examples of the new UI:

3440 x 1440
3440x1440 Debug Mod

1920 x 1080
1920x1080 Debug Mod

If there's a better way to do this that I missed, I'd be happy to update this PR. Otherwise, I'm leaving it like this.

@camradex
Copy link

camradex commented Oct 3, 2025

the binds are still a bit offset on 1920x1200 but its a big improvement, specially on the smaller submenus
pr:
image
image
original:
image

image

@miarodri miarodri changed the title feat: Added ultrawide support feat: Improved alternate resolution support Oct 4, 2025
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.

2 participants