removed test code + removed unused variables
This commit is contained in:
parent
ace72d41a9
commit
0db2c191bf
12
demo/xlib.c
12
demo/xlib.c
@ -476,10 +476,8 @@ main(int argc, char *argv[])
|
|||||||
struct gui_canvas canvas;
|
struct gui_canvas canvas;
|
||||||
struct gui_command_buffer buffer;
|
struct gui_command_buffer buffer;
|
||||||
struct gui_command_list list;
|
struct gui_command_list list;
|
||||||
struct gui_panel_stack stack;
|
|
||||||
struct gui_panel_layout layout;
|
struct gui_panel_layout layout;
|
||||||
struct gui_window win;
|
struct gui_panel panel;
|
||||||
struct gui_window msg;
|
|
||||||
|
|
||||||
/* Window */
|
/* Window */
|
||||||
UNUSED(argc); UNUSED(argv);
|
UNUSED(argc); UNUSED(argv);
|
||||||
@ -514,12 +512,10 @@ main(int argc, char *argv[])
|
|||||||
font.height = (gui_float)xfont->height;
|
font.height = (gui_float)xfont->height;
|
||||||
font.width = font_get_text_width;
|
font.width = font_get_text_width;
|
||||||
gui_default_config(&config);
|
gui_default_config(&config);
|
||||||
gui_stack_clear(&stack);
|
gui_panel_init(&panel, 50, 50, 420, 300,
|
||||||
gui_panel_init(&win.panel, 50, 50, 420, 300,
|
|
||||||
GUI_PANEL_BORDER|GUI_PANEL_MOVEABLE|
|
GUI_PANEL_BORDER|GUI_PANEL_MOVEABLE|
|
||||||
GUI_PANEL_CLOSEABLE|GUI_PANEL_SCALEABLE|
|
GUI_PANEL_CLOSEABLE|GUI_PANEL_SCALEABLE|
|
||||||
GUI_PANEL_MINIMIZABLE, &config, &font);
|
GUI_PANEL_MINIMIZABLE, &config, &font);
|
||||||
gui_stack_push(&stack, &win.panel);
|
|
||||||
|
|
||||||
/* Demo */
|
/* Demo */
|
||||||
memset(&demo, 0, sizeof(demo));
|
memset(&demo, 0, sizeof(demo));
|
||||||
@ -546,9 +542,9 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* GUI */
|
/* GUI */
|
||||||
gui_buffer_begin(&canvas, &buffer, xw.width, xw.height);
|
gui_buffer_begin(&canvas, &buffer, xw.width, xw.height);
|
||||||
running = gui_panel_begin_stacked(&layout, &win.panel, &stack, "Demo", &canvas, &in);
|
running = gui_panel_begin(&layout, &panel, "Demo", &canvas, &in);
|
||||||
demo_panel(&layout, &demo);
|
demo_panel(&layout, &demo);
|
||||||
gui_panel_end(&layout, &win.panel);
|
gui_panel_end(&layout, &panel);
|
||||||
gui_buffer_end(&list, &buffer, &canvas, &status);
|
gui_buffer_end(&list, &buffer, &canvas, &status);
|
||||||
|
|
||||||
/* Draw */
|
/* Draw */
|
||||||
|
2
gui.c
2
gui.c
@ -348,8 +348,6 @@ gui_do_button(const struct gui_canvas *canvas, gui_float x, gui_float y, gui_flo
|
|||||||
{
|
{
|
||||||
gui_bool ret = gui_false;
|
gui_bool ret = gui_false;
|
||||||
struct gui_color background;
|
struct gui_color background;
|
||||||
struct gui_color highlight;
|
|
||||||
struct gui_rect inner;
|
|
||||||
|
|
||||||
assert(button);
|
assert(button);
|
||||||
if (!button)
|
if (!button)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user