Is there any way to hide buttons?

0 favourites
  • 6 posts
From the Asset Store
Make your game more fun and interactive with the Dog Hide and Seek Buttons Sprite Sheet.
  • I noticed that UI buttons seem to force themselves always to the top of the screen, no matter what the z elevation of their layer is. Problem is, I need to hide the buttons somehow. From the artist, I got some hand drawn sprites that are supposed to be the "pretty" side of the button, but I do need the UI button to, because this element can be found by the screenreader.

    Is there any way to hide the buttons behind pretty artworks?

    I tried setting the opacity, but it did nothing.

    When I move the buttons outside of the view, the screenreader won't find them anymore.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Form objects always draw on top of the canvas, which is a bit annoying to work with.

    Though you can do any of these options:

    1-Set them invisible

    2-Change their positions to OffScreen

    3-Make your own buttons with sprites to avoid all those problems and have full control of opacity, Z-order, etc... (This is the option that I normally use) Note: (They will be still interactive though if you click on them so best make a boolean "Active" = OFF)

    4-Use CSS to customize the form objects

  • Thank you for your replies. I made the buttons invisible, but that made them also not clickable.

    Unfortunately, I can neither position the buttons off screen, nor make my own solution, since I need the elements to be useable with the screenreader. As far as I know, I can only do that with the form buttons.

    Would it be possible to make them transparent while still useable with css?

  • So I found kind of a workaround by making a selfmade button from a sprite and hiding the form button in a colored area, making it 0,1 x 0,1 pixel in size the same color as the area on the sprite. It looks like transparent buttons are not a thing. Luckily, the size does not matter for the screenreader to find it.

  • I made the buttons invisible, but that made them also not clickable

    Sorry that was for if you're using normal sprites as buttons they will be interactive, I made a mistake and swapped them over)) I just corrected it.

    Glad you found a solution

  • I may have just found the intended solution. Put all your buttons on their own layer. Select the layer, and there should be an option in the layer options for an HTML Elements layer. This allows sprites to be displayed over buttons and you can still click them. I haven't yet explored the feature too much, but it seems to work perfectly so far.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)