Changeset 90
- Timestamp:
- Sep 22, 2022, 9:54:56 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BigMetro.lpi
r89 r90 89 89 </Item2> 90 90 </RequiredPackages> 91 <Units Count=" 8">91 <Units Count="9"> 92 92 <Unit0> 93 93 <Filename Value="BigMetro.lpr"/> … … 128 128 <IsPartOfProject Value="True"/> 129 129 </Unit7> 130 <Unit8> 131 <Filename Value="UColors.pas"/> 132 <IsPartOfProject Value="True"/> 133 </Unit8> 130 134 </Units> 131 135 </ProjectOptions> -
trunk/BigMetro.lpr
r89 r90 9 9 Interfaces, // this includes the LCL widgetset 10 10 Forms, SysUtils, UFormMain, UFormImages, Common, UMenu, UControls, 11 UMetroPassenger ;11 UMetroPassenger, UColors; 12 12 13 13 {$R *.res} -
trunk/UEngine.pas
r89 r90 9 9 Classes, SysUtils, Graphics, Controls, ExtCtrls, Math, DateUtils, 10 10 UMetaCanvas, Generics.Collections, Generics.Defaults, UMenu, UControls, 11 UMetroPassenger ;11 UMetroPassenger, UColors; 12 12 13 13 type … … 23 23 TTrackLink = class; 24 24 TTrackLinks = class; 25 26 TColors = record27 Background: TColor;28 Text: TColor;29 ShapeBackground: TColor;30 MenuItemText: TColor;31 MenuItemBackground: TColor;32 MenuItemBackgroundSelected: TColor;33 end;34 25 35 26 { TMapStation } … … 310 301 UpdatedShape: TStationShape; Distance: Integer); 311 302 procedure SetDarkMode(AValue: Boolean); 312 procedure InitColors;313 303 procedure SetState(AValue: TGameState); 314 304 procedure TrainMovement; … … 1686 1676 if FDarkMode = AValue then Exit; 1687 1677 FDarkMode := AValue; 1688 InitColors;1678 Colors.Init(FDarkMode); 1689 1679 if Assigned(FOnDarkModeChange) then FOnDarkModeChange(Self); 1690 end;1691 1692 procedure TEngine.InitColors;1693 begin1694 with Colors do1695 if FDarkMode then begin1696 Background := $2f3020;1697 Text := clWhite;1698 ShapeBackground := clBlack;1699 MenuItemText := $cccccc;1700 MenuItemBackground := $b75C01;1701 MenuItemBackgroundSelected := $070C81;1702 end else begin1703 Background := $eff0e0;1704 Text := clBlack;1705 ShapeBackground := clWhite;1706 MenuItemText := clWhite;1707 MenuItemBackground := $e78C31;1708 MenuItemBackgroundSelected := $f7bC61;1709 end;1710 1680 end; 1711 1681 … … 2924 2894 // ImageLocomotive.Picture.LoadFromFile(ImageLocomotiveName); 2925 2895 MetaCanvas := TMetaCanvas.Create; 2926 InitColors;2896 Colors.Init(FDarkMode); 2927 2897 end; 2928 2898
Note:
See TracChangeset
for help on using the changeset viewer.