Changeset 94 for trunk/UEngine.pas
- Timestamp:
- Sep 27, 2022, 12:04:27 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UEngine.pas
r93 r94 187 187 procedure DrawTrains(Canvas: TCanvas); 188 188 procedure DrawGameOver(Canvas: TCanvas; CanvasSize: TPoint); 189 procedure DrawNewTrain(Canvas: TCanvas; CanvasSize: TPoint); 189 190 procedure DrawStationPassengerOverload(Canvas: TCanvas); 190 191 procedure DrawLines(Canvas: TCanvas); … … 1834 1835 ClockSize = 20; 1835 1836 begin 1837 if (Time / OneHour > 6) and (Time / OneHour < 18) then begin 1838 Canvas.Brush.Style := bsSolid; 1839 Canvas.Brush.Color := Colors.Background; 1840 end else begin 1841 Canvas.Brush.Style := bsSolid; 1842 Canvas.Brush.Color := Colors.Text; 1843 end; 1836 1844 Canvas.Pen.Style := psSolid; 1837 1845 Canvas.Pen.Color := Colors.Text; … … 1840 1848 Angle := Time / (12 * OneHour) * 2 * Pi - Pi / 2; 1841 1849 Canvas.EllipseC(ClockCenter.X, ClockCenter.Y, ClockSize, ClockSize); 1850 Canvas.Brush.Style := bsClear; 1851 1852 if (Time / OneHour > 6) and (Time / OneHour < 18) then begin 1853 Canvas.Pen.Color := Colors.Text; 1854 end else begin 1855 Canvas.Pen.Color := Colors.Background; 1856 end; 1842 1857 Canvas.Line(ClockCenter, Point(ClockCenter.X + Round(Cos(Angle) * ClockSize * 0.8), 1843 1858 ClockCenter.Y + Round(Sin(Angle) * ClockSize * 0.8))); 1844 1859 for I := 0 to 12 do begin 1845 1860 Angle := I / 12 * 2 * Pi; 1846 Canvas.Line(ClockCenter.X + Round(Cos(Angle) * ClockSize * 0. 8),1847 ClockCenter.Y + Round(Sin(Angle) * ClockSize * 0. 8),1861 Canvas.Line(ClockCenter.X + Round(Cos(Angle) * ClockSize * 0.7), 1862 ClockCenter.Y + Round(Sin(Angle) * ClockSize * 0.7), 1848 1863 ClockCenter.X + Round(Cos(Angle) * ClockSize * 0.9), 1849 1864 ClockCenter.Y + Round(Sin(Angle) * ClockSize * 0.9)); 1850 1865 end; 1851 Y := ClockCenter.Y + ScaleY(5, 96); 1852 1866 Y := ClockCenter.Y; 1867 1868 Canvas.Pen.Color := Colors.Text; 1853 1869 Canvas.Font.Color := Colors.Text; 1854 1870 Text := FormatDateTime('ddd', Time + 2); 1855 Canvas.TextOut(ClockCenter.X - ClockSize - Canvas.TextWidth(Text) - 10,1871 Canvas.TextOut(ClockCenter.X - ClockSize - Canvas.TextWidth(Text) - ScaleX(10, 96), 1856 1872 Y - Canvas.TextHeight(Text) div 2, Text); 1857 Y := Y + Canvas.TextHeight(Text) 1873 Y := Y + Canvas.TextHeight(Text) + ScaleY(5, 96); 1858 1874 1859 1875 Text := SDay + ' ' + IntToStr(Trunc(Time)); 1860 Canvas.TextOut(ClockCenter.X - ClockSize - Canvas.TextWidth(Text) - 10,1876 Canvas.TextOut(ClockCenter.X - ClockSize - Canvas.TextWidth(Text) - ScaleX(10, 96), 1861 1877 Y - Canvas.TextHeight(Text) div 2, Text); 1862 Y := Y + Canvas.TextHeight(Text) 1878 Y := Y + Canvas.TextHeight(Text) + ScaleY(5, 96); 1863 1879 1864 1880 ImagePause.Canvas := Canvas; 1865 ImagePause.Bounds := Bounds(CanvasSize.X - ScaleX(20 + 10, 96), Y, ScaleX(20, 96), ScaleY(20, 96)); 1881 ImagePause.Bounds := Bounds(CanvasSize.X - ScaleX(20 + 10, 96), Y, 1882 ScaleX(20, 96), ScaleY(20, 96)); 1866 1883 ImagePause.Paint; 1867 1884 Y := Y + ImagePause.Bounds.Height + ScaleY(5, 96); 1868 1885 1869 1886 ImagePlay.Canvas := Canvas; 1870 ImagePlay.Bounds := Bounds(CanvasSize.X - ScaleX(20 + 10, 96) , Y, ScaleX(20, 96), ScaleY(20, 96)); 1887 ImagePlay.Bounds := Bounds(CanvasSize.X - ScaleX(20 + 10, 96) , Y, 1888 ScaleX(20, 96), ScaleY(20, 96)); 1871 1889 ImagePlay.Paint; 1872 1890 Y := Y + ImagePlay.Bounds.Height + ScaleY(5, 96); 1873 1891 1874 1892 ImageFastForward.Canvas := Canvas; 1875 ImageFastForward.Bounds := Bounds(CanvasSize.X - ScaleX(20 + 10, 96) , Y, ScaleX(20, 96), ScaleY(20, 96)); 1893 ImageFastForward.Bounds := Bounds(CanvasSize.X - ScaleX(20 + 10, 96) , Y, 1894 ScaleX(20, 96), ScaleY(20, 96)); 1876 1895 ImageFastForward.Paint; 1877 1896 Y := Y + ImageFastForward.Bounds.Height + ScaleY(5, 96); … … 1989 2008 HighestServedDaysCount := ServedDaysCount; 1990 2009 end; 2010 end; 2011 2012 procedure TEngine.DrawNewTrain(Canvas: TCanvas; CanvasSize: TPoint); 2013 begin 2014 1991 2015 end; 1992 2016
Note:
See TracChangeset
for help on using the changeset viewer.