diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/button.c | 9 | ||||
-rw-r--r-- | gui/fatom.h | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gui/button.c b/gui/button.c index 311f49c..c658fcd 100644 --- a/gui/button.c +++ b/gui/button.c @@ -61,14 +61,14 @@ static void draw_inlets(t_button *x, t_glist *glist, int firsttime, int nin, int if (firsttime) sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xi%d\n", glist_getcanvas(glist), - onset, text_ypix(&x->x_obj, glist)-2, - onset + IOWIDTH, text_ypix(&x->x_obj, glist)-1, + onset, text_ypix(&x->x_obj, glist), + onset + IOWIDTH, text_ypix(&x->x_obj, glist)+5, x, i); else sys_vgui(".x%x.c coords %xi%d %d %d %d %d\n", glist_getcanvas(glist), x, i, - onset, text_ypix(&x->x_obj, glist)-2, - onset + IOWIDTH, text_ypix(&x->x_obj, glist)-1); + onset, text_ypix(&x->x_obj, glist), + onset + IOWIDTH, text_ypix(&x->x_obj, glist)+5); } DEBUG(post("draw inlet end");) @@ -108,6 +108,7 @@ static void create_widget(t_button *x, t_glist *glist) sys_vgui("button .x%x.c.s%x \ -height %d \ + -font -text \"%s\" \ -command button_cb%x\n",canvas,x, x->x_height,text, diff --git a/gui/fatom.h b/gui/fatom.h index 6cba41c..8c0854e 100644 --- a/gui/fatom.h +++ b/gui/fatom.h @@ -334,6 +334,11 @@ static void fatom_float(t_fatom* x,t_floatarg f) outlet_float(x->x_obj.ob_outlet,f); } +static void fatom_bang(t_fatom* x,t_floatarg f) +{ + outlet_float(x->x_obj.ob_outlet,x->x_val); +} + static void fatom_f(t_fatom* x,t_floatarg f) { x->x_val = f; @@ -396,6 +401,7 @@ void fatom_setup_common(t_class* class) { class_addfloat(class, (t_method)fatom_float); + class_addbang(class, (t_method)fatom_bang); class_addmethod(class, (t_method)fatom_f, gensym("f"), A_FLOAT, 0); |