Replies: 1 comment
-
|
Here is an example of a custom widget (used in egui.rs website demo) https://github.com/emilk/egui/blob/main/crates/egui_demo_lib/src/demo/toggle_switch.rs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to create a button that takes an arbitrary polygon as its clickable shape (as part of a radial menu). I have almost everything working, except that I can't override the default behavior of
Response::clicked(), which always assumes a rectangular shape. I have accurate hit detection for the shape, and within the widget'suifunction I disable theSense::CLICKonresponse.sense. As long as the calling code checksresponse.sense.senses_click() && response.clicked()it works as expected, at least for one button with no overlaps (haven't tested that yet).I'd really like to get a bit more control over how the
clicked()function works fromResponsethough, if possible. Has anyone gotten something like that to work?Here's what the code to interact with it would look if it worked the way I want it to:
Beta Was this translation helpful? Give feedback.
All reactions