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

Add better tooling for building UIs and testing multiple resolutions #11362

Open
Arnklit opened this issue Dec 16, 2024 · 2 comments
Open

Add better tooling for building UIs and testing multiple resolutions #11362

Arnklit opened this issue Dec 16, 2024 · 2 comments

Comments

@Arnklit
Copy link

Arnklit commented Dec 16, 2024

Describe the project you are working on

A 2D game in production.

Describe the problem or limitation you are having in your project

When designing the layout of the UI for different screen sizes you have to change the project setting and force the scene to reload by selecting another tab and returning.

Godot_v4.3-stable_win64_f9E9783xZe.mp4

Describe the feature / enhancement and how it helps to overcome the problem or limitation

You should have options in the view menu or a dedicated menu to change a "preview" resolution. This should not be saved to the project settings, as you don't want to be changing the resolution for the whole project every time you are building and testing the UI.

It should also have a bunch of typical device resolutions / ratios for you to cycle between and possible the option to save custom ones.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Something similar to Chrome's Device Toolbar in their devevloper tools would probably be ideal.

chrome_F11HZfMFlx.mp4

If this enhancement will not be used often, can it be worked around with a few lines of script?

This would be used often.

Is there a reason why this should be core and not an add-on in the asset library?

There are addons that somewhat help with this issue. such as this one https://github.com/Danim3D/Godot-4-Plugin-Project-Resolution

But it doesn't resolve the issue of the UI not updating until you've refreshed the view by changing it and it also changes the project resolution when using it.

I also think this is functionality that should be built into the editor, Godot is used for a lot of different devices with different resolutions and orientations, being able to test that should be built in.

@sockeye-d
Copy link

If you make the root node of the scene a Control, you can change the size of it with its handles and see how your UI reacts

@Calinou
Copy link
Member

Calinou commented Dec 16, 2024

With #7213, we can provide this functionality with relative ease when the project is running. godotengine/godot#99010 already has this feature in place for the aspect ratio at least (you can enforce the base aspect ratio for the embedded game window). It could be extended with custom aspect ratio and resolution selections.

Implementing this in the editor (when the project is not running) is a lot harder though, at least in 2D where controls' positions would be changed and end up being saved in the scene file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants