-
Notifications
You must be signed in to change notification settings - Fork 4.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
[ImGui] Apply color theme from config/base_colors.json
#76195
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
917530f
to
1c5a22d
Compare
I have tried to put it into |
I like the results! This will fix #75699 too. However, I think that we should avoid transparent colors for the present. We’re not currently redrawing the whole UI every frame, so transparency tends to have some odd effects. We can probably make the code a bit less repetitive too. |
This should be easier to follow and easier to maintain.
I sent you a little pull request on your own repository; see if you like it :) |
added
That would be great, as I have little to no experience in C++ ! |
simplify using color identifiers and the implicit constructor
I really like the 2077 color theme in last screeshot. Did you make it? Would you mind share the file? |
Could you please take a look, what could be wrong with it? |
Sure. The test suite is failing because you put the code in I would split it off into a separate function, perhaps called |
Whatever this is doing the tests I can't kick them |
Wow, that actually looks really cool. Very cyberpunk. Could make a whole game aesthetic out of that. Can you break in using a debugger and verify that the colors are all opaque? It looks like everything is 100% transparent, aside from the text. |
Ig it is a pretty messy process bc it's got the macros and the explicit conversion of the ccolors to imvec4s so maybe there's just something not reliable there that's falling apart? |
That shouldn’t be happening. |
The issue was because |
Summary
Interface "Change ImGui style according to base colors definitions"
Purpose of change
I really like the integration of ImGui, but the interface elements created with this library stand out from the classic interface style. I wanted ImGui to use not only the font but also the basic colors for backgrounds or buttons.
Describe the solution
Unfortunately, I don’t possess sufficient knowledge of C++ to write proper code, so please treat this as a demonstration of capability. The base colors are loaded into
windowsPalette
in a specific order. I extract five colors from there, break them down into their components, and add transparency to create the desired effects. However, I believe there might be a better way to achieve this. Perhaps usingccolors
, but my skills reach their limit here.Describe alternatives you've considered
with the help from @mlange-42 :
color_loader.h
:move this part:
from private to public
2)
sdltiles.cpp
:change code from this:
to that:
Testing
Additional context