How to get supported fullscreen resolutions but only if they're 16:9?

Hello! I’ve been using the “get supported fullscreen resolutions” node for the game resolution setting in my project, but I’ve come across an issue.

I use scale boxes in all my menus to maintain the 16:9 ascpect ratio all menus are built in, and that works well until a pop up appears (such as when clicking an inventory slot, an action menu appears) or when an image used as a background with both alignments set to fill. With the pop ups, these don’t change their size, and the background images stretch.

The background image issue only happens when I use Scene Capture Component 2D/its canvas render target/the canvas render target material as an image, but I could not find any aspect ratio settings on any of those three, like the one camera components have.

The only solution I’ve found for these two problems is to only allow for 16:9 screen resolutions to be used, but I don’t want to use manually added screen resolutions, since I believe it is positive to only allow people to use the resolutions their monitor supports.

I’ve tried using the % node like in the image below to only add 16:9 resolutions to be added to the setting in my menu but since many non 16:9 resolutions use the same heights or widths some 16:9 use, it’s adding some non 16:9 resolutions to the setting. I don’t believe there is a % math node for vectors so I can’t do both width and height together, and I don’t know if there’s a way to only get 16:9 resolutions adding more math to the code.

So, is there a way to have these pop up widgets the same size the entire menu is so it’s relative and to keep the background images the right size OR a way to only get 16:9 supported screen resolutions?

Hello, all 16:9 resolutions (example: 1920x1080) when you divide horizontal (1920) by vertical (720) always equal 1.777778.

So if you loop through and divide the current resolution’s x / y and it equals 1.78, then add it to your list of resolutions.