var testDialog = { cDefaultGroup : 0, shape: func() { me.cDefaultGroup.createChild("path") .setColorFill(0,0,0) .setColor(0,0,0); }, label: func(desc,posx,posy,rot=0) { me.cDefaultGroup.createChild("text", desc) .setRotation(rot*0.0174532925) .setTranslation(posx,posy) .setAlignment("center-top") .setFont("typewriter.txf") .setFontSize(40,1.5) .setColor(0,0,0) .setText(desc); }, create_tbl: func(needle_tbl) { # hash table for needle positions for (var i=1; i<21; i = i+1) { var r0 = 150; var r1 = 350; var a0 = (i*4.5 - 1.5) * 0.0174533; var a1 = (i*4.5 + 1.5) * 0.0174533; var r3 = r1+8; var a3 = (a0 + a1)/2; var x1 = -r0 * math.cos(a0); var y1 = r0 * math.sin(a0); var x2 = -r1 * math.cos(a0); var y2 = r1 * math.sin(a0); var x3 = -r3 * math.cos(a3); var y3 = r3 * math.sin(a3); var x4 = -r1 * math.cos(a1); var y4 = r1 * math.sin(a1); var x5 = -r0 * math.cos(a1); var y5 = r0 * math.sin(a1); append(needle_tbl, [x1, y1, x2, y2, x3, y3, x4, y4, x5, y5]); } }, draw_vario: func(needles,needle_tbl,cx,cy) { var min = 0; var max = 20; needles.reset(); for (var i=min; i