OnMouseOver not firing while overlayed by another widget?

Hi there,
Completely new here, big up for bringing this project up to speed with the latest technologies!

I’m kind of stuck now and I’d like to ask you guys what is the best way to go around it. I’m trying to achieve some drag&drop modulation connections in UI, via custom widgets, derived from the base classes like in IControls.cpp. As I found out that you cannot outside of widget boundaries, I made a custom widget just for connections. So it goes like so:

  1. Detect click and drag inside the widget
  2. Expand the IRECT bounds to the whole window and draw a line from the widget center to the mouse position
  3. OnMouseUp -> shrink IRECT back to original.

Now my problem is that anything else underneath that expanded IRECT is not able to fire any MouseOver event. Am I missing any flag that I forgot to toggle??? Or is this the right way to go about it ??

Yeah, only the topmost control will get the mouseover.

This kind of thing is quite horrible to do in iPlug2 i’m afraid. Here is a hacky solution that is not great

Oh, that’s indeed bit hacky, but it makes complete sense. Thanks for the gist…


Works like a charm :slight_smile:

On a side note: people are using ImGui for various engines and for other “non-debugging” purposes, essentially making complete interfaces. This comes along with a huge variety of widgets that are floating around on Github and other places. So… Do you see people utilizing ImGui for UIs? I know it’s deffo not the most efficient way to make UIs performance wise, but it’s so damn quick to use :slight_smile:

Cheers for the help, Oli!

Cool :slight_smile: Are you able to share your code for the nice cables?

I really like Dear ImGui, but its very “dev tool” looking. I envisage people using it for debug UIs, but it would be quite cool to use for an experimental interface.

Sure, no problem at all. Here you go
There’s just a rendering part changed (swapped for bezier curves). For my purposes, this is not what I intended but was done for fun and to learn how that code works.
Still, there are things to figure out (disconnect cables, centering cables on target plugs, disconnecting cables, etc.), but it’s certainly a good starting point for everyone.

And regarding those ImGui UIs… They do have certain recognizable aesthetic (mostly caused by people just sticking with the original font and color palette, which makes it dead giveaway), but if flat UI is what is one after, it’s quite alright. Certainly there are people making dozens of node-based systems, but also handful of useful widgets like [curve editor, loaders/spinners and by favorite, this widget for displaying audio data. I can see how someone who’s after more into skeuomorphism would dismiss this. I guess different strokes for different folks :slight_smile:

E… I can only include 2 links as new user, so I couldn’t add links to respective widgets.

Thanks, these funky cables are much more satisfying to patch!

yeah i know about those imgui widgets - they are very cool, i do like the aesthetic, but expect most vst customers wouldn’t!