imgui-java icon indicating copy to clipboard operation
imgui-java copied to clipboard

Unable to assign / use custom ImGuiStyle

Open rheia777 opened this issue 2 years ago • 1 comments

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.

rheia777 avatar Aug 02 '23 21:08 rheia777

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

Imgui.popStyle();

Brohammer5 avatar Jan 10 '24 20:01 Brohammer5