Howcome invisible button enabled doesn't work?

Get help using Construct 2

Post » Wed Oct 28, 2015 3:44 pm

I try to make an invisible button, I set initial visibility - invisible, ENABLED YES but it does not work.
What is the point of enabled, if when it is invisible it does not work?
Man this program =/ this program I paid money for.
B
10
S
4
G
3
Posts: 223
Reputation: 3,458

Post » Wed Oct 28, 2015 4:02 pm

Instead of setting it invisible you could offcourse just set the css style..
Being able to set the button enabled and disabled seems like a good function to have..

But if this is of no use to you, why not create your own buttons with sprites?

Man!! this program you paid for can do so much!!!
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 » Wed Oct 28, 2015 4:15 pm

Couldn't you make a sprite as a button and set it as invisible?
Use on click object condition should trigger the action, even when it is invisible.
It's time for me to return the favor :)
B
32
S
9
G
8
Posts: 132
Reputation: 4,870

Post » Wed Oct 28, 2015 6:59 pm

On click is no good. See I am trying to cover other buttons up so they are unclickable, if object is clickable it does not disable this, but a button in front makes it so you can't click my custom buttons behind it. Otherwise I am going to have to code some disable button enable buttons when menu is up nonsense. Putting a button in front of everything sounded easier. But if it is a sprite with on click event it would not do this.
B
10
S
4
G
3
Posts: 223
Reputation: 3,458

Post » Wed Oct 28, 2015 7:15 pm

cs2curious wrote:On click is no good. See I am trying to cover other buttons up so they are unclickable, if object is clickable it does not disable this, but a button in front makes it so you can't click my custom buttons behind it. Otherwise I am going to have to code some disable button enable buttons when menu is up nonsense. Putting a button in front of everything sounded easier. But if it is a sprite with on click event it would not do this.


I'm not sure what you are trying to do and why you want to do it in a way that is obviously very strange (and not working), but good luck..

If you want to do it in a logical way, maybe we'd be able to help you better..
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 » Wed Oct 28, 2015 7:39 pm

how is that not logical? i want to not click buttons so i put a big button on top of it. It would work like a charm if i could just make the button invisible but still active. That is that is not logical. invisible = not active?
B
10
S
4
G
3
Posts: 223
Reputation: 3,458

Post » Wed Oct 28, 2015 7:47 pm

Condition
Is button visible
Button on clicked
Action
Do something
Condition
Else
Action
Leave blank
www.h1k3.tech

We are here for you!
B
87
S
22
G
16
Posts: 715
Reputation: 16,785

Post » Wed Oct 28, 2015 7:49 pm

cs2curious wrote:how is that not logical? i want to not click buttons so i put a big button on top of it. It would work like a charm if i could just make the button invisible but still active. That is that is not logical. invisible = not active?


Like I said.. You could use CSS to make the button transparant..
That way it still works..

So there is a simple solution to your "problem"..

The button-object is not a canvas-element, but a DOM-element, these work differently..
As such an invisible button is a button that isn't really there..
Replacing the button with canvas-elements like sprites would solve this, but somehow that is not what you want..

Solution:
Use 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


Return to How do I....?

Who is online

Users browsing this forum: HenryPK and 12 guests