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

Remove use of obsolete ImGui functions - v1.89 #303

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

Legulysse
Copy link
Contributor

@Legulysse Legulysse commented Oct 31, 2024

This PR contains a migration commit to allow imgui-sfml to be compiled with the flag IMGUI_DISABLE_OBSOLETE_FUNCTIONS.
Target imgui version : 1.89

Edit: this PR is tied to this ticket : #301

@ChrisThrasher
Copy link
Member

Thanks! I need a little more time to figure out how I want to enforce this in CI but once I do that I can get this merged.

@Legulysse
Copy link
Contributor Author

Nice !
To be clear, this update will not impact people already using 1.89, it will only make it available for people using the stricter compilation with the deprecation flag.

CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Member

@ChrisThrasher ChrisThrasher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to make IMGUI_DISABLE_OBSOLETE_FUNCTIONS PUBLIC so that consumers of the ImGui-SFML CMake target also get that defined. This means that when they compile Imgui.h they don't have access to functions that were not compiled into their build of ImGui-SFML.

@Legulysse Let me know what you think

@Legulysse
Copy link
Contributor Author

Seems safer this way to me ! And it allows the library and its users to move forward alongside imgui's future versions.
(you left a typo, using "obsolute" instead of "obsolete" in the cmake doc)

@ChrisThrasher ChrisThrasher merged commit 188d5d1 into SFML:2.6.x Nov 1, 2024
25 checks passed
@ChrisThrasher
Copy link
Member

Thanks for your help on this. I'll get this merged into master as well. I'm still not sure what to do about future ImGui versions which make even more things obsolete but we can hopefully figure something out. In the meantime I hope this makes your life a little easier.

@Legulysse
Copy link
Contributor Author

@ChrisThrasher Thank you for your work !
I guess I should close the other PR I made ?
Dont hesitate if you want to discuss those concerns further on the associated issue, or if you want me to provide PRs for those other updates later on.

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