'Panels' of buttons

Get help using Construct 2

Post » Thu Jun 20, 2013 11:46 pm

Is it possible to have a 'panel' of objects become visible / invisible and enabled and disabled on one go?

I have a panel of 6 buttons that are invisible and disabled at the start, the user clicks a different button and all six become visible and active.

At the moment I'm doing them all one by one:-

Touch > on touch start button
.............. Button 1 > Visible
.............. Button 2 > Visible
.............. Button 3 > Visible
...
...

Is there a way to group them so I can set them all in one go?Nickydude2013-06-20 23:46:40
B
72
S
25
G
9
Posts: 383
Reputation: 10,661

Post » Fri Jun 21, 2013 12:09 am

@Nickydude
if all appear and disappear as one then
make family of buttons then make family visible/invisible
B
40
S
12
G
6
Posts: 136
Reputation: 6,347

Post » Fri Jun 21, 2013 12:22 am

Yep, Families would be the best route, but for those working with the free version, you could create a "Visible" instance variable and use For each to iterate through each to hide/show.

Example: show-hide-buttons.capx
B
126
S
7
G
4
Posts: 185
Reputation: 7,233

Post » Fri Jun 21, 2013 12:23 am

Awesome DrGreenThumbCAN! now is there a way to disable them as I can still 'press' them even though they are invisible. Would i have to move the buttons off screen when invisible?
B
72
S
25
G
9
Posts: 383
Reputation: 10,661

Post » Fri Jun 21, 2013 2:55 am

@Nickydude
do you have a capx that I can look at to see how to help?
could be as simple as adding a condition that checks to see if family (buttons) is visible.
B
40
S
12
G
6
Posts: 136
Reputation: 6,347

Post » Fri Jun 21, 2013 12:00 pm

Sure.

https://dl.dropboxusercontent.com/u/2485349/DiceRoller.capx

There are 6 large buttons in the middle of the screen that start invisible until the BEGIN TURN text is clicked at the top, then they become visible but you can still click them when they're invisible.
B
72
S
25
G
9
Posts: 383
Reputation: 10,661

Post » Fri Jun 21, 2013 2:42 pm

@Nickydude
work today but if not ninja'd I'll help you tonight after work
sorry for delay
B
40
S
12
G
6
Posts: 136
Reputation: 6,347

Post » Fri Jun 21, 2013 3:35 pm

All you have to do is add the condition is visible:

-Is touching
-Dicebuttons is visible
-System trigger onceLittleStain2013-06-21 15:36:59
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 Jun 21, 2013 3:56 pm

Thanks LittleStain, that did the job!
B
72
S
25
G
9
Posts: 383
Reputation: 10,661

Post » Fri Jun 21, 2013 4:08 pm

@Nickydude
guess was ninja'd sorry
can't use C2 at work to help
hope works out for you
B
40
S
12
G
6
Posts: 136
Reputation: 6,347

Next

Return to How do I....?

Who is online

Users browsing this forum: Artpunk, kiugetski, RealMagisterLudi and 9 guests