Skip to content
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

Side effects of 'stop updating palette every frame and add default palette interface' commit #17

Open
goossens opened this issue Sep 12, 2023 · 2 comments

Comments

@goossens
Copy link

Commit eab54a3 stops updating the palette every frame and added a new default palette interface.

While speeding up the rendering loop is always a good idea, this change causes two side effects that are now hampering me:

  • The ability to have a custom color palette, which I was using, is now lost.
  • Changes to ImGui::GetStyle().Alpha are no longer automatically handled. In one of my applications, I give the user control over the transparency of the GUI and I now have to set a new palette on the editor every time they change transparency.

My implementation at goossens@d738eaf achieves the same thing you were after without the side effects.

It also maintains backwards compatibility for those who quickly want to change over from the old library to yours. 😄

@santaclose
Copy link
Owner

I'm aware that custom color palette is not possible with my changes. And i agree that it should be possible. I'm trying to do some cleanup and will come back to this later.

and thanks for letting me know about the alpha stuff

@khiner
Copy link

khiner commented Dec 12, 2023

Another side effect is that, due to the new use of ImGui::GetStyle during TextEditor construction, it is no longer possible to instantiate a TextEditor instance before the ImGui context has been initialized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants