equal
deleted
inserted
replaced
275 /* If the last text has scrolled start anew from the start */ |
275 /* If the last text has scrolled start anew from the start */ |
276 if (y < 50) WP(w, scroller_d).height = w->height - 40; |
276 if (y < 50) WP(w, scroller_d).height = w->height - 40; |
277 |
277 |
278 DoDrawStringCentered(210, w->height - 25, "Website: http://www.openttd.org", 16); |
278 DoDrawStringCentered(210, w->height - 25, "Website: http://www.openttd.org", 16); |
279 DrawStringCentered(210, w->height - 15, STR_00BA_COPYRIGHT_OPENTTD, 0); |
279 DrawStringCentered(210, w->height - 15, STR_00BA_COPYRIGHT_OPENTTD, 0); |
280 } break; |
280 } break; |
281 case WE_MOUSELOOP: // Timer to scroll the text and adjust the new top |
281 case WE_MOUSELOOP: // Timer to scroll the text and adjust the new top |
282 if (WP(w, scroller_d).counter++ % 3 == 0) { |
282 if (WP(w, scroller_d).counter++ % 3 == 0) { |
283 WP(w, scroller_d).height--; |
283 WP(w, scroller_d).height--; |
284 SetWindowDirty(w); |
284 SetWindowDirty(w); |
285 } |
285 } |
1455 y += 10; |
1455 y += 10; |
1456 if (y >= w->vscroll.cap * 10 + w->widget[7].top + 1) break; |
1456 if (y >= w->vscroll.cap * 10 + w->widget[7].top + 1) break; |
1457 } |
1457 } |
1458 |
1458 |
1459 if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO) { |
1459 if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO) { |
1460 DrawEditBox(w, &WP(w,querystr_d), 10); |
1460 DrawEditBox(w, &WP(w, querystr_d), 10); |
1461 } |
1461 } |
1462 break; |
1462 break; |
1463 } |
1463 } |
1464 |
1464 |
1465 case WE_CLICK: |
1465 case WE_CLICK: |
1548 /* This test protects against using widgets 11 and 12 which are only available |
1548 /* This test protects against using widgets 11 and 12 which are only available |
1549 * in those two saveload mode */ |
1549 * in those two saveload mode */ |
1550 if (!(_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO)) break; |
1550 if (!(_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO)) break; |
1551 |
1551 |
1552 if (IsWindowWidgetLowered(w, 11)) { // Delete button clicked |
1552 if (IsWindowWidgetLowered(w, 11)) { // Delete button clicked |
1553 if (!FiosDelete(WP(w,querystr_d).text.buf)) { |
1553 if (!FiosDelete(WP(w, querystr_d).text.buf)) { |
1554 ShowErrorMessage(INVALID_STRING_ID, STR_4008_UNABLE_TO_DELETE_FILE, 0, 0); |
1554 ShowErrorMessage(INVALID_STRING_ID, STR_4008_UNABLE_TO_DELETE_FILE, 0, 0); |
1555 } else { |
1555 } else { |
1556 BuildFileList(); |
1556 BuildFileList(); |
1557 /* Reset file name to current date on successfull delete */ |
1557 /* Reset file name to current date on successfull delete */ |
1558 if (_saveload_mode == SLD_SAVE_GAME) GenerateFileName(); |
1558 if (_saveload_mode == SLD_SAVE_GAME) GenerateFileName(); |
1560 |
1560 |
1561 UpdateTextBufferSize(&WP(w, querystr_d).text); |
1561 UpdateTextBufferSize(&WP(w, querystr_d).text); |
1562 SetWindowDirty(w); |
1562 SetWindowDirty(w); |
1563 } else if (IsWindowWidgetLowered(w, 12)) { // Save button clicked |
1563 } else if (IsWindowWidgetLowered(w, 12)) { // Save button clicked |
1564 _switch_mode = SM_SAVE; |
1564 _switch_mode = SM_SAVE; |
1565 FiosMakeSavegameName(_file_to_saveload.name, WP(w,querystr_d).text.buf, sizeof(_file_to_saveload.name)); |
1565 FiosMakeSavegameName(_file_to_saveload.name, WP(w, querystr_d).text.buf, sizeof(_file_to_saveload.name)); |
1566 |
1566 |
1567 /* In the editor set up the vehicle engines correctly (date might have changed) */ |
1567 /* In the editor set up the vehicle engines correctly (date might have changed) */ |
1568 if (_game_mode == GM_EDITOR) StartupEngines(); |
1568 if (_game_mode == GM_EDITOR) StartupEngines(); |
1569 } |
1569 } |
1570 break; |
1570 break; |