Jump to content

GUI - button state after event


Dad72
 Share

Recommended Posts

When you have an event that opens a modal window, the button has strange behavior.

On my scene locally, I open popop modal windows after a click. But after several clicks the button it gradually becomes transparent to become invisible (the text is ok).
Then all the other buttons after some clicks gradually become invisible.

The button that are in containers (rectangle) do not have this problem.

On the PG, I use an alert () and the result is different, the button this resize progressively. I think both are binding problem and changes the button state after a blocking event (alert, prompt, popop modal ...)

https://www.babylonjs-playground.com/#U9AC0N#5

Link to comment
Share on other sites

Yes, it works on PG in the case of alert. But in case of one modal popup, my button becomes transparent progressively has every click.

In made it takes the value of the over of the button and has every click, the button reduces its opacity of the value of the over, I do not know why

Link to comment
Share on other sites

When I look at the value of the button after every click, _alpha lose from 0.1 to 0.1.

What can cause it? Inside a rectangle, I do not have this error.

Quote

 {name: "Profil", _alpha: 0.9, _zIndex: 0, _currentMeasure: t, _fontFamily: "Arial"…}
{name: "Profil", _alpha: 0.8, _zIndex: 0, _currentMeasure: t, _fontFamily: "Arial"…} 

To regulate the probleme, I force the value alpha to 1.0 after every click in event

this.profil.alpha = 1.0;

Link to comment
Share on other sites

I did a PR avoiding the alpha of decrement to every click. 

Because when you open a modal window with jQuery, hover out the event is not triggered, and alpha does not return to its original position.

Maybe an event such as "Focus out" (onFocusOutObservable) on alpha to its initial state to correct this problem. But I do not know how.

https://github.com/BabylonJS/Babylon.js/pull/2262

Link to comment
Share on other sites

Yes PG do not want my link

I use jquery.modal.min.js

https://www.babylonjs-playground.com/#U9AC0N#12

My server is not with https, If I put https I : Failed to load resource: net::ERR_INSECURE_RESPONSE

As I said above, I bypass the problem by putting the APHA has 1.0 in the event. But I'm sure another event such as loss of focus could be added for add alpha of button a 1.0. No need to do a PG for it

 

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...