When I click on the button, a new widget is created on top of the past, how do I make the last widget not active while the new one is open?
Not sure what colesseum widget is.
If you are holding reference to old widget, you can simply use βRemove From Parentβ node.
I need the last widget to be visible, but the buttons in it were not active when the widget was opened on top of it.
Thats also easy, when you push the new widget, or the existing one becomes βoldβ, you simply need to set its buttons to
not enabled or you can simply change visiblity to Not Hit Testable, which will be still visible but not clickable.
Thank you, Iβll try it now
Sorry for the delay, unfortunately, I will be able to respond tomorrow, I have a problem that after hiding it, it does not appear, tomorrow I will add screenshots.
In kration, when you click on a button in the widget (1), it is hidden, but when you click any button in the newly opened widget (2), which leads to closing it, the widget (1) does not become clickable.
Hello, I was able to make the widget non-clickable, but I canβt return it to its previous state, I need to return it to its previous state from another widget.
If you need screenshots, please write about it.
Do you understand Russian?
No donβt understand Russian, screen shot would be great.
If you hold the child widget reference in parent, you can just set from parent again.
There is many ways to do it.
Like you can bind visibility state of each widget to Focus.
OnFocus you set Visible
OnFocusLost you set NonHit.
You can set focus when you spawn and remove widgets etc. a screen shot maybe can help to provide a better answer.
This action takes place in a widget that should become non-clickable.
This is already in the widget that is created from a non-clickable one(here I make a variable for a non-clickable widget)
Here I change the visibility to standard when closing the widget.
I hope they can help you
So letβs say we do this widget creations from the PlayerCharacter. Can be something else like controller in a bigger system.
I create a main hud this is basically just an empty canvas with one function (see 2.nd image)
I add 2 widgets inside that have a button inside nothing else.
Eachtime a widget added or removed i run this initilize function so that the clickability automatically arranged to the last visible one. (Or however you want)
Here is the simple widgets that is added to screen. They do nothing but onclick remove themselves.
On Destroy they run re inilize event on their parent which is HUD.
Hud checks its children makes the last item on array visible , clickable.
Thank you, Iβll try it now