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

Update slider_float call for imgui v1.78+ #86

Merged
merged 1 commit into from
Apr 5, 2022
Merged

Conversation

cubicibo
Copy link
Contributor

@cubicibo cubicibo commented Apr 4, 2022

Imgui handles slider differently starting v1.78 onwards, depreciating entirely the power argument. This PR updates the calls for the new imgui API.

Apps running on both pyimgui@master (2022/04/04) and pygame are still broken. Those will work again with the upcoming v2.0. Combined with this PR, imgui_datascience can still be used with the latest version of these libraries.

@pthom
Copy link
Owner

pthom commented Apr 4, 2022

Thanks a lot! I will study this tomorrow.

@pthom
Copy link
Owner

pthom commented Apr 5, 2022

Thanks again for this PR.

Apps running on both pyimgui@master (2022/04/04) and pygame are still broken. pyimgui/pyimgui#210 (comment). Combined with this PR, imgui_datascience can still be used with the latest version of these libraries.

Yes, I hope this is solved quickly.

ocornut/imgui#3361, depreciating entirely the power argument. This PR updates the calls for the new imgui API.

I tried your version an it works. However, the flag ImGuiSliderFlags_Logarithmic is a good replacement (since we want k to vary slowly inside [0,1])
Would you mind updating your PR to include flags=1<<4 + 1<<5 (i.e ImGuiSliderFlags_AlwaysClamp | ImGuiSliderFlags_Logarithmic).


I an currently working on a tool which is an adaptation of this for C++. It is called immvision (which stands for immediate vision). I hope to publish it in the next weeks.

@pthom pthom merged commit 8c20bff into pthom:master Apr 5, 2022
@cubicibo cubicibo deleted the imgui178 branch April 5, 2022 13:00
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

Successfully merging this pull request may close these issues.

2 participants