Bug or feature. loop and oninterrupt
-
-
Hi,
what are you trying to do?
That current code can't work - the loop() action is 'synchronous' - that means the code will loop as long as the given condition is set, but during that loop nothing from 'outside' can happen, so the hovering value can never change. The additional oninterrupt+wait and are looking a bit strange...
There exists probably a better and more correct solution for your case ;-).
Best regards,
Klaus -
Hi Klaus! )
This realization of tooltips.
While the cursor is over the layer - layer[hint].visible, true
At this time, "loop" is blocking the code - layer[hint].visible, false
Once the cursor fled (hovering=false), running - layer[hint].visible, false
But I want to be able to interrupt the "loop" by clicking.
All code runs through "onover". -
Hi,
why not using the included tooltips example as reference?
And why setting visible constantly to true during the loop?
Normally once would be enough...How is 'interrupting by click' during the hovering meant?
Maybe have a look at the asyncloop action:
https://krpano.com/docu/actions/#asyncloopThere you could do something like that:
where:
#1 = the code that should be called when the hovering starts
#2 = the code that should be called during the hovering every frame
#3 = the code that should be called when the hovering endsBest regards,
Klaus -
Klaus, thank you very much for your help!
"asyncloop" *doneactions - This is what I need.
I have a not trivial task, so needs its own implementation "tooltips"
By the way "doneactions" emerged recently seems, had not seen this feature. -
By the way "doneactions" emerged recently seems, had not seen this feature.
That depends how you define 'recently' - this was added in version 1.16
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!