[QUOTE=Dodgin;613566]
Has anyone experimented with using the transparent area of CEF as a click-through event?
I have been looking at this myself. The only solution I came up with was forcing the input to UI only on start, then in Javascript you capture a mouse down event and call a blu_event() when clicking on <body> which calls a C++ function that switches the input to game only and then trigger your game’s mouse down event. You switch back to UI only input once you’re done with input.
I’m fairly sure there’s a better way around this, for instance: Switch input to game and UI, grab the zbuffer off the BLUI material, test against that and pass the click event to the game if the pixel clicked is transparent.
EDIT: It seems the overly priced Coherent UI has transparent click through implemented by default and they seem to be using the transparency method I wrote about above. It’s about half way down the page. Search for “input on transparent”.
As described by the documentation they have a canvas over both BLUI and game, this captures mouse events, tests the pixel under the cursor for transparency in BLUI (I assume it checks raw pixels from the material, like this). If it’s transparent then it passes the input to the game, if the pixel’s opacity above a certain threshold then it passes the input to the BLUI instance.
I will definitely be looking into this in the next few days if I decide to stick with BLUI and will post my results here.