We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Pointer Events in Puzzles

Home Forums Puzzles Pointer Events in Puzzles

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #43064
    jdhutchinson
    Customer

    https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events

    can we have the ability to set pointer events in a puzzle?

    #43066
    xeon
    Customer

    Aren’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

    #43068
    GlifTek
    Customer
    #43070
    jdhutchinson
    Customer

    What 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?

    #43074
    xeon
    Customer

    if 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 true

    within you onclick event
    you have an if statement

    if abletoclick is true
    then do some stuff
    end if

    Within 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)
    return

    If 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.