Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added Compatibility with latest imgui version #46

Closed
wants to merge 2 commits into from

Conversation

Tiamat-Defender
Copy link

@Tiamat-Defender Tiamat-Defender commented Feb 11, 2025

I was having a issue with imrad.h and fixed the issue by changing the NavDisableHighlight to NavHighlightItemUnderNav and also changed strncpy to strncpy_s so i figured you might like this or just think about implement NavHighlightItemUnderNav into the codebase.

Changed NavDisableMouseHover function to NavHighlightItemUnderNav  to ensure it works with the latest version of imgui.
@tpecholt
Copy link
Owner

tpecholt commented Feb 11, 2025

Thanks for your work. However there are issues with your pull request:

  1. strncpy_s is only available in msvc. So you would have to #ifdef it. But because it's not portable and also not considered safer by some silencing the error on your side (_CRT_SECURE_NO_WARNINGS ) is usually a better idea. It should not be put to imrad.h to let the user decide how to handle it.
  2. you seem to base your PR on older version of imrad.h which doesn't contain the IMRAD_INPUTTEXT_EVENT macro and that gives more errors.
  3. NavDisableHighlight was already fixed earlier.

Because of these points I don't think merging your pull request is beneficial. Does _CRT_SECURE_NO_WARNINGS fix your compilation issue?

@Tiamat-Defender
Copy link
Author

Yes i completely agree to this lol i dont know why it gave me a outdated version of imrad.h im stupid sometimes have a nice day sorry for any inconveniences i may have caused.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants