-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
features/string_view: ImGui::TreeNodeEx() has different IDs when id is const char*/string literal #5079
Comments
Same is the case for Adding an overload as follows helps give precendence to the conversion to inline void PushID(const char* ptr_id) { PushID(ImStrv(ptr_id)); } // push pointer into the ID stack (will hash pointer). |
Hi Jonathan, Yes we knew about this, sorry for not communicating on this branch well. From the pov of being used from a generated backend eg Rust I don’t think this would be a problem, but it is indeed a problem in C++ for which I don’t have a good solution now (other than adding extra char* versions to a bunch of Tree functions, which isn’t great). The two other problems preventing this #3038 #175 to be merged are:
|
Hey @ocornut!
No worries, I know it's more of WIP than e. g. For later (post-vacation)
We're using Corrade's format library for exactly that reason, it's way faster, has non-zero terminated output, all for switching to something fast there.
Yeah, I did notice the debugging experience and I read about the natstepfilter issue in #3038. One pitfall we ran into is that the varargs overloads of various widgets |
FYI i pushed b9a8c5e which adds the workaround for those functions. I'm not happy about the solution but lacking a better one it'll do for now.
We got some good upvoting at https://developercommunity.visualstudio.com/t/allow-natstepfilter-and-natjmc-to-be-included-as-p/561718 but any extra vote would be useful (~10 more votes gets us on page 1 of open issues) |
Version/Branch of Dear ImGui:
Version: v1.87
Branch: docking + features/string_view
Back-end/Renderer/Compiler/OS
Back-ends: Magnum ImGuiIntegration
Compiler: MSVC19
Operating System: Windows 10
My Issue/Question:
Previously, when specifying the id of a tree node by string literal, the id would be pushed as string, now the same call leads to it being pushed as pointer (i.e. the
const void* id
overload seems to take precendence over the newImStrv
overload).Standalone, minimal, complete and verifiable example:
PS: I am aware that
features/string_view
is highly unstable and not production ready. I'm posting this issue only because you might find it useful/helpful, I'm not expecting a fix anytime soon.The text was updated successfully, but these errors were encountered: