-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Allow custom UI themes #15394
Allow custom UI themes #15394
Conversation
I've actually been thinking about an easier way to do this, which would be simply a hue and a saturation slider, then we could rotate the colors in the vertex shader when drawing the UI very cheaply. Would also be less code (though slightly less flexible since you then couldn't set the focused and unfocused colors entirely separately, etc). Could even then drive that slider from the month to get the original PSP's seasonally changing background colors, as an option, heh. |
That would be quite a fancy thing, I didn't thought of it. Will take a look into it :) |
Actually I can take care of that, kind of wanted that feature for a while. And the sum total of the changes will probably actually be larger, come to think of it. Let's see :) |
Well was trying to toy around as I had some spare time: https://github.com/iota97/ppsspp/tree/vertex-hue Vulkan work fine, OpenGL can't seem to get the uniform to the shader. Edit:
|
Ah nice. I can take it from there. |
Hm, some good points there, yeah. Really like the slider though :P And some extra vertex shader work in the UI should be no big deal and hopefully not much cause for breaks... |
I made an alternate branch that gets it working on all backends, and has live slider update: https://github.com/hrydgard/ppsspp/tree/ui-tint-saturate diff: fac0868 But yeah, it won't support switching bright and dark, and that kind of thing. In a way, I'm not sure that's a bad thing... Kinda keeps the "PPSSPP look" intact while still allowing some customization. Not sure what is best. |
#include "Core/System.h" | ||
|
||
struct themeInfo { | ||
std::string name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like it'd be really nice (maybe not in this pull) to also allow overriding the main zim (if not the font) per theme. Since we read all the metadata from there, this would allow customizing icons, etc.
It might also be nice to have a default ini in the repo or somewhere that has the default theme (but also like you have, still work without it.)
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZIM override would allow for custom touch controls too that got requested quite a few times.
Mhhhh, I got the feeling this the way to go rather than hue shift (kinda fancier with the slider but that's it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I kinda feel .. why not both? You pick a theme, and then you can shift it if you don't like its colors.. Maybe it's overkill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such use cases could be covered by a web app to create or edit themes. We could also change the lightness value without changing the image redering as it happens on the vertex stage.
We could get the web interface make the ZIM file in the future too or thing like this to make it easier for the user.
But we could have both in the end, never disliked overkills in software to begin with :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think both is not unreasonable - although I'm just very slightly concerned about Mali-400 or something dying from more complex shaders (don't pay attention, I just have paranoia from all the reported shader compile errors that make no sense and crappy mobile drivers.)
Maybe the theme ini could even have a default hue/etc. that resets it when you apply the theme? I like the idea that it could be live and change over time. There are other interesting ideas like it could take the dominant hue from the most recent game you played.
This is even making me think of how I wanted to add UIScreen transition animations.
Not trying to overcomplicate, though. But I see no reason we can't do both...
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These shaders are at least quite a bit less complicated than some of the stuff we generate sometimes, so I think they'll be fine. I will test them on Mali-400 though :)
About this do we really need all those settings for the theme?
|
Yeah, let's try to minimize the number of them. Do delete any unused ones and feel free to merge as appropriate. |
OK, I'm happy with this. Ready to go in? |
Yeah, I wanted to make at least another theme at first but I'm terrible at that :) |
Hm, I'm thinking about the theme names .. doesn't look like we've hooked them up for translation? (looks like we have the same problem for the background animations too) |
This should do it: f4b5c16, I just haven't synced the lang file. |
Oh that's right! |
There isn't any new theme yet, but you may add them in /PSP/themes/whatever.ini |
Well, This should help generate a valid ini: https://ppsspp-theme-editor.onrender.com/ |
This allow to add other color themes to
themes
folder, might add a few to assets later if I manage to make something decent :)Silly example:
I made one of the worst looking HTML page ever to help creating theme, uploaded the source here. Will improve it as well.