Create a theme handling system for UI #16
Labels
No labels
To be check - À vérifier
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: YannK/godot-third-person-basic-scene#16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Before developpings IG windows systems, we should have the possibility to switch UI themes.
The documentation is here : https://docs.godotengine.org/en/latest/tutorials/ui/gui_skinning.html and https://docs.godotengine.org/en/stable/classes/class_theme.html
I (YannK) could work on the themes themselves (studying the way to have a TODO list to create new ones), but I would need the selector in place beforehand.
There should be the choice between two themes : lakne & zbasu (which are the 2 energies of the Khanat)
changed the description
I have been looking through some documentation and I think I got an idea how to implement this properly. I am not sure of the proper way to implement it in Godot 4, but here are my thoughts.
We should have a user preference to define a global variable containing the theme to be used. And this variable will lead to a folder containing all the UI related stuff : proper Godot theme (for labels/fonts/buttons etc.), icons, background pictures etc. As any folder will contain the same filenames and folder hierarchy, the system would load the component using relative path from the root folder of the theme we have chosen. And if it doesn’t find the proper information from the themes configured, it will get the default value from the default one.
mentioned in commit
7a0fa13bf7
I have just added two placeholder UI themes to be able to make tests. They differ mainly by colors only,
khanat
aiming at being the default one