Opacity of Button

Get help using Construct 2

Post » Thu Oct 29, 2015 9:40 am

Hello all,

I am working on one of the endless Runner Game. I am about to complete the Game but facing one minor problem. I am new to Construct 2. I am using the single textures for Menu screen with Play button and Game Over Screen with Replay button. For the button clicked event i have to use the button object in the Construct 2 Game engine and i am using it. But the thing is that inbuilt Buttons are visible with default color or pattern. I want that inbuilt button will not be visible but the click event for that button should work or to make the opacity of button to zero but its event will work. Thanks in advance.
B
4
Posts: 12
Reputation: 229

Post » Thu Oct 29, 2015 12:47 pm

You can style the button-object with css...
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Oct 30, 2015 4:24 am

If you use the default button as a button you can't without using LittleStain's method, if you set it enabled but invisible it is still not accessible.

However, If you use a sprite as a button you can set its opacity to 0 and use an on-mouse click type event and it works as you are wanting.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
68
S
17
G
8
Posts: 637
Reputation: 9,420

Post » Fri Oct 30, 2015 3:49 pm

Change the 'button-object' CSS color attributes to "transparent"

Set CSS style "color" to "transparent"
Set CSS style "background-color" to "transparent"
Set CSS style "border-color" to "transparent"

Or just use a transparent sprite?
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Mon Nov 02, 2015 9:26 am

Thanks to all. I have used the technique of sprites as a buttons and apply On Touch event on that and it is working fine.
B
4
Posts: 12
Reputation: 229


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests