diff --git a/gui/gui.c b/gui/gui.c index a386eb4..4b21f77 100644 --- a/gui/gui.c +++ b/gui/gui.c @@ -1,4 +1,4 @@ -/* $Id: gui.c,v 1.14 2013/02/28 23:19:59 steffen Exp $ */ +/* $Id: gui.c,v 1.15 2013/02/28 23:43:19 steffen Exp $ */ /*************************************************************************** * gui.c * @@ -91,6 +91,7 @@ void gui_draw () { draw_polygonadd (currentwin->w, 0); draw_polygonfinish (currentwin->screen, ls, color[COLOR_white][0], 1); gfx_draw_text (currentwin->screen, 4, 0, currentwin->title, &color[COLOR_white][3]); + if (currentwin->title[0] != 0) gfx_draw_line (currentwin->screen, 0, 18, currentwin->w, 18, ls); } /* draw items.. */ diff --git a/main/gui_config.c b/main/gui_config.c index 27deed4..a01d8e2 100644 --- a/main/gui_config.c +++ b/main/gui_config.c @@ -28,6 +28,7 @@ void gui_config_close (); void gui_config_seldir (); +void gui_config_gpsfile (); GUIWindow wcfg = {0}; @@ -37,6 +38,9 @@ GUIItem *gps_device = NULL; GUIItem *gps_list = NULL; GUIItem *gps_file = NULL; GUIItem *wcfg_close = NULL; +GUIItem *label1 = NULL; +GUIItem *label2 = NULL; + void gui_config_show () { if (wcfg.screen == NULL) gui_window_new (&wcfg, 220, 240, _("Config")); @@ -45,12 +49,26 @@ void gui_config_show () { wcfg.style = WGUI_S_VCENTER | WGUI_S_HCENTER; gui_show (&wcfg); - if (map_path == NULL) map_path = gui_entry_new (cfg.mappath, 5, 30, 155, 20); + + if (label1 == NULL) label1 = gui_label_new (_("mapdata path:"), 5, 20); + gui_window_item_add (&wcfg, label1); + if (map_path == NULL) map_path = gui_entry_new (cfg.mappath, 10, 36, 150, 20); gui_window_item_add (&wcfg, map_path); - if (map_seldir == NULL) map_seldir = gui_button_new (_("Browse"), 170, 30, 40, 20); + if (map_seldir == NULL) map_seldir = gui_button_new (_("Browse"), 170, 36, 40, 20); GUI_BUTTON_T (map_seldir)->callback_clicked = gui_config_seldir; gui_window_item_add (&wcfg, map_seldir); + + if (label2 == NULL) label2 = gui_label_new (_("gps device:"), 5, 66); + gui_window_item_add (&wcfg, label2); + if (gps_device == NULL) gps_device = gui_entry_new (cfg.gps_device, 10, 76, 150, 20); + gui_window_item_add (&wcfg, gps_device); + + if (gps_list == NULL) gps_list = gui_list_new (10, 106, 150, 60); + gui_window_item_add (&wcfg, gps_list); + if (gps_file == NULL) gps_file = gui_button_new (_("File"), 170, 106, 40, 20); + GUI_BUTTON_T (gps_file)->callback_clicked = gui_config_gpsfile; + gui_window_item_add (&wcfg, gps_file); }; @@ -63,3 +81,8 @@ void gui_config_seldir () { d_printf ("select dir..."); }; + +void gui_config_gpsfile () { + d_printf ("select gps file..."); +}; +