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

setTheme() override callback/disablement #773

Open
Chillance opened this issue Feb 23, 2024 · 3 comments
Open

setTheme() override callback/disablement #773

Chillance opened this issue Feb 23, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Chillance
Copy link

Chillance commented Feb 23, 2024

Related problem

No response

Your request

I was going through the code to see what is going on "under the hood" and found the setTheme method that is run every frame. Now, it might not matter much, but I still wanted to bring it up and see what you say.

If I want to change Theme/Style this setTheme will still always run and thus waste CPU time.
I suppose I can set the style so that is good, and no callback would be needed for being able to set the theme, but that means it would still do this internal one and then override with my style. Seems a bit wasteful doing the internal one in this case. So, maybe introduce a way to have a callback for it, override with a custom one, and/or just disable the internal one?

Best Regards!

Alternative solution

No response

Additional context

No response

@Chillance Chillance added the enhancement New feature or request label Feb 23, 2024
@gucio321
Copy link
Collaborator

yeah, Thats a good idea.

However its not my highest priority right now as I need to re-enable all features that was disabled since migration (e.g. Markdown support) and this needs much work in cimgui-go.

@gucio321 gucio321 added the good first issue Good for newcomers label Feb 23, 2024
@Chillance
Copy link
Author

Yeah, understandable. Thoughts on how you see this implemented? Override with callback? Disable/Enable? Having it there is not bad, but a boolean to do it or not at least would be nice.

@gucio321
Copy link
Collaborator

I think callback will be fine. If user wants to keep defaults, they can just pass empty function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants