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 imgui-SFML.cpp #231

Closed
wants to merge 1 commit into from
Closed

Update imgui-SFML.cpp #231

wants to merge 1 commit into from

Conversation

pifopi
Copy link
Contributor

@pifopi pifopi commented Jan 30, 2023

Hello !

Quote and Tilde were deleted in the latest SFML
SFML/SFML@72cd878

Thanks in advance !

@pifopi pifopi closed this by deleting the head repository Jan 30, 2023
@pifopi pifopi reopened this Jan 30, 2023
@eliasdaler
Copy link
Contributor

eliasdaler commented Jan 30, 2023

I don't follow SFML's master, I use the latest tagged version as a baseline.
See #228. After SFML 2.6 gets released, I'll accept this commit.
Otherwise it will force everyone to use the latest SFML if they want to get new ImGui-SFML updates.

@eliasdaler
Copy link
Contributor

However, this makes me a bit uncomfortable that people who use ImGui-SFML won't be able to use "bleeding edge" SFML, so maybe I should make some branch which allows you to use SFML's "master" with ImGui-SFML?

(I won't be able to maintain it myself, though, someone will need to do it)

@pifopi
Copy link
Contributor Author

pifopi commented Jan 31, 2023

I can probably take care of this if you wish. Changes shouldn't be too massive anyway ! I checked and sadly only one of those two changes is compatible with sfml 2.5 The other isn't as far as I could see

@eliasdaler
Copy link
Contributor

eliasdaler commented Jan 31, 2023

Hmm... I think the better solution is to do something like this:

#ifndef SFML_VERSION_MAJOR >= 3
    #define IMGUI_SFML_KEY_APOSTROPHE sf::Keyboard::Apostrophe
    #define IMGUI_SFML_KEY_GRAVE sf::Keyboard::Grave
#else
    #define IMGUI_SFML_KEY_APOSTROPHE sf::Keyboard::Quote
    #define IMGUI_SFML_KEY_GRAVE sf::Keyboard::Tilde
#endif

... and then use IMGUI_SFML_KEY_APOSTROPHE and IMGUI_SFML_KEY_GRAVE in the code

@pifopi
Copy link
Contributor Author

pifopi commented Jan 31, 2023

I deleted my fork yesterday so i'm creating an other PR with that fix

@pifopi pifopi closed this Jan 31, 2023
@pifopi
Copy link
Contributor Author

pifopi commented Jan 31, 2023

#232

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