0 Favourites

Buttons above allllllll the layers

  • Good morning awesome people!

    Im facing an annoying problem. I dont know if its a bug or if im doing something wrong, but the problem is that I have a side menu and when I open it, all the buttons in any other visible layer stays on top, covering my sidebar.

    I heard someone somewhere saying something about an CSS trick that would disable it but I researched and didnt find anything.

    I already tried a lot of stuff and the sidebar is on the top layer, Z order is correct, I tried creating more layers always letting the sidebar on the last one and also tried putting it on the bottom layers (I was desperated) and nothing happened.

    As a "fix" for it I used like a "pause" sprite, so when I click to open the sidebar, the big sprite comes and the layers goes invisible, but that is not the way I wanted it to work.

    Can someone help me?

    Thanks in advance

  • The sidebar is a sprite yeah? All html objects like the buttons are above the canvas, they'll always be on top, there's no way around it and this is expected behaviour.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • As plinkie has said, all form elements are rendered above the canvas, which is documented in the Manual so what you have is expected.

    The alternative maybe is to create your own 'sprite' buttons which will react as you want them to.

  • the buttons as above posters said.. are rendered above layers... but ... you can change their position out of the screen when their not needed... however creating a sprite button as zenox98 suggested wold be much helpful unless you want to use a css code to customize your button that way.

    but the problem will still remain... while the sprite buttons wold be probably on a different layer... they will still be visibile... no matter if its a sprite or button object.. you need in the end to move their position... and if you hide them behind a layer... and keep them there... users might click trough the options background unless you double check if its overlapped or not or some boolean is enabled.

    just use

    trigger once if menu show items 1 =1[/code:nb8v99ho] lets say  [code:nb8v99ho]setx to 30000-self.x[/code:nb8v99ho] whenever the time to show or hide is needed and will act as a boolean. cheers.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
49 6,348
PrinceofMars's avatar
Unread hot topic
0 Favourites
feature request: layer offset
45 2,493
lennaert's avatar
Unread hot topic
43 4,538
newt's avatar