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

feat: scalable UI #176

Merged
merged 7 commits into from
May 9, 2024
Merged

feat: scalable UI #176

merged 7 commits into from
May 9, 2024

Conversation

Ark2000
Copy link
Owner

@Ark2000 Ark2000 commented May 7, 2024

This pull request fixed all UI scaling issues.

Now we can adjust global UI size like this below. (Of course the plugin will detect DPI and choose a suitable scale automatically or you can do it manually in settings menu

  • font size: 24
1
  • font size: 16
2
  • font size: 8
3
  • font size: 32
4

Also, we can customize font easily now. I guess it will be pixel-game friendly.

6

Change font here:

8

@Ark2000
Copy link
Owner Author

Ark2000 commented May 7, 2024

Related issues:

#165
closes #166
#169
#174

CC @alijaya @tarwich @FabriceCastel @MatiasVME @CoderJo-Pro @worron

Please give it a test.

@tarwich
Copy link

tarwich commented May 7, 2024

Tested with the ui-fix branch. Feature-wise works well. Something is a bit odd with the font size detection, but at least it's useable.

Screen.Recording.2024-05-07.at.08.02.49c.mp4

@Ark2000
Copy link
Owner Author

Ark2000 commented May 7, 2024

Tested with the ui-fix branch. Feature-wise works well. Something is a bit odd with the font size detection, but at least it's useable.

Screen.Recording.2024-05-07.at.08.02.49c.mp4

should work now.

@FabriceCastel
Copy link

Can confirm this seems to scale appropriately now! Also was able to configure the font so it wouldn't use the pixel art font I'm running with for my game. The only thing you missed I think is that the color of the font in the title bar still uses the default theme color for the project. Should be a matter of just adding that override to the panku theme, other than that it looks great!

image

@FabriceCastel
Copy link

I just added a font color override for the Label node type to address that last thing and it worked as intended FWIW

@FabriceCastel
Copy link

Also, I'm only seeing this now - but there's a typo in the title (Interative -> Interactive). Huge bug, I don't know if I'm going to be able to use the console with that there :OOOOOO

@Ark2000
Copy link
Owner Author

Ark2000 commented May 8, 2024

Can confirm this seems to scale appropriately now! Also was able to configure the font so it wouldn't use the pixel art font I'm running with for my game. The only thing you missed I think is that the color of the font in the title bar still uses the default theme color for the project. Should be a matter of just adding that override to the panku theme, other than that it looks great!

image

I'm not sure what caused the issue, I tested it on several different devices, and the title bar text color was white as expected. It's good to know that you were able to fix it easily. I'll pay more attention if others raise similar issues in the future.

@Ark2000
Copy link
Owner Author

Ark2000 commented May 8, 2024

Also, I'm only seeing this now - but there's a typo in the title (Interative -> Interactive). Huge bug, I don't know if I'm going to be able to use the console with that there :OOOOOO

Oops, my bad! That pesky "Interative" typo must have been a bug planted by my arch-nemesis, the dastardly Typo Villain! Fear not, for I shall vanquish this foe with my trusty backspace key and restore order to the console! 🗡️💻 Your faith in my coding prowess shall be rewarded once more! 🤺

@FabriceCastel
Copy link

Can confirm this seems to scale appropriately now! Also was able to configure the font so it wouldn't use the pixel art font I'm running with for my game. The only thing you missed I think is that the color of the font in the title bar still uses the default theme color for the project. Should be a matter of just adding that override to the panku theme, other than that it looks great!
image

I'm not sure what caused the issue, I tested it on several different devices, and the title bar text color was white as expected. It's good to know that you were able to fix it easily. I'll pay more attention if others raise similar issues in the future.

I've got a default theme set up on my project that overrides the font color attribute for Label nodes. The Panku theme doesn't define any behaviour for Label font color properties, so Godot falls back to the project-wide default theme and uses whatever color is configured there (in my case, that brown-ish color). I'm maybe 80% sure that's what's going on, I'm still relatively new to the theme system in Godot.

@Ark2000 Ark2000 merged commit 94a740b into master May 9, 2024
@Ark2000 Ark2000 deleted the ui-fix branch May 9, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants