- Timestamp:
- Apr 25, 2021, 10:39:00 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/CityScreen.pas
r374 r380 8 8 Protocol, ClientTools, Term, ScreenTools, IsoEngine, BaseWin, 9 9 LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, 10 ButtonA, ButtonC, Area, GraphType ;10 ButtonA, ButtonC, Area, GraphType, UTexture; 11 11 12 12 const -
trunk/LocalPlayer/UnitStat.pas
r362 r380 52 52 53 53 uses 54 Tribes, Help, Directories ;54 Tribes, Help, Directories, UTexture; 55 55 56 56 {$R *.lfm} -
trunk/Packages/CevoComponents/CevoComponents.lpk
r314 r380 37 37 <Description Value="C-evo components"/> 38 38 <Version Major="1" Minor="2"/> 39 <Files Count="1 7">39 <Files Count="18"> 40 40 <Item1> 41 41 <Filename Value="Area.pas"/> … … 114 114 <UnitName Value="UXMLUtils"/> 115 115 </Item17> 116 <Item18> 117 <Filename Value="UTexture.pas"/> 118 <UnitName Value="UTexture"/> 119 </Item18> 116 120 </Files> 117 121 <RequiredPkgs Count="2"> -
trunk/Packages/CevoComponents/CevoComponents.pas
r314 r380 11 11 Area, ButtonA, ButtonB, ButtonC, ButtonN, EOTButton, ButtonBase, DrawDlg, 12 12 Sound, BaseWin, UPixelPointer, AsyncProcess2, UGraphicSet, UXMLUtils, 13 LazarusPackageIntf;13 UTexture, LazarusPackageIntf; 14 14 15 15 implementation -
trunk/Packages/CevoComponents/ScreenTools.pas
r375 r380 8 8 {$ENDIF} 9 9 StringTables, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Math, 10 Forms, Menus, GraphType, fgl, UGraphicSet, LazFileUtils ;10 Forms, Menus, GraphType, fgl, UGraphicSet, LazFileUtils, UTexture; 11 11 12 12 type 13 14 { TTexture }15 16 TTexture = class17 private18 FAge: Integer;19 function GetHeight: Integer;20 function GetWidth: Integer;21 procedure SetAge(AValue: Integer);22 public23 Image: TBitmap;24 ColorBevelLight: TColor;25 ColorBevelShade: TColor;26 ColorTextLight: TColor;27 ColorTextShade: TColor;28 ColorLitText: TColor;29 ColorMark: TColor;30 ColorPage: TColor;31 ColorCover: TColor;32 constructor Create;33 destructor Destroy; override;34 procedure Assign(Source: TTexture);35 property Age: Integer read FAge write SetAge;36 property Width: Integer read GetWidth;37 property Height: Integer read GetHeight;38 end;39 40 13 TLoadGraphicFileOption = (gfNoError, gfNoGamma); 41 14 TLoadGraphicFileOptions = set of TLoadGraphicFileOption; … … 1844 1817 end; 1845 1818 1846 { TTexture }1847 1848 procedure TTexture.SetAge(AValue: Integer);1849 begin1850 if FAge = AValue then Exit;1851 FAge := AValue;1852 LoadGraphicFile(Image, GetGraphicsDir + DirectorySeparator +1853 'Texture' + IntToStr(Age + 1) + '.jpg');1854 ColorBevelLight := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelLight];1855 ColorBevelShade := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelShade];1856 ColorTextLight := Colors.Canvas.Pixels[clkAge0 + Age, cliTextLight];1857 ColorTextShade := Colors.Canvas.Pixels[clkAge0 + Age, cliTextShade];1858 ColorLitText := Colors.Canvas.Pixels[clkAge0 + Age, cliLitText];1859 ColorMark := Colors.Canvas.Pixels[clkAge0 + Age, cliMark];1860 ColorPage := Colors.Canvas.Pixels[clkAge0 + Age, cliPage];1861 ColorCover := Colors.Canvas.Pixels[clkAge0 + Age, cliCover];1862 end;1863 1864 function TTexture.GetHeight: Integer;1865 begin1866 Result := Image.Height;1867 end;1868 1869 function TTexture.GetWidth: Integer;1870 begin1871 Result := Image.Width;1872 end;1873 1874 constructor TTexture.Create;1875 begin1876 Image := TBitmap.Create;1877 FAge := -2;1878 end;1879 1880 destructor TTexture.Destroy;1881 begin1882 FreeAndNil(Image);1883 inherited;1884 end;1885 1886 procedure TTexture.Assign(Source: TTexture);1887 begin1888 FAge := Source.FAge;1889 Image.Assign(Image);1890 ColorBevelLight := Source.ColorBevelLight;1891 ColorBevelShade := Source.ColorBevelShade;1892 ColorTextLight := Source.ColorTextLight;1893 ColorTextShade := Source.ColorTextShade;1894 ColorLitText := Source.ColorLitText;1895 ColorMark := Source.ColorMark;1896 ColorPage := Source.ColorPage;1897 ColorCover := Source.ColorCover;1898 end;1899 1900 1819 end.
Note:
See TracChangeset
for help on using the changeset viewer.