Spankied Posted October 22, 2018 Share Posted October 22, 2018 I have a rectangle interface with an onPointerOutObserver handler that hides the interface. https://www.babylonjs-playground.com/#65I7QC In the first playground, I can move the mouse anywhere in the interface and it will remain visible. https://www.babylonjs-playground.com/#65I7QC#1 In the second, if I hover over the button in the interface, the interface is hidden. This is not intended behavior. If I set button.isHitTestVisible = false, the rectangle observer isnt triggered. But the button observables wont be triggered. I think the functions in question are _processObservables and _processPicking here fixed : https://github.com/BabylonJS/Babylon.js/commit/a562a1e65d6d3e14302917cb431300fea58e8e10#diff-9559663657d125fa39095d417d2d99a6 Quote Link to comment Share on other sites More sharing options...
Spankied Posted October 23, 2018 Author Share Posted October 23, 2018 @Deltakosh Quote Link to comment Share on other sites More sharing options...
Guest Posted October 23, 2018 Share Posted October 23, 2018 No need to ping me I read all posts every morning. Spankied and Pryme8 1 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 23, 2018 Share Posted October 23, 2018 And this is a bug...Working on a fix Quote Link to comment Share on other sites More sharing options...
Guest Posted October 23, 2018 Share Posted October 23, 2018 Fixed! Will be in next nightly Spankied 1 Quote Link to comment Share on other sites More sharing options...
Spankied Posted October 23, 2018 Author Share Posted October 23, 2018 The buttons onPointerOutObservable now triggers the rectangles as well. This isnt intended behavior. @Deltakosh Quote Link to comment Share on other sites More sharing options...
Guest Posted October 24, 2018 Share Posted October 24, 2018 I'm just dead stupid...sorry about that I will fix it for next nightly (FOR GOOD this time) Quote Link to comment Share on other sites More sharing options...
Spankied Posted October 25, 2018 Author Share Posted October 25, 2018 This one gets ugly. Rectangle controls on Rectangles controls doesnt work, so I layer a StackPanel in between. This messes up the root rectangles onPointerOut observable. https://www.babylonjs-playground.com/#XQLXSI (with StackPanel) https://www.babylonjs-playground.com/#XQLXSI#1 (without) Check console logs, notice onPointerOut for PG with StackPanel is only triggered sometimes. Not sure under what conditions the rectangle control's onPointerOut is triggered. The second playground, rectangles on rectangles, is missing the 'Choose Option' header. Also, AdvancedDynamicTexture.clear() appears to do nothing. I expect it to behave similar to dispose? Trigger an onPointerOut to reproduce. https://www.babylonjs-playground.com/#URLPY2 (clear) https://www.babylonjs-playground.com/#URLPY2#1 (dispose) *cough* @Deltakosh *cough* Quote Link to comment Share on other sites More sharing options...
Guest Posted October 25, 2018 Share Posted October 25, 2018 So: - There is clear is inherited from DynamicTexture and will just clear the content but then the ADT is flagged as dirty and then render everything - This freaking PointerOut proved to be more complex than I initially though. I've send an update. Hopefully this will get better now Quote Link to comment Share on other sites More sharing options...
Spankied Posted October 25, 2018 Author Share Posted October 25, 2018 9 hours ago, Deltakosh said: - There is clear is inherited from DynamicTexture and will just clear the content but then the ADT is flagged as dirty and then render everything So should I dispose the ADT instead, and reinstantiate it everytime? I want to hide the Menu and get rid of the buttons onPointerOut. Also, can you look into why these button stay in hover state, even after pointer out. https://www.babylonjs-playground.com/#PUC95T @Deltakosh Quote Link to comment Share on other sites More sharing options...
Guest Posted October 26, 2018 Share Posted October 26, 2018 To hide it, just call ADT.rootContainer.isEnabled = false I unfortunately do not have time for the other question. So please fill an issue on the repo if you consider it is a bug Quote Link to comment Share on other sites More sharing options...
Guest Posted October 26, 2018 Share Posted October 26, 2018 Ok! i found time to check this one between two meetings! The problem is that the hover animation of a button will update the alpha of the button (from 1 to 0.9 and back to 0.9). And alpha in GUI is active only when you change it (so it is ignore if you don't touch it) I agree, it should be inherited but it is not the case for now So by default the rendering is done with 0.4 as the alpha is set by the container and the button does not overwrite it. But as soon as you hover it, the alpha is set and then the 0.4 is ignore and replace by 0.9 and 1 Does it make sense? Spankied 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 26, 2018 Share Posted October 26, 2018 Well you will now have the option to let alpha be an inherited value with BABYLON.GUI.Control.AllowAlphaInheritance = true; Quote Link to comment Share on other sites More sharing options...
Spankied Posted October 26, 2018 Author Share Posted October 26, 2018 45 minutes ago, Deltakosh said: Well you will now have the option to let alpha be an inherited value with BABYLON.GUI.Control.AllowAlphaInheritance = true; Took me a minute to understand. You are saying that it does switch from hover state back to its original alpha, which is .9 because it doesnt inherit the containers .4 ? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 29, 2018 Share Posted October 29, 2018 Correct Quote Link to comment Share on other sites More sharing options...
Spankied Posted October 29, 2018 Author Share Posted October 29, 2018 Will changing Control.AllowAlphaInheritance = true fix it. I've tried in the playground. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 30, 2018 Share Posted October 30, 2018 Yes it is here to let the alpha value flows through hiearchy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.