- This topic has 4 replies, 3 voices, and was last updated 3 years, 3 months ago by xeon.
-
AuthorPosts
-
2021-07-20 at 9:27 pm #43064jdhutchinsonCustomer
https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events
can we have the ability to set pointer events in a puzzle?
2021-07-20 at 10:05 pm #43066xeonCustomerAren’t pointer-events still experimental in most browsers? I just tried in Chrome 91 and they are only partially working and tried in Safari 14.1.1 and they are not supported at all. Not saying it would not be a good feature…as it would.
But if you need this functionality now, you can control SVGs through CSS and images through HTML to make them clickable. You could create a set of environment properties that would be read by the parent window and depending on their flag state change the item to be clickable or not and of course change other properties as well. Just have to monitor the number of EventListeners as that can slow performance.
I personally don’t use the puzzles to do any HTML because of the lack of EventListner control but someone on here might have a good method to do it. Good luck.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-07-20 at 11:34 pm #43068GLiFTeKCustomerhttps://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events
can we have the ability to set pointer events in a puzzle?
You can use the event puzzle(s)
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2021-07-21 at 12:00 am #43070jdhutchinsonCustomerWhat I wanted to do was temporarily disable click events for a certain element, during a procedure. Then allow them again (auto) after the procedure has ran.
I think the CSS create rule puzzle is the key, but it is somewhat ambiguous. If I then want to amend this rule I have created, do I need to lay down another create puzzle, with the same name, and hope the properties get overwritten?
2021-07-21 at 4:02 am #43074xeonCustomerif you want to have a click event controlled by a procedure for an object in your scene this can be done with puzzles.
at start, set a flag for the condition ie. var: abletoclick
set abletoclick to truewithin you onclick event
you have an if statementif abletoclick is true
then do some stuff
end ifWithin your procedure:
set abletoclick to false ( makes it so you cant click while puzzle processing)
some puzzle stuff
set abletoclick to true (done with the procedure, reset it to true)
returnIf your element is a HTML button in a parent window then you will need
to use the “on event click” instead of the onclick.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com -
AuthorPosts
- You must be logged in to reply to this topic.