Ark2000 / PankuConsole

Feature-packed real-time debugging toolkit for Godot Engine.
https://k2kra.xyz/PankuConsole/
MIT License
997 stars 38 forks source link

feat: scalable UI #176

Closed Ark2000 closed 4 months ago

Ark2000 commented 4 months ago

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

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

6

Change font here:

8
Ark2000 commented 4 months ago

Related issues:

165

closes #166

169

174

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

Please give it a test.

tarwich commented 4 months ago

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.

https://github.com/Ark2000/PankuConsole/assets/334149/196ff5d6-d697-4a08-93eb-19f745c1014b

Ark2000 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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

FabriceCastel commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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.