From 923d310e72d6c882768516ef8e94ab74595ba432 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Wed, 23 Nov 2016 22:39:41 -0500 Subject: [PATCH] fix stray bugs where "x" was still used to send hex colors to the GUI --- pd/src/g_bang.c | 6 ++++-- pd/src/g_radio.c | 10 ++++++---- pd/src/g_toggle.c | 6 ++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/pd/src/g_bang.c b/pd/src/g_bang.c index 60b4b0ff9..c03552f87 100644 --- a/pd/src/g_bang.c +++ b/pd/src/g_bang.c @@ -87,11 +87,13 @@ void bng_draw_move(t_bng *x, t_glist *glist) void bng_draw_config(t_bng* x, t_glist* glist) { t_canvas *canvas=glist_getcanvas(glist); + char cbuf[8]; + sprintf(cbuf, "#%6.6x", x->x_flashed ? x->x_gui.x_fcol : x->x_gui.x_bcol); iemgui_base_draw_config(&x->x_gui); - gui_vmess("gui_bng_button_color", "xxx", + gui_vmess("gui_bng_button_color", "xxs", canvas, x, - x->x_flashed ? x->x_gui.x_fcol : x->x_gui.x_bcol); + cbuf); } /* we may no longer need h_dragon... */ diff --git a/pd/src/g_radio.c b/pd/src/g_radio.c index f85a4a83f..b04d85b69 100644 --- a/pd/src/g_radio.c +++ b/pd/src/g_radio.c @@ -26,12 +26,14 @@ t_class *vradio_class, *vradio_old_class; void radio_draw_update(t_gobj *client, t_glist *glist) { t_radio *x = (t_radio *)client; + char cbuf[8]; + sprintf(cbuf, "#%6.6x", x->x_gui.x_fcol); if (!glist_isvisible(glist)) return; t_canvas *canvas=glist_getcanvas(glist); - gui_vmess("gui_radio_update", "xxxii", + gui_vmess("gui_radio_update", "xxsii", canvas, x, - x->x_gui.x_fcol, + cbuf, x->x_drawn, x->x_on); x->x_drawn = x->x_on; @@ -70,9 +72,9 @@ void radio_draw_new(t_radio *x, t_glist *glist) gui_vmess("gui_radio_new", "xxiiiiiii", canvas, x, xi, y1, xi, y1+d, i, x1, y1); } - gui_vmess("gui_radio_create_buttons", "xxxiiiiiiii", + gui_vmess("gui_radio_create_buttons", "xxsiiiiiiii", canvas, x, - x->x_gui.x_fcol, + cbuf, xi+s, y1+s, xi+d-s, yi+d-s, x1, y1, i, x->x_on==i); xi += d; x->x_drawn = x->x_on; diff --git a/pd/src/g_toggle.c b/pd/src/g_toggle.c index 41812f2a4..c5de31838 100644 --- a/pd/src/g_toggle.c +++ b/pd/src/g_toggle.c @@ -20,13 +20,15 @@ static t_class *toggle_class; void toggle_draw_update(t_gobj *xgobj, t_glist *glist) { t_toggle *x = (t_toggle *)xgobj; + char cbuf[8]; + sprintf(cbuf, "#%6.6x", x->x_gui.x_fcol); if (x->x_gui.x_changed) { if(glist_isvisible(glist_getcanvas(glist))) { t_canvas *canvas=glist_getcanvas(glist); - gui_vmess("gui_toggle_update", "xxix", canvas, - x, x->x_on != 0.0, x->x_gui.x_fcol); + gui_vmess("gui_toggle_update", "xxis", canvas, + x, x->x_on != 0.0, cbuf); } x->x_gui.x_changed = 0; } -- GitLab