<URL: http://bugs.freeciv.org/Ticket/Display.html?id=37211 >
> [EMAIL PROTECTED] - Mi 28. Feb 2007, 21:33:50]: > > Hello freeciv-team, > > I'd like to report some missing features/bugs in the sdl-client for > freeciv 2.10-beta3. > > * in the finance screen (the $-sign on the panel on the bottom right), it's > impossible to move the tax/research sliders, and thus impossible to set > the tax rate > > * it's impossible to allocate the peasants in the city screen (in order to > use different squares, as possible in the gtk2 client) > > * the client seems to lack a "connect with road" option for settlers to > automatically connect two points with a road/railroad > > Great client otherwise =) > > Regards, > Konstantin > > Patch attached.
Index: client/gui-sdl/citydlg.c =================================================================== --- client/gui-sdl/citydlg.c (Revision 12699) +++ client/gui-sdl/citydlg.c (Arbeitskopie) @@ -1579,8 +1579,8 @@ int col, row; if (canvas_to_city_pos(&col, &row, - 1/city_map_zoom * (Main.event.motion.x - pMap->size.x), - 1/city_map_zoom * (Main.event.motion.y - pMap->size.y))) { + 1/city_map_zoom * (Main.event.motion.x - pMap->dst->dest_rect.x - pMap->size.x), + 1/city_map_zoom * (Main.event.motion.y - pMap->dst->dest_rect.y - pMap->size.y))) { city_toggle_worker(pCityDlg->pCity, col, row); } Index: client/gui-sdl/repodlgs.c =================================================================== --- client/gui-sdl/repodlgs.c (Revision 12699) +++ client/gui-sdl/repodlgs.c (Arbeitskopie) @@ -1094,6 +1094,8 @@ char cBuf[8]; int dir, inc, x, *buf_rate = NULL; + pMotionEvent->x -= pMotion->pHoriz_Src->dst->dest_rect.x; + if ((abs(pMotionEvent->x - pMotion->x) > 7) && (pMotionEvent->x >= pMotion->min) && (pMotionEvent->x <= pMotion->max)) { Index: client/gui-sdl/menu.c =================================================================== --- client/gui-sdl/menu.c (Revision 12688) +++ client/gui-sdl/menu.c (Arbeitskopie) @@ -151,12 +151,15 @@ case ID_UNIT_ORDER_AUTO_EXPLORE: key_unit_auto_explore(); break; - case ID_UNIT_ORDER_CONNECT: -#if 0 - /* TODO: different connect types */ - key_unit_connect(); -#endif + case ID_UNIT_ORDER_CONNECT_IRRIGATE: + key_unit_connect(ACTIVITY_IRRIGATE); break; + case ID_UNIT_ORDER_CONNECT_ROAD: + key_unit_connect(ACTIVITY_ROAD); + break; + case ID_UNIT_ORDER_CONNECT_RAILROAD: + key_unit_connect(ACTIVITY_RAILROAD); + break; case ID_UNIT_ORDER_PATROL: key_unit_patrol(); break; @@ -489,19 +492,45 @@ add_to_gui_list(ID_UNIT_ORDER_PATROL, pBuf); /* --------- */ - /* Connect */ - my_snprintf(cBuf, sizeof(cBuf),"%s%s", _("Connect"), " (Shift + C)"); + /* Connect irrigation */ + my_snprintf(cBuf, sizeof(cBuf),"%s%s", _("Connect irrigation"), " (Shift + I)"); pBuf = create_themeicon(pTheme->OAutoConnect_Icon, Main.gui, (WF_HIDDEN | WF_RESTORE_BACKGROUND | WF_WIDGET_HAS_INFO_LABEL)); set_wstate(pBuf, FC_WS_NORMAL); pBuf->action = unit_order_callback; pBuf->string16 = create_str16_from_char(cBuf, adj_font(10)); - pBuf->key = SDLK_c; + pBuf->key = SDLK_i; pBuf->mod = KMOD_SHIFT; - add_to_gui_list(ID_UNIT_ORDER_CONNECT, pBuf); + add_to_gui_list(ID_UNIT_ORDER_CONNECT_IRRIGATE, pBuf); /* --------- */ + /* Connect road */ + my_snprintf(cBuf, sizeof(cBuf),"%s%s", _("Connect road"), " (Shift + R)"); + pBuf = create_themeicon(pTheme->OAutoConnect_Icon, Main.gui, + (WF_HIDDEN | WF_RESTORE_BACKGROUND | + WF_WIDGET_HAS_INFO_LABEL)); + set_wstate(pBuf, FC_WS_NORMAL); + pBuf->action = unit_order_callback; + pBuf->string16 = create_str16_from_char(cBuf, adj_font(10)); + pBuf->key = SDLK_r; + pBuf->mod = KMOD_SHIFT; + add_to_gui_list(ID_UNIT_ORDER_CONNECT_ROAD, pBuf); + /* --------- */ + + /* Connect railroad */ + my_snprintf(cBuf, sizeof(cBuf),"%s%s", _("Connect railroad"), " (Shift + L)"); + pBuf = create_themeicon(pTheme->OAutoConnect_Icon, Main.gui, + (WF_HIDDEN | WF_RESTORE_BACKGROUND | + WF_WIDGET_HAS_INFO_LABEL)); + set_wstate(pBuf, FC_WS_NORMAL); + pBuf->action = unit_order_callback; + pBuf->string16 = create_str16_from_char(cBuf, adj_font(10)); + pBuf->key = SDLK_l; + pBuf->mod = KMOD_SHIFT; + add_to_gui_list(ID_UNIT_ORDER_CONNECT_RAILROAD, pBuf); + /* --------- */ + /* Auto-Explore */ my_snprintf(cBuf, sizeof(cBuf),"%s%s", _("Auto-Explore"), " (X)"); pBuf = create_themeicon(pTheme->OAutoExp_Icon, Main.gui, @@ -1172,12 +1201,24 @@ local_hide(ID_UNIT_ORDER_AUTO_EXPLORE); } - if (can_unit_do_connect(pUnit, ACTIVITY_IDLE)) { - local_show(ID_UNIT_ORDER_CONNECT); + if (can_unit_do_connect(pUnit, ACTIVITY_IRRIGATE)) { + local_show(ID_UNIT_ORDER_CONNECT_IRRIGATE); } else { - local_hide(ID_UNIT_ORDER_CONNECT); + local_hide(ID_UNIT_ORDER_CONNECT_IRRIGATE); } + if (can_unit_do_connect(pUnit, ACTIVITY_ROAD)) { + local_show(ID_UNIT_ORDER_CONNECT_ROAD); + } else { + local_hide(ID_UNIT_ORDER_CONNECT_ROAD); + } + + if (can_unit_do_connect(pUnit, ACTIVITY_RAILROAD)) { + local_show(ID_UNIT_ORDER_CONNECT_RAILROAD); + } else { + local_hide(ID_UNIT_ORDER_CONNECT_RAILROAD); + } + if (is_diplomat_unit(pUnit) && diplomat_can_do_action(pUnit, DIPLOMAT_ANY_ACTION, pUnit->tile)) { local_show(ID_UNIT_ORDER_DIPLOMAT_DLG); Index: client/gui-sdl/gui_id.h =================================================================== --- client/gui-sdl/gui_id.h (Revision 12688) +++ client/gui-sdl/gui_id.h (Arbeitskopie) @@ -152,7 +152,9 @@ ID_UNIT_ORDER_WAKEUP_OTHERS, ID_UNIT_ORDER_AUTOMATION, ID_UNIT_ORDER_AUTO_EXPLORE, - ID_UNIT_ORDER_CONNECT, + ID_UNIT_ORDER_CONNECT_ROAD, + ID_UNIT_ORDER_CONNECT_RAILROAD, + ID_UNIT_ORDER_CONNECT_IRRIGATE, ID_UNIT_ORDER_PATROL, ID_UNIT_ORDER_GOTO, ID_UNIT_ORDER_GOTO_CITY,
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev