Commit 295bd13a authored by user's avatar user
Browse files

fixed bug with nbox displacement

parent 79ba1e6e
......@@ -2344,10 +2344,10 @@ function gui_toggle_update(cid, tag, state, color) {
}
// Todo: send fewer parameters from c
function gui_create_numbox(width,cid,tag,bgcolor,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,basex,basey,half) {
gui_post("numbox width is " + width);
function gui_create_numbox(width,cid,tag,bgcolor,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,basex,basey,half, is_toplevel) {
gui_post("basex is " + basex + " and basey is " + basey);
// numbox doesn't have a standard iemgui border, so we must create its gobj manually
var g = gui_text_create_gobj(cid, tag, basex, basey)
var g = gui_text_create_gobj(cid, tag, "iemgui", basex, basey, is_toplevel)
var data_array = ['M', p1 - basex, p2 - basey,
'L', p3 - basex, p4 - basey,
p5 - basex, p6 - basey,
......
......@@ -176,9 +176,10 @@ static void my_numbox_draw_new(t_my_numbox *x, t_glist *glist)
// canvas, x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2,
// x->x_hide_frame <= 1 ? "$pd_colors(iemgui_border)" : bcol,
// bcol, x, x);
gui_vmess("gui_create_numbox", "isssiiiiiiiiiiiii", x->x_numwidth,
gui_vmess("gui_create_numbox", "isssiiiiiiiiiiiiii", x->x_numwidth,
canvas_tag(canvas), gobj_tag(x),
bcol, x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1, half);
bcol, x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1, half,
glist_istoplevel(canvas));
/* Not sure when it is necessary to hide the frame... */
if (!x->x_hide_frame || x->x_hide_frame == 2)
sys_vgui(".x%lx.c create polyline %d %d %d %d %d %d -stroke #%6.6x "
......
Markdown is supported
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