Commit 923d310e authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix stray bugs where "x" was still used to send hex colors to the GUI

parent 49113e97
......@@ -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... */
......
......@@ -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;
......
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment