Changeset 468 for trunk/LocalPlayer
- Timestamp:
- Dec 3, 2023, 11:28:08 AM (12 months ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Battle.pas
r460 r468 5 5 6 6 uses 7 ScreenTools, Protocol, ButtonBase, ButtonA, Types, LCLIntf, LCLType, 8 SysUtils, Classes, Graphics, Controls, Forms, DrawDlg, IsoEngine; 7 ScreenTools, Protocol, ButtonBase, ButtonA, Types, LCLIntf, LCLType, UITypes, 8 SysUtils, Classes, DrawDlg, IsoEngine, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE} 10 Graphics, Controls, Forms{$ENDIF}; 9 11 10 12 type … … 236 238 Brush.Color := 0; 237 239 FillRect(Rect(0, 0, ClientWidth, ClientHeight)); 238 Brush.Style := bsClear;240 Brush.Style := TBrushStyle.bsClear; 239 241 PaintBackground(self, 3 + Border, 3 + Border, 240 242 ClientWidth - (6 + 2 * Border), ClientHeight - (6 + 2 * Border)); -
trunk/LocalPlayer/CityScreen.pas
r464 r468 7 7 {$IFDEF UNIX}LMessages,{$ENDIF} 8 8 Protocol, ClientTools, ScreenTools, IsoEngine, BaseWin, LCLIntf, LCLType, 9 Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, ButtonA, 10 ButtonC, Area, GraphType, Texture; 9 Messages, SysUtils, Classes, ButtonA, ButtonC, Area, GraphType, Texture, 10 System.UITypes, 11 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.ExtCtrls{$ELSE} 12 Graphics, Controls, Forms, ExtCtrls{$ENDIF}; 11 13 12 14 const … … 224 226 225 227 Back := TBitmap.Create; 226 Back.PixelFormat := pf24bit;228 Back.PixelFormat := TPixelFormat.pf24bit; 227 229 Back.SetSize(Width, Height); 228 230 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); 229 231 Template := TBitmap.Create; 230 Template.PixelFormat := pf24bit;232 Template.PixelFormat := TPixelFormat.pf24bit; 231 233 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'City.png', 232 234 [gfNoGamma]); 233 235 CityMapTemplate := TBitmap.Create; 234 CityMapTemplate.PixelFormat := pf24bit;236 CityMapTemplate.PixelFormat := TPixelFormat.pf24bit; 235 237 LoadGraphicFile(CityMapTemplate, GetGraphicsDir + DirectorySeparator + 'BigCityMap.png', 236 238 [gfNoGamma]); 237 239 SmallCityMapTemplate := TBitmap.Create; 238 SmallCityMapTemplate.PixelFormat := pf24bit;240 SmallCityMapTemplate.PixelFormat := TPixelFormat.pf24bit; 239 241 LoadGraphicFile(SmallCityMapTemplate, GetGraphicsDir + DirectorySeparator + 'SmallCityMap.png', 240 242 [gfNoGamma]); 241 243 SmallCityMap := TBitmap.Create; 242 SmallCityMap.PixelFormat := pf24bit;244 SmallCityMap.PixelFormat := TPixelFormat.pf24bit; 243 245 SmallCityMap.SetSize(98, 74); 244 246 SmallCityMap.Canvas.FillRect(0, 0, SmallCityMap.Width, SmallCityMap.Height); 245 247 ZoomCityMap := TBitmap.Create; 246 ZoomCityMap.PixelFormat := pf24bit;248 ZoomCityMap.PixelFormat := TPixelFormat.pf24bit; 247 249 ZoomCityMap.SetSize(228, 124); 248 250 ZoomCityMap.Canvas.FillRect(0, 0, ZoomCityMap.Width, ZoomCityMap.Height); … … 362 364 end; 363 365 end; 364 Brush.style := bsClear;366 Brush.style := TBrushStyle.bsClear; 365 367 end; 366 368 end; … … 537 539 Brush.Color := $FFFFFF; 538 540 FillRect(Rect(8, 7, 36, 32)); 539 Brush.style := bsClear;541 Brush.style := TBrushStyle.bsClear; 540 542 Font.Color := $000000; 541 543 S := IntToStr(C.Size); … … 810 812 Offscreen.Canvas.Brush.Color := MainTexture.ColorMark; 811 813 Offscreen.Canvas.FillRect(Rect(X - 27, Y - 6, X + 27, Y + 6)); 812 Offscreen.Canvas.Brush. style :=bsClear;814 Offscreen.Canvas.Brush.Style := TBrushStyle.bsClear; 813 815 end; 814 816 Sprite(Offscreen, HGrSystem, X - 16, Y - 5, 10, 10, 88, 115); … … 985 987 FillRect(Rect(xView + 9, yView + 5, xView + 1 + 72 - 8, 986 988 yView + 5 + 40)); 987 Brush. style :=bsClear;989 Brush.Style := TBrushStyle.bsClear; 988 990 end; 989 991 end … … 1624 1626 FillRect(Rect(xView + 9, yView + 5, xView + 1 + 72 - 8, 1625 1627 yView + 5 + 40)); 1626 Brush. style :=bsClear;1628 Brush.Style := TBrushStyle.bsClear; 1627 1629 end 1628 1630 else if BlinkTime = 6 then -
trunk/LocalPlayer/CityType.pas
r460 r468 6 6 uses 7 7 Protocol, ClientTools, ScreenTools, BaseWin, LCLIntf, LCLType, 8 SysUtils, Classes, Graphics, Controls, Forms, ButtonB, ExtCtrls; 8 SysUtils, Classes, ButtonB, ExtCtrls, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}Graphics, Controls, Forms{$ENDIF}; 9 10 10 11 type -
trunk/LocalPlayer/Diagram.pas
r460 r468 5 5 6 6 uses 7 BaseWin, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 8 ButtonB, Menus; 7 BaseWin, LCLIntf, LCLType, SysUtils, Classes, ButtonB, 8 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Menus{$ELSE} 9 Graphics, Controls, Forms, Menus{$ENDIF}; 9 10 10 11 type … … 60 61 Canvas.Brush.Color := $000000; 61 62 Canvas.FillRect(Rect(Left, Top, Left + Width, Top + 200)); 62 Canvas.Brush.Style := bsClear;63 Canvas.Brush.Style := TBrushStyle.bsClear; 63 64 ScreenTools.Frame(Canvas, Left - 1, Top - 1, Left + Width, Top + 200, 64 65 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); … … 202 203 Brush.Color := $000000; 203 204 FillRect(Rect(0, 0, InnerWidth, InnerHeight)); 204 Brush.Style := bsClear;205 Brush.Style := TBrushStyle.bsClear; 205 206 Pen.Color := $606060; 206 207 MoveTo(Border, InnerHeight - Border); -
trunk/LocalPlayer/Diplomacy.pas
r447 r468 8 8 function DipCommandToString(pSender, pTarget, Treaty, OppCommand, 9 9 Command: Integer; const OppOffer, Offer: TOffer): string; 10 10 11 11 12 implementation -
trunk/LocalPlayer/Draft.pas
r460 r468 6 6 uses 7 7 Protocol, ClientTools, ScreenTools, BaseWin, LCLIntf, LCLType, SysUtils, 8 Classes, Graphics, Controls, Forms, ExtCtrls, ButtonA, ButtonB, Area; 8 Classes, ButtonA, ButtonB, Area, System.UITypes, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.ExtCtrls{$ELSE} 10 Graphics, Controls, Forms, ExtCtrls{$ENDIF}; 9 11 10 12 type … … 83 85 84 86 Back := TBitmap.Create; 85 Back.PixelFormat := pf24bit;87 Back.PixelFormat := TPixelFormat.pf24bit; 86 88 Back.SetSize(Width, Height); 87 89 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); 88 90 Template := TBitmap.Create; 89 Template.PixelFormat := pf24bit;91 Template.PixelFormat := TPixelFormat.pf24bit; 90 92 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes.png', 91 93 [gfNoGamma]); … … 156 158 FrameRect(Rect(xTotal2 - 3 - dx, Y + 2, 157 159 xTotal2 + 11 - dx, Y + 16)); 158 Brush.Style := bsClear;160 Brush.Style := TBrushStyle.bsClear; 159 161 Sprite(Offscreen, HGrSystem, xTotal2 - 1 - dx, Y + 4, 10, 10, 160 162 66 + I mod 11 * 11, 137 + I div 11 * 11); … … 167 169 FillRect(Rect(xTotal2 - 3 - dx, Y + 2, 168 170 xTotal2 + W - 1 - dx, Y + 16)); 169 Brush.Style := bsClear;171 Brush.Style := TBrushStyle.bsClear; 170 172 Textout(xTotal2 - 3 - dx + 1, Y, S); 171 173 end; … … 508 510 I, D: Integer; 509 511 begin 510 if Button = mbLeft then512 if Button = TMouseButton.mbLeft then 511 513 begin 512 514 for D := 0 to nDomains - 1 do -
trunk/LocalPlayer/Enhance.pas
r460 r468 6 6 uses 7 7 ScreenTools, BaseWin, Protocol, ClientTools, LCLIntf, LCLType, SysUtils, 8 Classes, Graphics, Controls, Forms, IsoEngine, ButtonB, ButtonC, Menus; 8 Classes, IsoEngine, ButtonB, ButtonC, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Menus{$ELSE} 10 Graphics, Controls, Forms, Menus{$ENDIF}; 11 9 12 10 13 type -
trunk/LocalPlayer/Help.pas
r460 r468 5 5 6 6 uses 7 Protocol, ScreenTools, BaseWin, StringTables, Math, LCLIntf, LCLType, 8 Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, 9 ButtonB, PVSB, Types, Generics.Collections, IsoEngine; 7 Protocol, ScreenTools, BaseWin, StringTables, Math, LCLIntf, LCLType, System.UITypes, 8 Messages, SysUtils, Classes, ButtonB, PVSB, Types, Generics.Collections, IsoEngine, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.ExtCtrls, Dpi.Common{$ELSE} 10 Graphics, Controls, Forms, ExtCtrls{$ENDIF}; 10 11 11 12 const … … 151 152 152 153 uses 153 Directories, ClientTools, Term, Tribes, Inp, Messg, PixelPointer, Global,154 KeyBindings;154 {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF} 155 Directories, ClientTools, Term, Tribes, Inp, Messg, Global, KeyBindings; 155 156 156 157 {$R *.lfm} … … 293 294 CaptionFont := Font.Create; 294 295 CaptionFont.Assign(UniFont[ftNormal]); 295 CaptionFont.Style := CaptionFont.Style + [ fsItalic,fsBold];296 CaptionFont.Style := CaptionFont.Style + [TFontStyle.fsItalic, TFontStyle.fsBold]; 296 297 InitButtons; 297 298 … … 302 303 ExtPic := TBitmap.Create; 303 304 TerrIcon := TBitmap.Create; 304 TerrIcon.PixelFormat := pf24bit;305 TerrIcon.PixelFormat := TPixelFormat.pf24bit; 305 306 TerrIcon.SetSize(xSizeBig, ySizeBig); 306 307 TerrIcon.Canvas.FillRect(0, 0, TerrIcon.Width, TerrIcon.Height); … … 699 700 FrameRect(Rect(ofs, 1 + 23 + I * 24, ofs + 14, 700 701 15 + 23 + I * 24)); 701 Brush.Style := bsClear;702 Brush.Style := TBrushStyle.bsClear; 702 703 Sprite(OffScreen, HGrSystem, ofs + 2, 3 + 23 + I * 24, 10, 10, 703 704 66 + HelpLineInfo.Picpix mod 11 * 11, -
trunk/LocalPlayer/IsoEngine.pas
r456 r468 6 6 uses 7 7 Protocol, ClientTools, ScreenTools, Tribes, LCLIntf, LCLType, SysUtils, 8 Classes, Graphics, PixelPointer, GraphicSet; 8 Classes, GraphicSet, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.PixelPointer, Dpi.Common{$ELSE} 10 Graphics, PixelPointer{$ENDIF}; 9 11 10 12 const … … 215 217 begin 216 218 LandPatch := TBitmap.Create; 217 LandPatch.PixelFormat := pf24bit;219 LandPatch.PixelFormat := TPixelFormat.pf24bit; 218 220 OceanPatch := TBitmap.Create; 219 OceanPatch.PixelFormat := pf24bit;221 OceanPatch.PixelFormat := TPixelFormat.pf24bit; 220 222 Borders := TBitmap.Create; 221 Borders.PixelFormat := pf24bit;223 Borders.PixelFormat := TPixelFormat.pf24bit; 222 224 HGrTerrain := nil; 223 225 HGrCities := nil; … … 251 253 Mask24 := TBitmap.Create; 252 254 Mask24.Assign(HGrTerrain.Mask); 253 Mask24.PixelFormat := pf24bit;255 Mask24.PixelFormat := TPixelFormat.pf24bit; 254 256 Mask24.BeginUpdate; 255 257 for ySrc := 0 to TerrainIconLines - 1 do begin … … 344 346 OceanPatch.Canvas.FillRect(0, 0, OceanPatch.Width, OceanPatch.Height); 345 347 LandMore := TBitmap.Create; 346 LandMore.PixelFormat := pf24bit;348 LandMore.PixelFormat := TPixelFormat.pf24bit; 347 349 LandMore.Canvas.Brush.Color := 0; 348 350 LandMore.SetSize(xxt * 18, yyt * 9); 349 351 LandMore.Canvas.FillRect(0, 0, LandMore.Width, LandMore.Height); 350 352 OceanMore := TBitmap.Create; 351 OceanMore.PixelFormat := pf24bit;353 OceanMore.PixelFormat := TPixelFormat.pf24bit; 352 354 OceanMore.Canvas.Brush.Color := 0; 353 355 OceanMore.SetSize(xxt * 8, yyt * 4); 354 356 OceanMore.Canvas.FillRect(0, 0, OceanMore.Width, OceanMore.Height); 355 357 DitherMask := TBitmap.Create; 356 DitherMask.PixelFormat := pf24bit;358 DitherMask.PixelFormat := TPixelFormat.pf24bit; 357 359 DitherMask.SetSize(xxt * 2, yyt * 2); 358 360 DitherMask.Canvas.FillRect(0, 0, DitherMask.Width, DitherMask.Height); … … 584 586 FOutput.Canvas.Brush.Color := Color; 585 587 FOutput.Canvas.FillRect(Rect(X, Y, X + Width, Y + Height)); 586 FOutput.Canvas.Brush.Style := bsClear;588 FOutput.Canvas.Brush.Style := TBrushStyle.bsClear; 587 589 end; 588 590 … … 1080 1082 xs := X + xxt - (W + 1) div 2; 1081 1083 if IsCapital then 1082 FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [ fsUnderline];1084 FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [TFontStyle.fsUnderline]; 1083 1085 Textout(xs + 1, Y - 9, $000000, S); 1084 1086 Textout(xs, Y - 10, $FFFFFF, S); 1085 1087 if IsCapital then 1086 FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [ fsUnderline];1088 FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [TFontStyle.fsUnderline]; 1087 1089 end; 1088 1090 end; … … 1509 1511 Brush.Color := $000000; 1510 1512 FillRect(Rect(FLeft, RealTop, FRight, RealBottom)); 1511 Brush.Style := bsClear;1513 Brush.Style := TBrushStyle.bsClear; 1512 1514 end; 1513 1515 -
trunk/LocalPlayer/KeyBindings.pas
r456 r468 5 5 uses 6 6 Classes, SysUtils, Generics.Collections, Generics.Defaults, LCLProc, LCLType, 7 Menus, Registry; 7 Registry, 8 {$IFDEF DPI}Dpi.Menus{$ELSE}Menus{$ENDIF}; 8 9 9 10 type -
trunk/LocalPlayer/LocalPlayer.pas
r460 r468 7 7 procedure SetAIName(P: Integer; Name: string); 8 8 9 9 10 implementation 10 11 11 12 uses 12 Term, CityScreen, Nego, BaseWin, Forms; 13 Term, CityScreen, Nego, BaseWin, 14 {$IFDEF DPI}Dpi.Forms{$ELSE}Forms{$ENDIF}; 13 15 14 16 var -
trunk/LocalPlayer/MessgEx.pas
r460 r468 6 6 uses 7 7 Messg, Protocol, ScreenTools, Platform, DateUtils, LCLIntf, LCLType, Messages, 8 SysUtils, Classes, Graphics, Controls, Forms, ButtonA, ButtonB, StdCtrls, 9 DrawDlg, Help; 8 SysUtils, Classes, ButtonA, ButtonB, DrawDlg, Help, System.UITypes, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.StdCtrls, Dpi.Common{$ELSE} 10 Graphics, Controls, Forms, StdCtrls{$ENDIF}; 10 11 11 12 type … … 61 62 62 63 uses 63 ClientTools, BaseWin, Term, UnitStat, Tribes, PixelPointer,64 Diagram, Sound;64 {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF} 65 ClientTools, BaseWin, Term, UnitStat, Tribes, Diagram, Sound; 65 66 66 67 {$R *.lfm} -
trunk/LocalPlayer/NatStat.pas
r460 r468 6 6 uses 7 7 Protocol, ClientTools, ScreenTools, BaseWin, LCLIntf, LCLType, SysUtils, 8 Classes, Graphics, Controls, Forms, ButtonB, ButtonC, Menus, EOTButton; 8 Classes, ButtonB, ButtonC, EOTButton, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Menus{$ELSE} 10 Graphics, Controls, Forms, Menus{$ENDIF}; 9 11 10 12 type … … 86 88 87 89 Back := TBitmap.Create; 88 Back.PixelFormat := pf24bit;90 Back.PixelFormat := TPixelFormat.pf24bit; 89 91 Back.SetSize(Width, Height); 90 92 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); 91 93 Template := TBitmap.Create; 92 Template.PixelFormat := pf24bit;94 Template.PixelFormat := TPixelFormat.pf24bit; 93 95 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation.png', 94 96 [gfNoGamma]); … … 359 361 FillRect(Rect(xReport + PaperShade, yReport + hReport, 360 362 xReport + wReport + PaperShade, yReport + hReport + PaperShade)); 361 Brush.Style := bsClear;363 Brush.Style := TBrushStyle.bsClear; 362 364 end; 363 365 -
trunk/LocalPlayer/Nego.pas
r460 r468 5 5 6 6 uses 7 ScreenTools, BaseWin, Protocol, LCLType, SysUtils, Classes, Graphics, 8 Controls, Forms, ButtonA, ButtonB, ButtonN; 7 ScreenTools, BaseWin, Protocol, LCLType, SysUtils, Classes, ButtonA, ButtonB, 8 ButtonN, System.UITypes, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE} 10 Graphics, Controls, Forms{$ENDIF}; 9 11 10 12 const … … 432 434 else 433 435 FillRect(Rect(X, Y, X + 64, Y + 48)); 434 Brush.Style := bsClear;436 Brush.Style := TBrushStyle.bsClear; 435 437 ScreenTools.Frame(Offscreen.Canvas, X - 1, Y - 1, X + 64, Y + 48, $000000, $000000); 436 438 end … … 572 574 FillRect(Rect(xText1 + PaperShade, yText1 + hText, 573 575 xText1 + wText + PaperShade, yText1 + hText + PaperShade)); 574 Brush.Style := bsClear;576 Brush.Style := TBrushStyle.bsClear; 575 577 end; 576 578 -
trunk/LocalPlayer/PVSB.pas
r447 r468 6 6 uses 7 7 {$IFDEF WINDOWS}Windows,{$ENDIF} 8 Classes, Controls, Forms, LCLIntf, LCLType, LMessages, Messages, SysUtils, 9 StdCtrls, Math; 8 Classes, LCLIntf, LCLType, LMessages, Messages, SysUtils, Math, 9 {$IFDEF DPI}Dpi.Controls, Dpi.Forms, Dpi.StdCtrls{$ELSE} 10 Controls, Forms, StdCtrls{$ENDIF}; 10 11 11 12 type … … 183 184 Inc(Count); 184 185 ScrollBar := TScrollBar.Create(Parent); 185 ScrollBar.Kind := sbVertical;186 ScrollBar.Kind := TScrollBarKind.sbVertical; 186 187 ScrollBar.Name := 'PVSB' + IntToStr(Count); 187 ScrollBar.Align := alRight;188 ScrollBar.Align := TAlign.alRight; 188 189 ScrollBar.OnChange := ScrollBarChanged; 189 190 ScrollBar.Parent := Parent; -
trunk/LocalPlayer/Rates.pas
r460 r468 5 5 6 6 uses 7 Protocol, ScreenTools, BaseWin, LCLIntf, LCLType, SysUtils, Classes, Graphics, 8 Controls, Forms, ButtonB, ButtonC; 7 Protocol, ScreenTools, BaseWin, LCLIntf, LCLType, SysUtils, Classes, ButtonB, 8 ButtonC, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE} 10 Graphics, Controls, Forms{$ENDIF}; 9 11 10 12 type … … 124 126 Brush.Color := $000000; 125 127 FillRect(Rect(X, Y, X + Max - current, Y + 7)); 126 Brush.Style := bsClear;128 Brush.Style := TBrushStyle.bsClear; 127 129 end; 128 130 -
trunk/LocalPlayer/Select.pas
r460 r468 5 5 6 6 uses 7 Protocol, ClientTools, ScreenTools, PVSB, BaseWin, 8 LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, 9 ExtCtrls, ButtonB, ButtonBase, Menus, Types; 7 Protocol, ClientTools, ScreenTools, PVSB, BaseWin, System.UITypes, 8 LCLIntf, LCLType, Messages, SysUtils, Classes, ButtonB, ButtonBase, Types, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.ExtCtrls, Dpi.Menus{$ELSE} 10 Graphics, Controls, Forms, ExtCtrls, Menus{$ENDIF}; 10 11 11 12 const … … 118 119 Layer2Btn.Hint := Phrases.Lookup('BTN_CLASSES'); 119 120 ScienceNationDotBuffer := TBitmap.Create; 120 ScienceNationDotBuffer.PixelFormat := pf24bit;121 ScienceNationDotBuffer.PixelFormat := TPixelFormat.pf24bit; 121 122 ScienceNationDotBuffer.SetSize(17, 17); 122 123 ScienceNationDotBuffer.Canvas.FillRect(0, 0, ScienceNationDotBuffer.Width, ScienceNationDotBuffer.Height); … … 276 277 Brush.Color := $FFFFFF; 277 278 FillRect(rect(X - 4 - 12, Y, X - 4 + 12, Y + 20)); 278 Brush. style :=bsClear;279 Brush.Style := TBrushStyle.bsClear; 279 280 Font.Color := $000000; 280 281 S := IntToStr(MyCity[lix].Size); … … 749 750 FillRect(rect(104 - 33 + 14 + TechNameSpace + 24 * I + 1 * 2, 0, 750 751 104 - 33 + 17 + TechNameSpace + 24 * I + 8 * 2, InnerHeight)); 751 Brush. style :=bsClear;752 Brush.Style := TBrushStyle.bsClear; 752 753 end 753 754 else -
trunk/LocalPlayer/TechTree.pas
r460 r468 5 5 6 6 uses 7 ScreenTools, LCLIntf, LCLType, SysUtils, Classes, Graphics, 8 Controls, Forms, ButtonB, DrawDlg; 7 ScreenTools, LCLIntf, LCLType, SysUtils, Classes, ButtonB, DrawDlg, 8 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE} 9 Graphics, Controls, Forms{$ENDIF}; 9 10 10 11 type … … 132 133 if Image = nil then begin 133 134 Image := TBitmap.Create; 134 Image.PixelFormat := pf24bit;135 Image.PixelFormat := TPixelFormat.pf24bit; 135 136 LoadGraphicFile(Image, HomeDir + 'Help' + DirectorySeparator + 'AdvTree.png', 136 137 [gfNoGamma]); … … 140 141 Font.Assign(UniFont[ftSmall]); 141 142 Font.Color := clBlack; 142 Brush.Style := bsClear;143 Brush.Style := TBrushStyle.bsClear; 143 144 for X := 0 to (Image.Width - xStart) div xPitch do 144 145 for Y := 0 to (Image.Height - yStart) div yPitch do … … 186 187 Shift: TShiftState; X, Y: Integer); 187 188 begin 188 if Button = mbLeft then189 if Button = TMouseButton.mbLeft then 189 190 begin 190 191 Dragging := True; -
trunk/LocalPlayer/Term.pas
r462 r468 12 12 {$ENDIF} 13 13 Protocol, Tribes, PVSB, ClientTools, ScreenTools, BaseWin, Messg, ButtonBase, 14 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, DrawDlg,Types,15 Forms, Menus, ExtCtrls, dateutils, Platform, ButtonB, ButtonC, EOTButton, Area,14 LCLIntf, LCLType, SysUtils, Classes, DrawDlg, Types, System.UITypes, 15 DateUtils, Platform, ButtonB, ButtonC, EOTButton, Area, 16 16 GraphicSet, MiniMap, IsoEngine, Wonders, TechTree, Enhance, Nego, CityType, 17 17 Diagram, CityScreen, Rates, Battle, NatStat, UnitStat, Draft, Select, MessgEx, 18 Help; 18 Help, 19 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Menus, Dpi.ExtCtrls, 20 Dpi.PixelPointer, Dpi.Common{$ELSE} 21 Graphics, Controls, Forms, Menus, ExtCtrls, PixelPointer{$ENDIF}; 19 22 20 23 const … … 642 645 643 646 uses 644 Directories, Log, PixelPointer,Sound, Registry, Global, KeyBindings, CmdList;647 Directories, Log, Sound, Registry, Global, KeyBindings, CmdList; 645 648 646 649 {$R *.lfm} … … 1809 1812 HGrStdUnits := LoadGraphicSet('StdUnits.png'); 1810 1813 SmallImp := TBitmap.Create; 1811 SmallImp.PixelFormat := pf24bit;1814 SmallImp.PixelFormat := TPixelFormat.pf24bit; 1812 1815 InitSmallImp; 1813 1816 SoundPreloadDone := []; … … 1869 1872 Brush.Color := $000000; 1870 1873 FillRect(Rect(0, 0, Panel.width, Panel.height)); 1871 Brush.Style := bsClear;1874 Brush.Style := TBrushStyle.bsClear; 1872 1875 end; 1873 1876 with TopBar.Canvas do … … 1875 1878 Brush.Color := $000000; 1876 1879 FillRect(Rect(0, 0, TopBar.width, TopBar.height)); 1877 Brush.Style := bsClear;1880 Brush.Style := TBrushStyle.bsClear; 1878 1881 end; 1879 1882 Invalidate; … … 2885 2888 Brush.Color := $000000; 2886 2889 FillRect(Rect(0, 0, Panel.width, Panel.height)); 2887 Brush.Style := bsClear;2890 Brush.Style := TBrushStyle.bsClear; 2888 2891 end; 2889 2892 with TopBar.Canvas do … … 2891 2894 Brush.Color := $000000; 2892 2895 FillRect(Rect(0, 0, TopBar.width, TopBar.height)); 2893 Brush.Style := bsClear;2896 Brush.Style := TBrushStyle.bsClear; 2894 2897 end; 2895 2898 FormResize(nil); // place mini map correctly according to its size … … 3634 3637 MiniMap := TMiniMap.Create; 3635 3638 Panel := TBitmap.Create; 3636 Panel.PixelFormat := pf24bit;3639 Panel.PixelFormat := TPixelFormat.pf24bit; 3637 3640 Panel.Canvas.Font.Assign(UniFont[ftSmall]); 3638 Panel.Canvas.Brush.Style := bsClear;3641 Panel.Canvas.Brush.Style := TBrushStyle.bsClear; 3639 3642 TopBar := TBitmap.Create; 3640 TopBar.PixelFormat := pf24bit;3643 TopBar.PixelFormat := TPixelFormat.pf24bit; 3641 3644 TopBar.Canvas.Font.Assign(UniFont[ftNormal]); 3642 TopBar.Canvas.Brush.Style := bsClear;3645 TopBar.Canvas.Brush.Style := TBrushStyle.bsClear; 3643 3646 Buffer := TBitmap.Create; 3644 Buffer.PixelFormat := pf24bit;3647 Buffer.PixelFormat := TPixelFormat.pf24bit; 3645 3648 if 2 * lxmax > 3 * xSizeBig then Buffer.width := 2 * lxmax 3646 3649 else Buffer.width := 3 * xSizeBig; … … 4806 4809 Brush.Color := $000000; 4807 4810 FillRect(Rect(0, 0, MapWidth, MapHeight)); 4808 Brush.Style := bsClear;4811 Brush.Style := TBrushStyle.bsClear; 4809 4812 OffscreenUser := self; 4810 4813 Exit; … … 4991 4994 xRightPanel + 2, PanelHeight, ClientWidth div 2); 4992 4995 4993 Brush.Style := bsClear;4996 Brush.Style := TBrushStyle.bsClear; 4994 4997 Pen.Color := $000000; 4995 4998 MoveTo(0, 0); … … 5216 5219 else if TroopLoc >= 0 then 5217 5220 begin 5218 Brush.Style := bsClear;5221 Brush.Style := TBrushStyle.bsClear; 5219 5222 if UnFocus >= 0 then 5220 5223 with MyUn^[UnFocus] do … … 5709 5712 begin 5710 5713 if Idle and (Me >= 0) and (GameMode <> cMovie) then 5711 if ( fsModal in Screen.ActiveForm.FormState) or5714 if (TFormStateType.fsModal in Screen.ActiveForm.FormState) or 5712 5715 (Screen.ActiveForm is TBufferedDrawDlg) and 5713 5716 (TBufferedDrawDlg(Screen.ActiveForm).WindowMode <> wmPersistent) then … … 5865 5868 if (MouseLoc < 0) or (MouseLoc >= G.lx * G.ly) then 5866 5869 Exit; 5867 if (Button = mbLeft) and not(ssShift in Shift) then5870 if (Button = TMouseButton.mbLeft) and not(ssShift in Shift) then 5868 5871 begin 5869 5872 DoCenter := True; … … 5992 5995 end; 5993 5996 end 5994 else if (ClientMode <> cEditMap) and (Button = mbRight) and5997 else if (ClientMode <> cEditMap) and (Button = TMouseButton.mbRight) and 5995 5998 not(ssShift in Shift) then 5996 5999 begin … … 6075 6078 end; 6076 6079 end 6077 else if (Button = mbMiddle) and (UnFocus >= 0) and6080 else if (Button = TMouseButton.mbMiddle) and (UnFocus >= 0) and 6078 6081 (MyModel[MyUn[UnFocus].mix].Kind in [mkSettler, mkSlaves]) then 6079 6082 begin … … 6088 6091 mEnhance.Click; 6089 6092 end 6090 else if (Button = mbLeft) and (ssShift in Shift) and6093 else if (Button = TMouseButton.mbLeft) and (ssShift in Shift) and 6091 6094 (MyMap[MouseLoc] and fTerrain <> fUNKNOWN) then 6092 6095 HelpOnTerrain(MouseLoc, wmPersistent) 6093 else if (ClientMode <= cContinue) and (Button = mbRight) and6096 else if (ClientMode <= cContinue) and (Button = TMouseButton.mbRight) and 6094 6097 (ssShift in Shift) and (UnFocus >= 0) and 6095 6098 (MyMap[MouseLoc] and (fUnit or fOwned) = fUnit) then … … 6867 6870 Exit; 6868 6871 6869 if Button = mbLeft then6872 if Button = TMouseButton.mbLeft then 6870 6873 begin 6871 6874 if (X >= xMini + 2) and (Y >= yMini + 2) and (X < xMini + 2 + 2 * G.lx) and … … 7160 7163 procedure TMainScreen.SetFullScreen(Active: Boolean); 7161 7164 begin 7162 if Active and (CurrentWindowState <> wsFullScreen) then begin7165 if Active and (CurrentWindowState <> TWindowState.wsFullScreen) then begin 7163 7166 PrevWindowState := WindowState; 7164 CurrentWindowState := wsFullScreen;7167 CurrentWindowState := TWindowState.wsFullScreen; 7165 7168 WindowState := CurrentWindowState; 7166 7169 {$IFDEF WINDOWS} … … 7169 7172 BorderIcons := []; 7170 7173 end else 7171 if not Active and (CurrentWindowState = wsFullScreen) then begin7172 if PrevWindowState = wsMaximized then begin7173 CurrentWindowState := wsMaximized;7174 if not Active and (CurrentWindowState = TWindowState.wsFullScreen) then begin 7175 if PrevWindowState = TWindowState.wsMaximized then begin 7176 CurrentWindowState := TWindowState.wsMaximized; 7174 7177 WindowState := CurrentWindowState; 7175 7178 end else begin 7176 CurrentWindowState := wsNormal;7179 CurrentWindowState := TWindowState.wsNormal; 7177 7180 WindowState := CurrentWindowState; 7178 WindowState := wsFullScreen;7181 WindowState := TWindowState.wsFullScreen; 7179 7182 WindowState := CurrentWindowState; 7180 7183 end; … … 7182 7185 BorderStyle := bsSizeable; 7183 7186 {$ENDIF} 7184 BorderIcons := [biSystemMenu, biMinimize, biMaximize]; 7187 BorderIcons := [TBorderIcon.biSystemMenu, TBorderIcon.biMinimize, 7188 TBorderIcon.biMaximize]; 7185 7189 end; 7186 7190 end; … … 7954 7958 MouseLoc := LocationOfScreenPixel(X, Y); 7955 7959 if MouseLoc <> BrushLoc then 7956 MapBoxMouseDown(nil, mbLeft, Shift, X, Y);7960 MapBoxMouseDown(nil, TMouseButton.mbLeft, Shift, X, Y); 7957 7961 end 7958 7962 (* else if Idle and (UnFocus>=0) then … … 8067 8071 TopBarHeight + MapHeight - overlap)); 8068 8072 end; 8069 Brush.Style := bsClear;8073 Brush.Style := TBrushStyle.bsClear; 8070 8074 end; 8071 8075 BitBltCanvas(Canvas, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap, -
trunk/LocalPlayer/Tribes.pas
r464 r468 5 5 6 6 uses 7 Protocol, ScreenTools, LazFileUtils, Classes, Graphics, SysUtils, Global, 8 GraphicSet; 7 Protocol, ScreenTools, LazFileUtils, Classes, SysUtils, Global, 8 GraphicSet, 9 {$IFDEF DPI}Dpi.Graphics{$ELSE}Graphics{$ENDIF}; 10 9 11 10 12 type -
trunk/LocalPlayer/UnitStat.pas
r460 r468 6 6 uses 7 7 Protocol, ClientTools, ScreenTools, BaseWin, LCLIntf, LCLType, SysUtils, 8 Classes, Graphics, Controls, Forms, ButtonB, ButtonC, IsoEngine; 8 Classes, ButtonB, ButtonC, IsoEngine, 9 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE} 10 Graphics, Controls, Forms{$ENDIF}; 9 11 10 12 type … … 79 81 80 82 Back := TBitmap.Create; 81 Back.PixelFormat := pf24bit;83 Back.PixelFormat := TPixelFormat.pf24bit; 82 84 Back.SetSize(5 * wCommon, hMax); 83 85 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); 84 86 Template := TBitmap.Create; 85 Template.PixelFormat := pf24bit;87 Template.PixelFormat := TPixelFormat.pf24bit; 86 88 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit.png', 87 89 [gfNoGamma]); … … 343 345 Brush.Color := $FFFFFF; 344 346 FillRect(Rect(X - 3 + dx, Y + 2, X + W - 1 + dx, Y + 16)); 345 Brush.Style := bsClear;347 Brush.Style := TBrushStyle.bsClear; 346 348 Textout(X - 3 + dx + 1, Y, S); 347 349 Inc(dx, W + 1); … … 349 351 Brush.Color := $C0C0C0; 350 352 FrameRect(Rect(X - 3 + dx, Y + 2, X + 11 + dx, Y + 16)); 351 Brush.Style := bsClear;353 Brush.Style := TBrushStyle.bsClear; 352 354 Sprite(dst, HGrSystem, X - 1 + dx, Y + 4, 10, 10, 353 355 66 + I mod 11 * 11, 137 + I div 11 * 11); … … 512 514 Offscreen.Canvas.FillRect(Rect(xView, yView, xView + 64, 513 515 yView + 16)); 514 Brush.Style := bsClear;516 Brush.Style := TBrushStyle.bsClear; 515 517 end; 516 518 -
trunk/LocalPlayer/Wonders.pas
r460 r468 5 5 6 6 uses 7 ScreenTools, BaseWin, Protocol, LCLIntf, LCLType, SysUtils, Classes, Graphics, 8 Controls, Forms, ButtonB; 7 ScreenTools, BaseWin, Protocol, LCLIntf, LCLType, SysUtils, Classes, ButtonB, 8 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Common{$ELSE} 9 Graphics, Controls, Forms{$ENDIF}; 9 10 10 11 type … … 35 36 36 37 uses 37 Term, ClientTools, Help, Tribes, PixelPointer; 38 {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF} 39 Term, ClientTools, Help, Tribes; 38 40 39 41 {$R *.lfm} … … 67 69 begin 68 70 Canvas.Font.Assign(UniFont[ftNormal]); 69 Canvas.Brush.Style := bsClear;71 Canvas.Brush.Style := TBrushStyle.bsClear; 70 72 InitButtons; 71 73 end;
Note:
See TracChangeset
for help on using the changeset viewer.