> It comes from here:

http://www.w3schools.com/jquerymobile/jquerymobile_form_sliders.asp

Here's a prototype using the new data structure [draw] commands 
I mentioned.  (Attached)
* If I was going to turn this into a real GUI widget, I'd add a field 
to the [struct] to store the slider value.  Then I could create lots 
of sliders with different values.  It's also possible to add fields to 
control the scaling, rotation, colors, etc.
* Changing the glow color when dragging is a bit tricky compared to CSS. 
I probably need some extra event types to specify the beginning and end 
of the drag event* Obviously adding text is trickier. CSS basically exists to 
gracefully 
handle text-flow* You can right-click the scalar and choose "Properties" to 
change the 
fields.

-Jonathan
   
#N struct slider float x float y;
#N canvas 219 156 713 508 10;
#X obj 26 20 struct slider float x float y;
#X scalar slider 42 69 \;;
#N canvas 483 144 450 346 (subpatch) 0;
#X obj 249 131 draw rect 400 15;
#X obj 14 110 route drag;
#X obj 83 159 +;
#X msg 60 57 x \$1;
#X obj 83 181 max 0;
#X obj 83 203 min 375;
#X obj 14 7 loadbang;
#X msg 83 271 x \$1;
#X obj 83 249 - 3;
#X msg 123 309 rx 6 \, ry 6 \, fill blue \, opacity 0.3;
#X msg 14 30 rx 6 \, ry 6 \, stroke-width 1 \, stroke black \, fill
white \, drag 1;
#X obj 83 226 trigger anything anything anything;
#X obj 123 286 loadbang;
#X obj 249 67 loadbang;
#X text 147 88 <- button;
#X text 261 334 <- glow;
#X text 355 129 <- background;
#X obj 249 153 print;
#X msg 249 94 rx 6 \, ry 6 \, fill white \, stroke-width 1 \, stroke
black \, mousedown 1;
#X obj 123 334 draw rect 31 31 0 -8;
#X obj 14 88 draw rect 25 25 3 -5;
#X obj 14 132 unpack p 0 0 0 0;
#X connect 0 0 17 0;
#X connect 1 0 21 0;
#X connect 2 0 4 0;
#X connect 3 0 20 0;
#X connect 4 0 5 0;
#X connect 5 0 11 0;
#X connect 6 0 10 0;
#X connect 7 0 19 0;
#X connect 8 0 7 0;
#X connect 9 0 19 0;
#X connect 10 0 20 0;
#X connect 11 0 8 0;
#X connect 11 1 2 1;
#X connect 11 2 3 0;
#X connect 12 0 9 0;
#X connect 13 0 18 0;
#X connect 18 0 0 0;
#X connect 20 0 1 0;
#X connect 21 3 2 0;
#X restore 135 343 draw g;
#X obj 135 121 vradio 15 0 0 3 empty empty empty 0 -8 0 10 -262144
-1 -1 0;
#X obj 135 171 * 0.25;
#X msg 135 193 1 \$1;
#X obj 135 215 -;
#X msg 135 318 transform scale \$1 rotate \$2;
#X obj 135 295 pack;
#X floatatom 281 223 5 0 0 0 - - -, f 5;
#X obj 251 244 t b a;
#X obj 251 121 vradio 15 0 0 2 empty empty empty 0 -8 0 10 -262144
-1 -1 0;
#X msg 251 178 \$1 250;
#X obj 251 200 line;
#X obj 251 156 * 90;
#X text 155 118 big;
#X text 155 150 small;
#X text 155 135 medium;
#X text 273 134 vertical;
#X text 273 119 horizontal;
#X text 180 344 <- shapes and events in here;
#X text 278 445 2017 Jonathan Wilkes;
#X msg 135 237 \$1 250;
#X obj 135 259 line 1;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 22 0;
#X connect 7 0 2 0;
#X connect 8 0 7 0;
#X connect 9 0 10 0;
#X connect 10 0 8 0;
#X connect 10 1 8 1;
#X connect 11 0 14 0;
#X connect 12 0 13 0;
#X connect 13 0 10 0;
#X connect 14 0 12 0;
#X connect 22 0 23 0;
#X connect 23 0 8 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to