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

Unable to assign / use custom ImGuiStyle #194

Open
rheia777 opened this issue Aug 2, 2023 · 1 comment
Open

Unable to assign / use custom ImGuiStyle #194

rheia777 opened this issue Aug 2, 2023 · 1 comment

Comments

@rheia777
Copy link

rheia777 commented Aug 2, 2023

I wanted to set a custom style, but I can't seem to find the correct method to use.
Usually you just get a pointer to the object and edit that.
Do you have to assign it somewhere else, when using these bindings?

Example code:

ImGuiStyle style = ImGui.getStyle();
style.setAlpha(1.0f);
style.setDisabledAlpha(0.6000000238418579f);
style.setWindowPadding(8.0f, 8.0f);
style.getColors()[ImGuiCol.WindowBg] = new float[] {0.09803921729326248f, 0.09803921729326248f, 0.09803921729326248f, 1.0f};
// .... omitted the rest

When I used ImGui.pushStyleColor(...), it worked, but that's obviously not what I want.

@Brohammer5
Copy link

Brohammer5 commented Jan 10, 2024

I think you need to do in order to properly have a new style.

Imgui.popStyle();

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

2 participants