-
Notifications
You must be signed in to change notification settings - Fork 27
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
UI polish #181
UI polish #181
Conversation
Tested on Linux, personally I prefer how the UI states are handled here, it feels more consistent and obvious imo compared to how Victoria 2 does it, but keeping this could be considered to be distinct from Victoria 2. |
Hover and pressed look fine, fairly similar to Vic2 anyway, but disabled look much worse IMO. I'm going to implement a custom class extending |
Why can't you just make such a modification a disabled style? Why would you need to update it like that? |
It would be using a separate disabled stylebox, when I said update on the normal texture changing I meant stuff like a flag changing to a different country, so regenerate the modified image when the normal image changes completely. |
That's fine, you can modify the look of textures with a stylebox, like you can just make a new derived stylebox that modify the draw however you want, there is no need to manually manage it. (and its automatically handled by Godot anyway) |
Oh yeah that sounds better, same texture referenced everywhere just changed by the stylebox. My only concern is will the stylebox have to calculate the modified version pixel by pixel every frame, as opposed to only when the base texture changes and caching after that? Unless there's a way to grey-ify and lerp images with a colour other than pixel by pixel calculations. |
What you could do is have a texture exist in a control, have a stylebox for that control that can get the texture and draws it modified, then what you do is whenever you change that control's texture, you call |
Looking through |
12d4102
to
c0cc6e2
Compare
Might need to consider RenderingDevice as well, also draw functions in Godot don't generally run every frame, |
|
Just to point out |
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.
Works on Linux
Oh so it does, thanks for pointing that out, my VSCode search was bugged, fixed now with a restart. |
ProgressBar
s have both colours defined, but not all of them have the textures defined).