-
Notifications
You must be signed in to change notification settings - Fork 32
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
Elements with no zOrder specified recieve Mouse Events back-to-front #652
Comments
Thanks for an excellent bug report! I'm pleased that you use so much Wren already :) And indeed, I think you are right with the bug and the solution too.
Because this could break existing plugins, the new behaviour will be guarded behind a "futureXXX" Dplug Option before becoming default. (unrelated: zOrder is broken with PBR and Raw layers, as Raw widgets are always displayed above PBR ones, so even if their zOrder disagree they could be in another display order. Never occured yet as bug) |
leads to so indeed what the rule should be: "next in the array of children => first to draw." |
LOL, you just made me realize I left the entire Wren script from my WiP plugin in there even though the test doesn't use it. Oops! Yeah, Dplug+Wren has been amazing for quickly iterating, it sure beats my old Krita exporter that spit out layout information. I'm glad if the report was helpful, and a futureXXX option sounds like a safe bet. :) |
Tip: RGBA now have |
Solution: use Dplug v12.6.0+ and add "versions": ["futureZOrder"], to your |
Hello,
I've noticed that if I don't call setZOrder() on UIElements, they will receive events like onMouseOver and onMouseClick in the wrong order (back-to-front). This is causing an issue for me where a "popup" dialog for credits allows clicking through to the knobs below.
This is easily resolved by setting the zOrder to anything above 0.
It appears this is caused by the list being built back-to-front, and the sorting algorithm leaving this untouched if zOrder values match. I believe building the list front-to-back would solve the issue.
From element.d
Here's a quick demonstration of the problem: zOrderBug.zip
The text was updated successfully, but these errors were encountered: