Changeset 134
- Timestamp:
- May 2, 2023, 11:48:43 AM (20 months ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r133 r134 35 35 procedure PaintBox1Resize(Sender: TObject); 36 36 procedure Timer1Timer(Sender: TObject); 37 procedure Translator1Translate(Sender: TObject);38 37 private 39 38 Initialized: Boolean; … … 60 59 uses 61 60 UFormImages, UPixelPointer, UCore, UFormTest, UTestCases; 62 63 resourcestring64 SMondayShort = 'MON';65 STuesdayShort = 'TUE';66 SWednesdayShort = 'WED';67 SThrusdayShort = 'THU';68 SFridayShort = 'FRI';69 SSaturdayShort = 'SAT';70 SSundayShort = 'SUN';71 61 72 62 { TFormMain } … … 205 195 if Engine.RedrawPending then 206 196 PaintBox1.Repaint; 207 end;208 209 procedure TFormMain.Translator1Translate(Sender: TObject);210 begin211 FormatSettings.ShortDayNames[1] := SSundayShort;212 FormatSettings.ShortDayNames[2] := SMondayShort;213 FormatSettings.ShortDayNames[3] := STuesdayShort;214 FormatSettings.ShortDayNames[4] := SWednesdayShort;215 FormatSettings.ShortDayNames[5] := SThrusdayShort;216 FormatSettings.ShortDayNames[6] := SFridayShort;217 FormatSettings.ShortDayNames[7] := SSaturdayShort;218 197 end; 219 198 -
trunk/Languages/TransLines.cs.po
r133 r134 59 59 msgstr "Testový případ" 60 60 61 #: ucore.sfridayshort 62 msgctxt "ucore.sfridayshort" 63 msgid "FRI" 64 msgstr "Pá" 65 66 #: ucore.smondayshort 67 msgctxt "ucore.smondayshort" 68 msgid "MON" 69 msgstr "Po" 70 71 #: ucore.ssaturdayshort 72 msgctxt "ucore.ssaturdayshort" 73 msgid "SAT" 74 msgstr "So" 75 76 #: ucore.ssundayshort 77 msgctxt "ucore.ssundayshort" 78 msgid "SUN" 79 msgstr "Ne" 80 81 #: ucore.sthrusdayshort 82 msgctxt "ucore.sthrusdayshort" 83 msgid "THU" 84 msgstr "Čt" 85 86 #: ucore.stuesdayshort 87 msgctxt "ucore.stuesdayshort" 88 msgid "TUE" 89 msgstr "Út" 90 91 #: ucore.swednesdayshort 92 msgctxt "ucore.swednesdayshort" 93 msgid "WED" 94 msgstr "St" 95 61 96 #: uengine.salpha 62 97 msgid "Alpha" … … 70 105 #: uengine.sautosave 71 106 msgid "Auto save" 72 msgstr " Automatickyuložené"107 msgstr "Samo uložené" 73 108 74 109 #: uengine.sback … … 300 335 301 336 #: uformmain.sfridayshort 337 msgctxt "uformmain.sfridayshort" 302 338 msgid "FRI" 303 339 msgstr "Pá" 304 340 305 341 #: uformmain.smondayshort 342 msgctxt "uformmain.smondayshort" 306 343 msgid "MON" 307 344 msgstr "Po" 308 345 309 346 #: uformmain.ssaturdayshort 347 msgctxt "uformmain.ssaturdayshort" 310 348 msgid "SAT" 311 349 msgstr "So" 312 350 313 351 #: uformmain.ssundayshort 352 msgctxt "uformmain.ssundayshort" 314 353 msgid "SUN" 315 354 msgstr "Ne" 316 355 317 356 #: uformmain.sthrusdayshort 357 msgctxt "uformmain.sthrusdayshort" 318 358 msgid "THU" 319 359 msgstr "Čt" 320 360 321 361 #: uformmain.stuesdayshort 362 msgctxt "uformmain.stuesdayshort" 322 363 msgid "TUE" 323 364 msgstr "Út" 324 365 325 366 #: uformmain.swednesdayshort 367 msgctxt "uformmain.swednesdayshort" 326 368 msgid "WED" 327 369 msgstr "St" -
trunk/Languages/TransLines.de.po
r133 r134 61 61 msgstr "" 62 62 63 #: ucore.sfridayshort 64 msgctxt "ucore.sfridayshort" 65 msgid "FRI" 66 msgstr "" 67 68 #: ucore.smondayshort 69 msgctxt "ucore.smondayshort" 70 msgid "MON" 71 msgstr "" 72 73 #: ucore.ssaturdayshort 74 msgctxt "ucore.ssaturdayshort" 75 msgid "SAT" 76 msgstr "" 77 78 #: ucore.ssundayshort 79 msgctxt "ucore.ssundayshort" 80 msgid "SUN" 81 msgstr "" 82 83 #: ucore.sthrusdayshort 84 msgctxt "ucore.sthrusdayshort" 85 msgid "THU" 86 msgstr "" 87 88 #: ucore.stuesdayshort 89 msgctxt "ucore.stuesdayshort" 90 msgid "TUE" 91 msgstr "" 92 93 #: ucore.swednesdayshort 94 msgctxt "ucore.swednesdayshort" 95 msgid "WED" 96 msgstr "" 97 63 98 #: uengine.salpha 64 99 msgid "Alpha" … … 304 339 305 340 #: uformmain.sfridayshort 341 msgctxt "uformmain.sfridayshort" 306 342 msgid "FRI" 307 343 msgstr "" 308 344 309 345 #: uformmain.smondayshort 346 msgctxt "uformmain.smondayshort" 310 347 msgid "MON" 311 348 msgstr "" 312 349 313 350 #: uformmain.ssaturdayshort 351 msgctxt "uformmain.ssaturdayshort" 314 352 msgid "SAT" 315 353 msgstr "" 316 354 317 355 #: uformmain.ssundayshort 356 msgctxt "uformmain.ssundayshort" 318 357 msgid "SUN" 319 358 msgstr "" 320 359 321 360 #: uformmain.sthrusdayshort 361 msgctxt "uformmain.sthrusdayshort" 322 362 msgid "THU" 323 363 msgstr "" 324 364 325 365 #: uformmain.stuesdayshort 366 msgctxt "uformmain.stuesdayshort" 326 367 msgid "TUE" 327 368 msgstr "" 328 369 329 370 #: uformmain.swednesdayshort 371 msgctxt "uformmain.swednesdayshort" 330 372 msgid "WED" 331 373 msgstr "" -
trunk/Languages/TransLines.fr.po
r133 r134 62 62 msgstr "Cas de test" 63 63 64 #: ucore.sfridayshort 65 #, fuzzy 66 msgctxt "ucore.sfridayshort" 67 msgid "FRI" 68 msgstr "VEN" 69 70 #: ucore.smondayshort 71 #, fuzzy 72 msgctxt "ucore.smondayshort" 73 msgid "MON" 74 msgstr "LUN" 75 76 #: ucore.ssaturdayshort 77 #, fuzzy 78 msgctxt "ucore.ssaturdayshort" 79 msgid "SAT" 80 msgstr "SAM" 81 82 #: ucore.ssundayshort 83 #, fuzzy 84 msgctxt "ucore.ssundayshort" 85 msgid "SUN" 86 msgstr "DIM" 87 88 #: ucore.sthrusdayshort 89 #, fuzzy 90 msgctxt "ucore.sthrusdayshort" 91 msgid "THU" 92 msgstr "JEU" 93 94 #: ucore.stuesdayshort 95 #, fuzzy 96 msgctxt "ucore.stuesdayshort" 97 msgid "TUE" 98 msgstr "MAR" 99 100 #: ucore.swednesdayshort 101 #, fuzzy 102 msgctxt "ucore.swednesdayshort" 103 msgid "WED" 104 msgstr "MER" 105 64 106 #: uengine.salpha 65 107 msgid "Alpha" … … 305 347 306 348 #: uformmain.sfridayshort 349 msgctxt "uformmain.sfridayshort" 307 350 msgid "FRI" 308 351 msgstr "VEN" 309 352 310 353 #: uformmain.smondayshort 354 msgctxt "uformmain.smondayshort" 311 355 msgid "MON" 312 356 msgstr "LUN" 313 357 314 358 #: uformmain.ssaturdayshort 359 msgctxt "uformmain.ssaturdayshort" 315 360 msgid "SAT" 316 361 msgstr "SAM" 317 362 318 363 #: uformmain.ssundayshort 364 msgctxt "uformmain.ssundayshort" 319 365 msgid "SUN" 320 366 msgstr "DIM" 321 367 322 368 #: uformmain.sthrusdayshort 369 msgctxt "uformmain.sthrusdayshort" 323 370 msgid "THU" 324 371 msgstr "JEU" 325 372 326 373 #: uformmain.stuesdayshort 374 msgctxt "uformmain.stuesdayshort" 327 375 msgid "TUE" 328 376 msgstr "MAR" 329 377 330 378 #: uformmain.swednesdayshort 379 msgctxt "uformmain.swednesdayshort" 331 380 msgid "WED" 332 381 msgstr "MER" -
trunk/Languages/TransLines.pot
r133 r134 49 49 msgstr "" 50 50 51 #: ucore.sfridayshort 52 msgctxt "ucore.sfridayshort" 53 msgid "FRI" 54 msgstr "" 55 56 #: ucore.smondayshort 57 msgctxt "ucore.smondayshort" 58 msgid "MON" 59 msgstr "" 60 61 #: ucore.ssaturdayshort 62 msgctxt "ucore.ssaturdayshort" 63 msgid "SAT" 64 msgstr "" 65 66 #: ucore.ssundayshort 67 msgctxt "ucore.ssundayshort" 68 msgid "SUN" 69 msgstr "" 70 71 #: ucore.sthrusdayshort 72 msgctxt "ucore.sthrusdayshort" 73 msgid "THU" 74 msgstr "" 75 76 #: ucore.stuesdayshort 77 msgctxt "ucore.stuesdayshort" 78 msgid "TUE" 79 msgstr "" 80 81 #: ucore.swednesdayshort 82 msgctxt "ucore.swednesdayshort" 83 msgid "WED" 84 msgstr "" 85 51 86 #: uengine.salpha 52 87 msgid "Alpha" … … 290 325 291 326 #: uformmain.sfridayshort 327 msgctxt "uformmain.sfridayshort" 292 328 msgid "FRI" 293 329 msgstr "" 294 330 295 331 #: uformmain.smondayshort 332 msgctxt "uformmain.smondayshort" 296 333 msgid "MON" 297 334 msgstr "" 298 335 299 336 #: uformmain.ssaturdayshort 337 msgctxt "uformmain.ssaturdayshort" 300 338 msgid "SAT" 301 339 msgstr "" 302 340 303 341 #: uformmain.ssundayshort 342 msgctxt "uformmain.ssundayshort" 304 343 msgid "SUN" 305 344 msgstr "" 306 345 307 346 #: uformmain.sthrusdayshort 347 msgctxt "uformmain.sthrusdayshort" 308 348 msgid "THU" 309 349 msgstr "" 310 350 311 351 #: uformmain.stuesdayshort 352 msgctxt "uformmain.stuesdayshort" 312 353 msgid "TUE" 313 354 msgstr "" 314 355 315 356 #: uformmain.swednesdayshort 357 msgctxt "uformmain.swednesdayshort" 316 358 msgid "WED" 317 359 msgstr "" -
trunk/UCore.lfm
r118 r134 1 1 object Core: TCore 2 2 OldCreateOrder = False 3 Height = 486 4 HorizontalOffset = 579 5 VerticalOffset = 460 6 Width = 619 3 Height = 729 4 HorizontalOffset = 869 5 VerticalOffset = 653 6 Width = 929 7 PPI = 144 7 8 object PersistentForm1: TPersistentForm 8 9 MinVisiblePart = 50 9 10 EntireVisible = False 10 Left = 23211 Top = 13611 Left = 348 12 Top = 204 12 13 end 13 14 object Translator1: TTranslator 14 15 POFilesFolder = 'Languages' 15 Left = 232 16 Top = 216 16 OnTranslate = Translator1Translate 17 Left = 348 18 Top = 324 17 19 end 18 20 object ThemeManager1: TThemeManager 19 Left = 23220 Top = 29621 Left = 348 22 Top = 444 21 23 end 22 24 end -
trunk/UCore.pas
r118 r134 14 14 ThemeManager1: TThemeManager; 15 15 Translator1: TTranslator; 16 procedure Translator1Translate(Sender: TObject); 16 17 end; 17 18 … … 24 25 {$R *.lfm} 25 26 27 resourcestring 28 SMondayShort = 'MON'; 29 STuesdayShort = 'TUE'; 30 SWednesdayShort = 'WED'; 31 SThrusdayShort = 'THU'; 32 SFridayShort = 'FRI'; 33 SSaturdayShort = 'SAT'; 34 SSundayShort = 'SUN'; 35 36 { TCore } 37 38 procedure TCore.Translator1Translate(Sender: TObject); 39 begin 40 FormatSettings.ShortDayNames[1] := SSundayShort; 41 FormatSettings.ShortDayNames[2] := SMondayShort; 42 FormatSettings.ShortDayNames[3] := STuesdayShort; 43 FormatSettings.ShortDayNames[4] := SWednesdayShort; 44 FormatSettings.ShortDayNames[5] := SThrusdayShort; 45 FormatSettings.ShortDayNames[6] := SFridayShort; 46 FormatSettings.ShortDayNames[7] := SSaturdayShort; 47 end; 48 26 49 end. 27 50 -
trunk/UEngine.pas
r133 r134 312 312 function GetGameSlotFileName(Index: Integer): string; 313 313 procedure AutoSave; 314 procedure CheckScore; 314 315 public 315 316 // Test … … 357 358 HighestServedPassengerCount: Integer; 358 359 HighestServedDaysCount: Integer; 360 OldHighestServedPassengerCount: Integer; 361 OldHighestServedDaysCount: Integer; 359 362 RegistryContext: TRegistryContext; 360 363 procedure InitMenus; … … 2521 2524 end; 2522 2525 2526 procedure TEngine.CheckScore; 2527 begin 2528 OldHighestServedDaysCount := HighestServedDaysCount; 2529 OldHighestServedPassengerCount := HighestServedPassengerCount; 2530 2531 if (ServedPassengerCount > HighestServedPassengerCount) then begin 2532 HighestServedPassengerCount := ServedPassengerCount; 2533 HighestServedDaysCount := ServedDaysCount; 2534 end; 2535 2536 if Assigned(City) then begin 2537 if (ServedPassengerCount > City.HighestServedPassengerCount) then begin 2538 City.HighestServedPassengerCount := ServedPassengerCount; 2539 City.HighestServedDaysCount := ServedDaysCount; 2540 end; 2541 end; 2542 end; 2543 2523 2544 function TEngine.DestinationIndexToText(DestinationIndex: TDestinationIndex): string; 2524 2545 begin … … 2870 2891 begin 2871 2892 with Canvas do begin 2872 // Calculate new highest score2873 2893 Text := ''; 2874 if (ServedPassengerCount > HighestServedPassengerCount) or2875 (ServedDaysCount > HighestServedDaysCount) then begin2894 if (ServedPassengerCount >= HighestServedPassengerCount) or 2895 (ServedDaysCount >= HighestServedDaysCount) then begin 2876 2896 Text := SNewHighScore + ' '; 2877 2897 end; 2878 Text := Text + Format(SOldHighScore, [ HighestServedPassengerCount,2879 HighestServedDaysCount]);2898 Text := Text + Format(SOldHighScore, [OldHighestServedPassengerCount, 2899 OldHighestServedDaysCount]); 2880 2900 Canvas.TextOut((CanvasSize.X - TextWidth(Text)) div 2, Y, Text); 2881 2901 Y := Y + Round(TextHeight(Text) * 1.1); 2882 if (ServedPassengerCount > HighestServedPassengerCount) then2883 HighestServedPassengerCount := ServedPassengerCount;2884 if (ServedDaysCount > HighestServedDaysCount) then2885 HighestServedDaysCount := ServedDaysCount;2886 2887 if Assigned(City) then begin2888 if (ServedPassengerCount > City.HighestServedPassengerCount) then2889 City.HighestServedPassengerCount := ServedPassengerCount;2890 if (ServedDaysCount > City.HighestServedDaysCount) then2891 City.HighestServedDaysCount := ServedDaysCount;2892 end;2893 2902 end; 2894 2903 end; … … 3558 3567 if OverloadDuration >= MaxPassengersOveloadTime then begin 3559 3568 State := gsGameOver; 3569 CheckScore; 3560 3570 Redraw; 3561 3571 end; … … 3564 3574 if Assigned(City) and (ServedPassengerCount >= City.PassengersCountToUnlock) then begin 3565 3575 State := gsSuccess; 3576 CheckScore; 3566 3577 Redraw; 3567 3578 end; … … 3860 3871 KeyF7 = 118; 3861 3872 KeyF8 = 119; 3873 KeyF9 = 120; 3862 3874 {$ENDIF} 3863 3875 KeyT = 84; … … 3898 3910 if Key = KeyF2 then begin 3899 3911 State := gsGameOver; 3912 CheckScore; 3900 3913 Redraw; 3901 3914 end; … … 3919 3932 if Key = KeyF7 then begin 3920 3933 State := gsSuccess; 3934 CheckScore; 3921 3935 Redraw; 3922 3936 end else 3923 3937 if Key = KeyF8 then begin 3924 3938 Inc(AvailableTerminals); 3939 Redraw; 3940 end else 3941 if Key = KeyF9 then begin 3942 Inc(ServedPassengerCount, 100); 3925 3943 Redraw; 3926 3944 end; … … 4059 4077 LastNewPassengerTime := ReadDateTime(Node, 'LastNewPassengerTime', LastNewPassengerTime); 4060 4078 LastNewStationTime := ReadDateTime(Node, 'LastNewStationTime', LastNewStationTime); 4079 TerminalCountVisible := ReadBoolean(Node, 'TerminalCountVisible', TerminalCountVisible); 4080 CarriageCountVisible := ReadBoolean(Node, 'CarriageCountVisible', CarriageCountVisible); 4061 4081 4062 4082 NewNode := Node.FindNode(DOMString(TView.GetClassSysName)); … … 4132 4152 WriteDateTime(Node, 'LastNewPassengerTime', LastNewPassengerTime); 4133 4153 WriteDateTime(Node, 'LastNewStationTime', LastNewStationTime); 4154 WriteBoolean(Node, 'TerminalCountVisible', TerminalCountVisible); 4155 WriteBoolean(Node, 'CarriageCountVisible', CarriageCountVisible); 4134 4156 4135 4157 NewNode := Node.OwnerDocument.CreateElement(DOMString(TView.GetClassSysName));
Note:
See TracChangeset
for help on using the changeset viewer.