Buttons above allllllll the layers

Get help using Construct 2

Post » Tue Nov 29, 2016 11:06 am

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

Posts: 23
Reputation: 555

Post » Tue Nov 29, 2016 1:21 pm

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.
Posts: 2,421
Reputation: 55,530

Post » Tue Nov 29, 2016 1:54 pm

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.
If your vision so exceeds your ability, then look to something closer.
Posts: 5,911
Reputation: 62,587

Post » Tue Nov 29, 2016 1:56 pm

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
Code: Select all
trigger once if menu show items 1 =1
lets say
Code: Select all
setx to 30000-self.x
whenever the time to show or hide is needed and will act as a boolean. cheers.
Posts: 1,440
Reputation: 47,805

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests