-
-
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
Is it possible to create non-square buttons? #7500
Comments
Basically you would submit an |
Yeah, that's an idea. Not quite as simple as it sounds, as I have a layout engine that controls ImGui, but I can probably figure something out with a custom widget for the window in question. Cheers. |
If combining the buttons into one is a problem, you can use multiple buttons as well. You will need to backup a few internals (see This should already be fine for mouse interaction. If you want advanced functionality for your buttons (like using them as drop targets or having keyboard/gamepad navigation with highlights in the proper shape) it gets more complicated. |
Version/Branch of Dear ImGui:
Version 1.89.4
Back-ends:
Custom
Compiler, OS:
Windows 10/11 + Ubuntu 20.04/22.04 + MacOS
Full config/build information:
No response
Details:
Question:
Is it possible to have non-rectangular hit testing for invisible buttons? (I perform all rendering myself.)
I can make rectangular buttons approximate the UI design, but that's not the best user experience, obviously.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: