equal
deleted
inserted
replaced
120 * @param placeproc Procedure which will be called when someone clicks on the map |
120 * @param placeproc Procedure which will be called when someone clicks on the map |
121 |
121 |
122 * @return true if the button is clicked, false if it's unclicked |
122 * @return true if the button is clicked, false if it's unclicked |
123 */ |
123 */ |
124 |
124 |
125 bool HandlePlacePushButton(Window *w, int widget, uint32 cursor, int mode, PlaceProc *placeproc) |
125 bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, int mode, PlaceProc *placeproc) |
126 { |
126 { |
127 uint32 mask = 1 << widget; |
127 uint32 mask = 1 << widget; |
128 |
128 |
129 if (w->disabled_state & mask) |
129 if (w->disabled_state & mask) |
130 return false; |
130 return false; |
404 ShowQueryString(STR_WAYPOINT_RAW, STR_EDIT_WAYPOINT_NAME, 30, 180, 1, 0); |
404 ShowQueryString(STR_WAYPOINT_RAW, STR_EDIT_WAYPOINT_NAME, 30, 180, 1, 0); |
405 } |
405 } |
406 |
406 |
407 static void SelectSignTool(void) |
407 static void SelectSignTool(void) |
408 { |
408 { |
409 if (_cursor.sprite == 0x2D2) |
409 if (_cursor.sprite == SPR_CURSOR_SIGN) |
410 ResetObjectToPlace(); |
410 ResetObjectToPlace(); |
411 else { |
411 else { |
412 SetObjectToPlace(0x2D2, 1, 1, 0); |
412 SetObjectToPlace(SPR_CURSOR_SIGN, 1, 1, 0); |
413 _place_proc = PlaceProc_Sign; |
413 _place_proc = PlaceProc_Sign; |
414 } |
414 } |
415 } |
415 } |
416 |
416 |
417 static void MenuClickForest(int index) |
417 static void MenuClickForest(int index) |
1711 GenerateIndustries(); |
1711 GenerateIndustries(); |
1712 _generating_world = false; |
1712 _generating_world = false; |
1713 } |
1713 } |
1714 |
1714 |
1715 if ((button=e->click.widget) >= 4) { |
1715 if ((button=e->click.widget) >= 4) { |
1716 if (HandlePlacePushButton(w, button, 0xFF1, 1, NULL)) |
1716 if (HandlePlacePushButton(w, button, SPR_CURSOR_INDUSTRY, 1, NULL)) |
1717 _industry_type_to_place = _industry_type_list[_opt.landscape][button - 4]; |
1717 _industry_type_to_place = _industry_type_list[_opt.landscape][button - 4]; |
1718 } |
1718 } |
1719 break; |
1719 break; |
1720 case WE_PLACE_OBJ: { |
1720 case WE_PLACE_OBJ: { |
1721 int type; |
1721 int type; |