On 13/12/12 05:27, Sebastian Valenzuela wrote:
Hi again,

I've seen this in code before but I can't seem to find it! I have on/off
buttons that I'd like to be RED when they're off, and GREEN when they're
on. Does this require making a button disappear  Does anyone have
experience with this?

Attached.
Feel free to modify/adapt/hack :)

Lorenzo.
#N canvas 416 314 266 347 10;
#X obj 60 98 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 19 97 5 0 0 0 - - -;
#X obj 60 47 onoff;
#X obj 19 268 onoff;
#X floatatom 19 292 5 0 0 0 - - -;
#X text 16 151 you can set the on/off \; colours by sending a message
;
#X obj 87 98 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 114 98 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 133 98 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 114 71 sel 0 1;
#X text 136 239 <- default;
#X msg 40 240 on 16 \, off 13;
#X text 104 184 psychedelic;
#X msg 20 184 on 15 \, off 19;
#X text 120 208 pastel;
#X msg 33 211 on 6 \, off 3;
#X text 17 6 onoff: solid colour toggle GUI;
#N canvas 237 189 437 399 more 0;
#X obj 183 147 hsl 130 10 1 10 0 0 empty empty empty -2 -8 0 10 -204800
-1 -1 1433 1;
#X obj 270 157 onoff;
#X obj 180 157 onoff;
#X obj 195 157 onoff;
#X obj 210 157 onoff;
#X obj 225 157 onoff;
#X obj 240 157 onoff;
#X obj 255 157 onoff;
#X obj 12 155 sel 1 2 3 4 5 6 7 8 9;
#X obj 104 186 f;
#X obj 131 186 f;
#X obj 162 186 f;
#X obj 189 186 f;
#X obj 219 186 f;
#X obj 246 186 f;
#X obj 277 186 f;
#X obj 304 186 f;
#X obj 334 186 f;
#X obj 191 229 sel 1;
#X obj 149 340 *~;
#X obj 147 365 dac~;
#X msg 268 363 \; pd dsp \$1;
#X obj 268 339 onoff;
#X floatatom 12 113 5 0 0 0 - - -;
#X obj 12 49 f;
#X obj 12 69 mod 9;
#X obj 43 49 + 1;
#X obj 12 90 + 1;
#X obj 12 5 onoff 1 17;
#X obj 191 289 vline~;
#X obj 72 312 osc~ 150;
#X obj 244 83 loadbang;
#X msg 244 105 1;
#X obj 72 290 vline~;
#X obj 12 26 metro 200;
#X text 30 3 on/off;
#X msg 191 261 0.8 15 0 \, 0 80 15;
#X text 219 25 9 steps pattern;
#X obj 285 157 onoff;
#X obj 300 157 onoff;
#X msg 73 261 300 0 0 \, 20 80 0;
#X text 287 340 <- turn dsp on/off!;
#X connect 1 0 15 1;
#X connect 2 0 9 1;
#X connect 3 0 10 1;
#X connect 4 0 11 1;
#X connect 5 0 12 1;
#X connect 6 0 13 1;
#X connect 7 0 14 1;
#X connect 8 0 9 0;
#X connect 8 1 10 0;
#X connect 8 2 11 0;
#X connect 8 3 12 0;
#X connect 8 4 13 0;
#X connect 8 5 14 0;
#X connect 8 6 15 0;
#X connect 8 7 16 0;
#X connect 8 8 17 0;
#X connect 9 0 18 0;
#X connect 10 0 18 0;
#X connect 11 0 18 0;
#X connect 12 0 18 0;
#X connect 13 0 18 0;
#X connect 14 0 18 0;
#X connect 15 0 18 0;
#X connect 16 0 18 0;
#X connect 17 0 18 0;
#X connect 18 0 36 0;
#X connect 18 0 40 0;
#X connect 19 0 20 0;
#X connect 19 0 20 1;
#X connect 22 0 21 0;
#X connect 23 0 8 0;
#X connect 23 0 0 0;
#X connect 24 0 25 0;
#X connect 24 0 26 0;
#X connect 25 0 27 0;
#X connect 26 0 24 1;
#X connect 27 0 23 0;
#X connect 28 0 34 0;
#X connect 29 0 19 1;
#X connect 30 0 19 0;
#X connect 31 0 32 0;
#X connect 32 0 2 0;
#X connect 32 0 6 0;
#X connect 32 0 38 0;
#X connect 33 0 30 0;
#X connect 34 0 24 0;
#X connect 36 0 29 0;
#X connect 38 0 16 1;
#X connect 39 0 17 1;
#X connect 40 0 33 0;
#X restore 198 43 pd more;
#X text 121 294 Lorenzo Sutton 2009;
#X text 103 312 lorenzofsut...@gmail.com;
#X connect 2 0 1 0;
#X connect 2 0 0 0;
#X connect 2 0 6 0;
#X connect 2 0 9 0;
#X connect 3 0 4 0;
#X connect 9 0 7 0;
#X connect 9 1 8 0;
#X connect 11 0 3 0;
#X connect 13 0 3 0;
#X connect 15 0 3 0;
#N canvas 469 216 474 335 10;
#X obj -119 147 tgl 15 0 empty empty empty 17 7 0 10 -24198 -24198
-262144 1 1;
#X msg -19 255 color \$1 \$1 $;
#X obj -19 198 sel 0 1;
#X obj -19 228 f 13;
#X obj 15 228 f 16;
#X obj 158 20 loadbang;
#X obj 158 84 f \$1;
#X obj 212 84 f \$2;
#X obj 158 150 != 0;
#X obj 212 150 != 0;
#X obj 125 174 spigot;
#X obj 179 174 spigot;
#X msg 250 58 0;
#X obj -73 -11 inlet;
#X obj -119 286 outlet;
#X obj -73 20 route off on;
#X obj -19 176 f;
#X obj -75 47 t b f;
#X obj -33 47 t b f;
#X obj -19 279 s \$0-toggle;
#X obj -119 123 r \$0-toggle;
#X obj 13 47 s \$0-toggle;
#X text 7 13 send messages for \; on/off colours;
#X obj 250 83 s \$0-toggle;
#X connect 0 0 14 0;
#X connect 0 0 16 0;
#X connect 1 0 19 0;
#X connect 2 0 3 0;
#X connect 2 1 4 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
#X connect 5 0 6 0;
#X connect 5 0 7 0;
#X connect 5 0 12 0;
#X connect 6 0 8 0;
#X connect 6 0 10 0;
#X connect 7 0 9 0;
#X connect 7 0 11 0;
#X connect 8 0 10 1;
#X connect 9 0 11 1;
#X connect 10 0 3 1;
#X connect 11 0 4 1;
#X connect 12 0 23 0;
#X connect 13 0 15 0;
#X connect 15 0 17 0;
#X connect 15 1 18 0;
#X connect 15 2 21 0;
#X connect 16 0 2 0;
#X connect 17 0 16 0;
#X connect 17 1 6 0;
#X connect 18 0 16 0;
#X connect 18 1 7 0;
#X connect 20 0 0 0;
#X coords 0 -1 1 1 15 15 2 -119 147;
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to