-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 a control gallery demo #555
Conversation
d686143
to
2c4d0e4
Compare
@aaronfranke The theme editor's control gallery seems good enough right now, but I think it serves a different purpose. The one I'm adding here is specifically meant to be referenced in the documentation as a screenshot, so that new users (who may not even know about the theme editor) know which Control nodes they should use to implement a given UI feature. In contrast, the control gallery in the theme editor already expects you to have UI development knowledge. Also, this demo can run as a standalone project, which could be useful for regression testing in the future (checking the exact UI layout for unexpected changes over Godot versions). |
I changed my mind, I think this is a good idea. So now it's time to look for issues :) I think the stretch mode should be set to "disabled" (and we can set aspect back to its default of "ignore"). When clicking on MenuButton and hovering or clicking on Actionitem, nothing happens and these errors appear:
When pressing Control and hovering over LinkButton, nothing happens and these errors appear:
|
Maybe, but this breaks the demo rendering on mobile and hiDPI displays where text will be tiny. I'd prefer demos to be working nicely in those scenarios out of the box. Otherwise, we'd have to wait until godotengine/godot#21446 is merged which won't happen anytime soon. |
@Calinou It's not good as-is because it's not rendering at a higher resolution, it's just stretching, and it looks ugly: If you want to implement a way for this to look good at high resolutions, that would be ideal (otherwise I would prefer no scaling to bad scaling). I took a look at the other demos and they seem to be able to handle scaling well, this is from the Translation demo: |
@aaronfranke I could add a DynamicFont to this demo, but this means we have to add yet another copy-pasted TTF file to this repository, bloating it even further 😛 godotengine/godot#39603 will solve this, but it will only be merged for 4.0. |
A few hundred kilobytes (or less... don't we only need one of these?) isn't a huge sacrifice for the sake of overcoming Godot's limitations, if we indeed desire high-DPI compatibility in this demo (and I guess all GUI demos). Otherwise, I would just set stretch mode to disabled, and then we can worry about high-DPI compatibility in Godot 4.0 after godotengine/godot#39603 solves this. |
This project showcases what Godot's various Control nodes can do (and what they look like, so that new users can figure them out).
2c4d0e4
to
d3d4953
Compare
@aaronfranke Alright, I added a DynamicFont and updated the screenshot.
We need several font weights for the RichTextLabel demo, at least until support for variable fonts becomes available in 4.0. |
The text looks good now when scaled. However, the console errors I mentioned here still exist. |
Merged as #569. |
This project showcases what Godot's various Control nodes can do (and what they look like, so that new users can figure them out).
I could consider adding Tree in a future PR – probably using a VBoxContainer to put it on the right of the Lists panel.
Preview