-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Some errors with ImVec2 + math while coding a custom checkbox. #6137
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
Comments
See the definition of ImVec2 we don’t define maths operators for it by default, as they could collide with your own maths operators in the case you setup ImVec2 to auto-cast to your own math types. You can import our maths operator by using:
|
ocornut
added a commit
that referenced
this issue
Feb 15, 2023
ocornut
added a commit
that referenced
this issue
Feb 15, 2023
Intrets
pushed a commit
to Intrets/imgui
that referenced
this issue
Jun 14, 2024
…ATH_OPERATORS) implementation from imgui_internal.h in imgui.h. (ocornut#6164, ocornut#6137, ocornut#5966, ocornut#2832)
Intrets
pushed a commit
to Intrets/imgui
that referenced
this issue
Jun 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version/Branch of Dear ImGui:
Version: DX9
Branch: It's just the latest version with all the essential files.
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_dx9.cpp + imgui_impl_win32.cpp
Compiler: Visual Studio 2022 Community
Operating System: Revision OS Windows 11 Pro
My Issue/Question:
So I am adding a custom checkbox and here is the line of code causing me all the trouble:
const ImRect bb(pos, pos + pos);
The error is:
No operator "+" matches these operands: operand types are: ImVec2 + ImVec2
Screenshots/Video
Standalone, minimal, complete and verifiable example: (see #2261)
The text was updated successfully, but these errors were encountered: