Changeset 65
- Timestamp:
- Nov 26, 2020, 7:19:50 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UEngine.pas
r64 r65 300 300 procedure DrawClock(Canvas: TCanvas); 301 301 procedure DrawTrains(Canvas: TCanvas); 302 procedure DrawGameOver(Canvas: TCanvas); 302 303 procedure ComputeShapeDistance; 303 304 procedure ComputeShapeDistanceStation(Station: TMapStation; … … 2129 2130 end; 2130 2131 2132 procedure TEngine.DrawGameOver(Canvas: TCanvas); 2133 var 2134 Y: Integer; 2135 Text: string; 2136 begin 2137 Canvas.Font.Color := Colors.Text; 2138 with Canvas do begin 2139 Y := 100; 2140 Font.Size := 40; 2141 TextOut((Width - TextWidth(SGameOver)) div 2, Y, SGameOver); 2142 2143 Y := Y + Round(TextHeight(SGameOver) * 1.1); 2144 Font.Size := 14; 2145 TextOut((Width - TextWidth(SGameOverReason)) div 2, Y, SGameOverReason); 2146 2147 Y := Y + Round(TextHeight(SGameOverReason) * 1.1); 2148 Text := Format(SGameOverStatistic, [ServedPassengerCount, Trunc(Time)]); 2149 TextOut((Width - TextWidth(Text)) div 2, Y, Text); 2150 end; 2151 end; 2152 2131 2153 procedure TEngine.Tick; 2132 2154 var … … 2763 2785 if State = gsGameOver then 2764 2786 begin 2765 TargetCanvas.Font.Size := 40; 2766 TargetCanvas.Font.Color := Colors.Text; 2767 TargetCanvas.TextOut((TargetCanvas.Width - TargetCanvas.TextWidth(SGameOver)) div 2, 100, SGameOver); 2768 TargetCanvas.Font.Size := 14; 2769 TargetCanvas.TextOut((TargetCanvas.Width - TargetCanvas.TextWidth(SGameOverReason)) div 2, 160, SGameOverReason); 2770 Text := Format(SGameOverStatistic, [ServedPassengerCount, Trunc(Time)]); 2771 TargetCanvas.TextOut((TargetCanvas.Width - TargetCanvas.TextWidth(Text)) div 2, 180, Text); 2787 DrawGameOver(TargetCanvas); 2772 2788 end else 2773 2789 if State = gsMenu then begin
Note:
See TracChangeset
for help on using the changeset viewer.