Open
Conversation
Owner
|
This is a very interesting idea, but honestly it feels excessive to allow loading arbitrary PCKs just for themes. As you pointed out, PCK contents can potentially overwrite anything, including scenes, scripts... Loading just resource files for themes seems like a more straightforward approach (both to use and to develop/maintain). The challenge here is the dependencies. After some tinkering in a test project I managed to make an almost completely self-contained theme file with sub-resources built in... except for image textures. Those keep pointing to the texture cache created after import, and I am not sure if there is any way to change that. But if we can figure out how to do it, this way is definitely preferable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for loading custom themes through godot .PCK files.
With this change the user can change the color, icons, and logos of all parts of the Catapult client using custom themes.
NOTE: .PCK files could potentially contain executable code and as such should only be used when received from a trusted party.


To create a theme:
Clone the repository locally and open with Godot.

Create a folder in res://themes called "custom"
Create a folder in res://themes/custom called "my_theme"
Duplicate an existing theme and icon into this folder, and rename them "my_theme" and "my_theme_logo"
Edit the theme as you see fit, and make sure to put any external assets included in the folder
To export, go to resources and change export mode to "Export selected resources (and dependencies)"


Select the custom folder and all of the assets used by your theme
And finally export the file as a .pck.
Put this .pck file in your Catapult userdata themes folder and you're done.
I can add an example .PCK to the post upon request if needed.