Changeset 468 for trunk/LocalPlayer


Ignore:
Timestamp:
Dec 3, 2023, 11:28:08 AM (12 months ago)
Author:
chronos
Message:
  • Added: High DPI support integrated into trunk branch. It can be enabled by adding DPI define to compiler parameters for main project and packages.
Location:
trunk/LocalPlayer
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Battle.pas

    r460 r468  
    55
    66uses
    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};
    911
    1012type
     
    236238    Brush.Color := 0;
    237239    FillRect(Rect(0, 0, ClientWidth, ClientHeight));
    238     Brush.Style := bsClear;
     240    Brush.Style := TBrushStyle.bsClear;
    239241    PaintBackground(self, 3 + Border, 3 + Border,
    240242      ClientWidth - (6 + 2 * Border), ClientHeight - (6 + 2 * Border));
  • trunk/LocalPlayer/CityScreen.pas

    r464 r468  
    77  {$IFDEF UNIX}LMessages,{$ENDIF}
    88  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};
    1113
    1214const
     
    224226
    225227  Back := TBitmap.Create;
    226   Back.PixelFormat := pf24bit;
     228  Back.PixelFormat := TPixelFormat.pf24bit;
    227229  Back.SetSize(Width, Height);
    228230  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    229231  Template := TBitmap.Create;
    230   Template.PixelFormat := pf24bit;
     232  Template.PixelFormat := TPixelFormat.pf24bit;
    231233  LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'City.png',
    232234    [gfNoGamma]);
    233235  CityMapTemplate := TBitmap.Create;
    234   CityMapTemplate.PixelFormat := pf24bit;
     236  CityMapTemplate.PixelFormat := TPixelFormat.pf24bit;
    235237  LoadGraphicFile(CityMapTemplate, GetGraphicsDir + DirectorySeparator + 'BigCityMap.png',
    236238    [gfNoGamma]);
    237239  SmallCityMapTemplate := TBitmap.Create;
    238   SmallCityMapTemplate.PixelFormat := pf24bit;
     240  SmallCityMapTemplate.PixelFormat := TPixelFormat.pf24bit;
    239241  LoadGraphicFile(SmallCityMapTemplate, GetGraphicsDir + DirectorySeparator + 'SmallCityMap.png',
    240242    [gfNoGamma]);
    241243  SmallCityMap := TBitmap.Create;
    242   SmallCityMap.PixelFormat := pf24bit;
     244  SmallCityMap.PixelFormat := TPixelFormat.pf24bit;
    243245  SmallCityMap.SetSize(98, 74);
    244246  SmallCityMap.Canvas.FillRect(0, 0, SmallCityMap.Width, SmallCityMap.Height);
    245247  ZoomCityMap := TBitmap.Create;
    246   ZoomCityMap.PixelFormat := pf24bit;
     248  ZoomCityMap.PixelFormat := TPixelFormat.pf24bit;
    247249  ZoomCityMap.SetSize(228, 124);
    248250  ZoomCityMap.Canvas.FillRect(0, 0, ZoomCityMap.Width, ZoomCityMap.Height);
     
    362364      end;
    363365    end;
    364     Brush.style := bsClear;
     366    Brush.style := TBrushStyle.bsClear;
    365367  end;
    366368end;
     
    537539    Brush.Color := $FFFFFF;
    538540    FillRect(Rect(8, 7, 36, 32));
    539     Brush.style := bsClear;
     541    Brush.style := TBrushStyle.bsClear;
    540542    Font.Color := $000000;
    541543    S := IntToStr(C.Size);
     
    810812    Offscreen.Canvas.Brush.Color := MainTexture.ColorMark;
    811813    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;
    813815  end;
    814816  Sprite(Offscreen, HGrSystem, X - 16, Y - 5, 10, 10, 88, 115);
     
    985987        FillRect(Rect(xView + 9, yView + 5, xView + 1 + 72 - 8,
    986988          yView + 5 + 40));
    987         Brush.style := bsClear;
     989        Brush.Style := TBrushStyle.bsClear;
    988990      end;
    989991    end
     
    16241626        FillRect(Rect(xView + 9, yView + 5, xView + 1 + 72 - 8,
    16251627          yView + 5 + 40));
    1626         Brush.style := bsClear;
     1628        Brush.Style := TBrushStyle.bsClear;
    16271629      end
    16281630    else if BlinkTime = 6 then
  • trunk/LocalPlayer/CityType.pas

    r460 r468  
    66uses
    77  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};
    910
    1011type
  • trunk/LocalPlayer/Diagram.pas

    r460 r468  
    55
    66uses
    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}
     9Graphics, Controls, Forms, Menus{$ENDIF};
    910
    1011type
     
    6061  Canvas.Brush.Color := $000000;
    6162  Canvas.FillRect(Rect(Left, Top, Left + Width, Top + 200));
    62   Canvas.Brush.Style := bsClear;
     63  Canvas.Brush.Style := TBrushStyle.bsClear;
    6364    ScreenTools.Frame(Canvas, Left - 1, Top - 1, Left + Width, Top + 200,
    6465      MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
     
    202203      Brush.Color := $000000;
    203204      FillRect(Rect(0, 0, InnerWidth, InnerHeight));
    204       Brush.Style := bsClear;
     205      Brush.Style := TBrushStyle.bsClear;
    205206      Pen.Color := $606060;
    206207      MoveTo(Border, InnerHeight - Border);
  • trunk/LocalPlayer/Diplomacy.pas

    r447 r468  
    88function DipCommandToString(pSender, pTarget, Treaty, OppCommand,
    99  Command: Integer; const OppOffer, Offer: TOffer): string;
     10
    1011
    1112implementation
  • trunk/LocalPlayer/Draft.pas

    r460 r468  
    66uses
    77  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};
    911
    1012type
     
    8385
    8486  Back := TBitmap.Create;
    85   Back.PixelFormat := pf24bit;
     87  Back.PixelFormat := TPixelFormat.pf24bit;
    8688  Back.SetSize(Width, Height);
    8789  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    8890  Template := TBitmap.Create;
    89   Template.PixelFormat := pf24bit;
     91  Template.PixelFormat := TPixelFormat.pf24bit;
    9092  LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes.png',
    9193    [gfNoGamma]);
     
    156158              FrameRect(Rect(xTotal2 - 3 - dx, Y + 2,
    157159                xTotal2 + 11 - dx, Y + 16));
    158               Brush.Style := bsClear;
     160              Brush.Style := TBrushStyle.bsClear;
    159161              Sprite(Offscreen, HGrSystem, xTotal2 - 1 - dx, Y + 4, 10, 10,
    160162                66 + I mod 11 * 11, 137 + I div 11 * 11);
     
    167169                FillRect(Rect(xTotal2 - 3 - dx, Y + 2,
    168170                  xTotal2 + W - 1 - dx, Y + 16));
    169                 Brush.Style := bsClear;
     171                Brush.Style := TBrushStyle.bsClear;
    170172                Textout(xTotal2 - 3 - dx + 1, Y, S);
    171173              end;
     
    508510  I, D: Integer;
    509511begin
    510   if Button = mbLeft then
     512  if Button = TMouseButton.mbLeft then
    511513  begin
    512514    for D := 0 to nDomains - 1 do
  • trunk/LocalPlayer/Enhance.pas

    r460 r468  
    66uses
    77  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
    912
    1013type
  • trunk/LocalPlayer/Help.pas

    r460 r468  
    55
    66uses
    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};
    1011
    1112const
     
    151152
    152153uses
    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;
    155156
    156157{$R *.lfm}
     
    293294  CaptionFont := Font.Create;
    294295  CaptionFont.Assign(UniFont[ftNormal]);
    295   CaptionFont.Style := CaptionFont.Style + [fsItalic, fsBold];
     296  CaptionFont.Style := CaptionFont.Style + [TFontStyle.fsItalic, TFontStyle.fsBold];
    296297  InitButtons;
    297298
     
    302303  ExtPic := TBitmap.Create;
    303304  TerrIcon := TBitmap.Create;
    304   TerrIcon.PixelFormat := pf24bit;
     305  TerrIcon.PixelFormat := TPixelFormat.pf24bit;
    305306  TerrIcon.SetSize(xSizeBig, ySizeBig);
    306307  TerrIcon.Canvas.FillRect(0, 0, TerrIcon.Width, TerrIcon.Height);
     
    699700                FrameRect(Rect(ofs, 1 + 23 + I * 24, ofs + 14,
    700701                  15 + 23 + I * 24));
    701                 Brush.Style := bsClear;
     702                Brush.Style := TBrushStyle.bsClear;
    702703                Sprite(OffScreen, HGrSystem, ofs + 2, 3 + 23 + I * 24, 10, 10,
    703704                  66 + HelpLineInfo.Picpix mod 11 * 11,
  • trunk/LocalPlayer/IsoEngine.pas

    r456 r468  
    66uses
    77  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};
    911
    1012const
     
    215217begin
    216218  LandPatch := TBitmap.Create;
    217   LandPatch.PixelFormat := pf24bit;
     219  LandPatch.PixelFormat := TPixelFormat.pf24bit;
    218220  OceanPatch := TBitmap.Create;
    219   OceanPatch.PixelFormat := pf24bit;
     221  OceanPatch.PixelFormat := TPixelFormat.pf24bit;
    220222  Borders := TBitmap.Create;
    221   Borders.PixelFormat := pf24bit;
     223  Borders.PixelFormat := TPixelFormat.pf24bit;
    222224  HGrTerrain := nil;
    223225  HGrCities := nil;
     
    251253  Mask24 := TBitmap.Create;
    252254  Mask24.Assign(HGrTerrain.Mask);
    253   Mask24.PixelFormat := pf24bit;
     255  Mask24.PixelFormat := TPixelFormat.pf24bit;
    254256  Mask24.BeginUpdate;
    255257  for ySrc := 0 to TerrainIconLines - 1 do begin
     
    344346  OceanPatch.Canvas.FillRect(0, 0, OceanPatch.Width, OceanPatch.Height);
    345347  LandMore := TBitmap.Create;
    346   LandMore.PixelFormat := pf24bit;
     348  LandMore.PixelFormat := TPixelFormat.pf24bit;
    347349  LandMore.Canvas.Brush.Color := 0;
    348350  LandMore.SetSize(xxt * 18, yyt * 9);
    349351  LandMore.Canvas.FillRect(0, 0, LandMore.Width, LandMore.Height);
    350352  OceanMore := TBitmap.Create;
    351   OceanMore.PixelFormat := pf24bit;
     353  OceanMore.PixelFormat := TPixelFormat.pf24bit;
    352354  OceanMore.Canvas.Brush.Color := 0;
    353355  OceanMore.SetSize(xxt * 8, yyt * 4);
    354356  OceanMore.Canvas.FillRect(0, 0, OceanMore.Width, OceanMore.Height);
    355357  DitherMask := TBitmap.Create;
    356   DitherMask.PixelFormat := pf24bit;
     358  DitherMask.PixelFormat := TPixelFormat.pf24bit;
    357359  DitherMask.SetSize(xxt * 2, yyt * 2);
    358360  DitherMask.Canvas.FillRect(0, 0, DitherMask.Width, DitherMask.Height);
     
    584586  FOutput.Canvas.Brush.Color := Color;
    585587  FOutput.Canvas.FillRect(Rect(X, Y, X + Width, Y + Height));
    586   FOutput.Canvas.Brush.Style := bsClear;
     588  FOutput.Canvas.Brush.Style := TBrushStyle.bsClear;
    587589end;
    588590
     
    10801082      xs := X + xxt - (W + 1) div 2;
    10811083      if IsCapital then
    1082         FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [fsUnderline];
     1084        FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [TFontStyle.fsUnderline];
    10831085      Textout(xs + 1, Y - 9, $000000, S);
    10841086      Textout(xs, Y - 10, $FFFFFF, S);
    10851087      if IsCapital then
    1086         FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [fsUnderline];
     1088        FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [TFontStyle.fsUnderline];
    10871089    end;
    10881090  end;
     
    15091511    Brush.Color := $000000;
    15101512    FillRect(Rect(FLeft, RealTop, FRight, RealBottom));
    1511     Brush.Style := bsClear;
     1513    Brush.Style := TBrushStyle.bsClear;
    15121514  end;
    15131515
  • trunk/LocalPlayer/KeyBindings.pas

    r456 r468  
    55uses
    66  Classes, SysUtils, Generics.Collections, Generics.Defaults, LCLProc, LCLType,
    7   Menus, Registry;
     7  Registry,
     8  {$IFDEF DPI}Dpi.Menus{$ELSE}Menus{$ENDIF};
    89
    910type
  • trunk/LocalPlayer/LocalPlayer.pas

    r460 r468  
    77procedure SetAIName(P: Integer; Name: string);
    88
     9
    910implementation
    1011
    1112uses
    12   Term, CityScreen, Nego, BaseWin, Forms;
     13  Term, CityScreen, Nego, BaseWin,
     14  {$IFDEF DPI}Dpi.Forms{$ELSE}Forms{$ENDIF};
    1315
    1416var
  • trunk/LocalPlayer/MessgEx.pas

    r460 r468  
    66uses
    77  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};
    1011
    1112type
     
    6162
    6263uses
    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;
    6566
    6667{$R *.lfm}
  • trunk/LocalPlayer/NatStat.pas

    r460 r468  
    66uses
    77  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};
    911
    1012type
     
    8688
    8789  Back := TBitmap.Create;
    88   Back.PixelFormat := pf24bit;
     90  Back.PixelFormat := TPixelFormat.pf24bit;
    8991  Back.SetSize(Width, Height);
    9092  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    9193  Template := TBitmap.Create;
    92   Template.PixelFormat := pf24bit;
     94  Template.PixelFormat := TPixelFormat.pf24bit;
    9395  LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation.png',
    9496    [gfNoGamma]);
     
    359361        FillRect(Rect(xReport + PaperShade, yReport + hReport,
    360362          xReport + wReport + PaperShade, yReport + hReport + PaperShade));
    361         Brush.Style := bsClear;
     363        Brush.Style := TBrushStyle.bsClear;
    362364      end;
    363365
  • trunk/LocalPlayer/Nego.pas

    r460 r468  
    55
    66uses
    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};
    911
    1012const
     
    432434    else
    433435      FillRect(Rect(X, Y, X + 64, Y + 48));
    434     Brush.Style := bsClear;
     436    Brush.Style := TBrushStyle.bsClear;
    435437    ScreenTools.Frame(Offscreen.Canvas, X - 1, Y - 1, X + 64, Y + 48, $000000, $000000);
    436438  end
     
    572574    FillRect(Rect(xText1 + PaperShade, yText1 + hText,
    573575      xText1 + wText + PaperShade, yText1 + hText + PaperShade));
    574     Brush.Style := bsClear;
     576    Brush.Style := TBrushStyle.bsClear;
    575577  end;
    576578
  • trunk/LocalPlayer/PVSB.pas

    r447 r468  
    66uses
    77  {$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};
    1011
    1112type
     
    183184  Inc(Count);
    184185  ScrollBar := TScrollBar.Create(Parent);
    185   ScrollBar.Kind := sbVertical;
     186  ScrollBar.Kind := TScrollBarKind.sbVertical;
    186187  ScrollBar.Name := 'PVSB' + IntToStr(Count);
    187   ScrollBar.Align := alRight;
     188  ScrollBar.Align := TAlign.alRight;
    188189  ScrollBar.OnChange := ScrollBarChanged;
    189190  ScrollBar.Parent := Parent;
  • trunk/LocalPlayer/Rates.pas

    r460 r468  
    55
    66uses
    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};
    911
    1012type
     
    124126      Brush.Color := $000000;
    125127      FillRect(Rect(X, Y, X + Max - current, Y + 7));
    126       Brush.Style := bsClear;
     128      Brush.Style := TBrushStyle.bsClear;
    127129    end;
    128130
  • trunk/LocalPlayer/Select.pas

    r460 r468  
    55
    66uses
    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};
    1011
    1112const
     
    118119  Layer2Btn.Hint := Phrases.Lookup('BTN_CLASSES');
    119120  ScienceNationDotBuffer := TBitmap.Create;
    120   ScienceNationDotBuffer.PixelFormat := pf24bit;
     121  ScienceNationDotBuffer.PixelFormat := TPixelFormat.pf24bit;
    121122  ScienceNationDotBuffer.SetSize(17, 17);
    122123  ScienceNationDotBuffer.Canvas.FillRect(0, 0, ScienceNationDotBuffer.Width, ScienceNationDotBuffer.Height);
     
    276277          Brush.Color := $FFFFFF;
    277278          FillRect(rect(X - 4 - 12, Y, X - 4 + 12, Y + 20));
    278           Brush.style := bsClear;
     279          Brush.Style := TBrushStyle.bsClear;
    279280          Font.Color := $000000;
    280281          S := IntToStr(MyCity[lix].Size);
     
    749750          FillRect(rect(104 - 33 + 14 + TechNameSpace + 24 * I + 1 * 2, 0,
    750751            104 - 33 + 17 + TechNameSpace + 24 * I + 8 * 2, InnerHeight));
    751           Brush.style := bsClear;
     752          Brush.Style := TBrushStyle.bsClear;
    752753        end
    753754        else
  • trunk/LocalPlayer/TechTree.pas

    r460 r468  
    55
    66uses
    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};
    910
    1011type
     
    132133  if Image = nil then begin
    133134    Image := TBitmap.Create;
    134     Image.PixelFormat := pf24bit;
     135    Image.PixelFormat := TPixelFormat.pf24bit;
    135136    LoadGraphicFile(Image, HomeDir + 'Help' + DirectorySeparator + 'AdvTree.png',
    136137      [gfNoGamma]);
     
    140141      Font.Assign(UniFont[ftSmall]);
    141142      Font.Color := clBlack;
    142       Brush.Style := bsClear;
     143      Brush.Style := TBrushStyle.bsClear;
    143144      for X := 0 to (Image.Width - xStart) div xPitch do
    144145        for Y := 0 to (Image.Height - yStart) div yPitch do
     
    186187  Shift: TShiftState; X, Y: Integer);
    187188begin
    188   if Button = mbLeft then
     189  if Button = TMouseButton.mbLeft then
    189190  begin
    190191    Dragging := True;
  • trunk/LocalPlayer/Term.pas

    r462 r468  
    1212{$ENDIF}
    1313  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,
    1616  GraphicSet, MiniMap, IsoEngine, Wonders, TechTree, Enhance, Nego, CityType,
    1717  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};
    1922
    2023const
     
    642645
    643646uses
    644   Directories, Log, PixelPointer, Sound, Registry, Global, KeyBindings, CmdList;
     647  Directories, Log, Sound, Registry, Global, KeyBindings, CmdList;
    645648
    646649{$R *.lfm}
     
    18091812  HGrStdUnits := LoadGraphicSet('StdUnits.png');
    18101813  SmallImp := TBitmap.Create;
    1811   SmallImp.PixelFormat := pf24bit;
     1814  SmallImp.PixelFormat := TPixelFormat.pf24bit;
    18121815  InitSmallImp;
    18131816  SoundPreloadDone := [];
     
    18691872      Brush.Color := $000000;
    18701873      FillRect(Rect(0, 0, Panel.width, Panel.height));
    1871       Brush.Style := bsClear;
     1874      Brush.Style := TBrushStyle.bsClear;
    18721875    end;
    18731876    with TopBar.Canvas do
     
    18751878      Brush.Color := $000000;
    18761879      FillRect(Rect(0, 0, TopBar.width, TopBar.height));
    1877       Brush.Style := bsClear;
     1880      Brush.Style := TBrushStyle.bsClear;
    18781881    end;
    18791882    Invalidate;
     
    28852888          Brush.Color := $000000;
    28862889          FillRect(Rect(0, 0, Panel.width, Panel.height));
    2887           Brush.Style := bsClear;
     2890          Brush.Style := TBrushStyle.bsClear;
    28882891        end;
    28892892        with TopBar.Canvas do
     
    28912894          Brush.Color := $000000;
    28922895          FillRect(Rect(0, 0, TopBar.width, TopBar.height));
    2893           Brush.Style := bsClear;
     2896          Brush.Style := TBrushStyle.bsClear;
    28942897        end;
    28952898        FormResize(nil); // place mini map correctly according to its size
     
    36343637  MiniMap := TMiniMap.Create;
    36353638  Panel := TBitmap.Create;
    3636   Panel.PixelFormat := pf24bit;
     3639  Panel.PixelFormat := TPixelFormat.pf24bit;
    36373640  Panel.Canvas.Font.Assign(UniFont[ftSmall]);
    3638   Panel.Canvas.Brush.Style := bsClear;
     3641  Panel.Canvas.Brush.Style := TBrushStyle.bsClear;
    36393642  TopBar := TBitmap.Create;
    3640   TopBar.PixelFormat := pf24bit;
     3643  TopBar.PixelFormat := TPixelFormat.pf24bit;
    36413644  TopBar.Canvas.Font.Assign(UniFont[ftNormal]);
    3642   TopBar.Canvas.Brush.Style := bsClear;
     3645  TopBar.Canvas.Brush.Style := TBrushStyle.bsClear;
    36433646  Buffer := TBitmap.Create;
    3644   Buffer.PixelFormat := pf24bit;
     3647  Buffer.PixelFormat := TPixelFormat.pf24bit;
    36453648  if 2 * lxmax > 3 * xSizeBig then Buffer.width := 2 * lxmax
    36463649    else Buffer.width := 3 * xSizeBig;
     
    48064809      Brush.Color := $000000;
    48074810      FillRect(Rect(0, 0, MapWidth, MapHeight));
    4808       Brush.Style := bsClear;
     4811      Brush.Style := TBrushStyle.bsClear;
    48094812      OffscreenUser := self;
    48104813      Exit;
     
    49914994      xRightPanel + 2, PanelHeight, ClientWidth div 2);
    49924995
    4993     Brush.Style := bsClear;
     4996    Brush.Style := TBrushStyle.bsClear;
    49944997    Pen.Color := $000000;
    49954998    MoveTo(0, 0);
     
    52165219    else if TroopLoc >= 0 then
    52175220    begin
    5218       Brush.Style := bsClear;
     5221      Brush.Style := TBrushStyle.bsClear;
    52195222      if UnFocus >= 0 then
    52205223        with MyUn^[UnFocus] do
     
    57095712begin
    57105713  if Idle and (Me >= 0) and (GameMode <> cMovie) then
    5711     if (fsModal in Screen.ActiveForm.FormState) or
     5714    if (TFormStateType.fsModal in Screen.ActiveForm.FormState) or
    57125715      (Screen.ActiveForm is TBufferedDrawDlg) and
    57135716      (TBufferedDrawDlg(Screen.ActiveForm).WindowMode <> wmPersistent) then
     
    58655868  if (MouseLoc < 0) or (MouseLoc >= G.lx * G.ly) then
    58665869    Exit;
    5867   if (Button = mbLeft) and not(ssShift in Shift) then
     5870  if (Button = TMouseButton.mbLeft) and not(ssShift in Shift) then
    58685871  begin
    58695872    DoCenter := True;
     
    59925995    end;
    59935996  end
    5994   else if (ClientMode <> cEditMap) and (Button = mbRight) and
     5997  else if (ClientMode <> cEditMap) and (Button = TMouseButton.mbRight) and
    59955998    not(ssShift in Shift) then
    59965999  begin
     
    60756078      end;
    60766079  end
    6077   else if (Button = mbMiddle) and (UnFocus >= 0) and
     6080  else if (Button = TMouseButton.mbMiddle) and (UnFocus >= 0) and
    60786081    (MyModel[MyUn[UnFocus].mix].Kind in [mkSettler, mkSlaves]) then
    60796082  begin
     
    60886091      mEnhance.Click;
    60896092  end
    6090   else if (Button = mbLeft) and (ssShift in Shift) and
     6093  else if (Button = TMouseButton.mbLeft) and (ssShift in Shift) and
    60916094    (MyMap[MouseLoc] and fTerrain <> fUNKNOWN) then
    60926095    HelpOnTerrain(MouseLoc, wmPersistent)
    6093   else if (ClientMode <= cContinue) and (Button = mbRight) and
     6096  else if (ClientMode <= cContinue) and (Button = TMouseButton.mbRight) and
    60946097    (ssShift in Shift) and (UnFocus >= 0) and
    60956098    (MyMap[MouseLoc] and (fUnit or fOwned) = fUnit) then
     
    68676870    Exit;
    68686871
    6869   if Button = mbLeft then
     6872  if Button = TMouseButton.mbLeft then
    68706873  begin
    68716874    if (X >= xMini + 2) and (Y >= yMini + 2) and (X < xMini + 2 + 2 * G.lx) and
     
    71607163procedure TMainScreen.SetFullScreen(Active: Boolean);
    71617164begin
    7162     if Active and (CurrentWindowState <> wsFullScreen) then begin
     7165    if Active and (CurrentWindowState <> TWindowState.wsFullScreen) then begin
    71637166      PrevWindowState := WindowState;
    7164       CurrentWindowState := wsFullScreen;
     7167      CurrentWindowState := TWindowState.wsFullScreen;
    71657168      WindowState := CurrentWindowState;
    71667169      {$IFDEF WINDOWS}
     
    71697172      BorderIcons := [];
    71707173    end else
    7171     if not Active and (CurrentWindowState = wsFullScreen) then begin
    7172       if PrevWindowState = wsMaximized then begin
    7173         CurrentWindowState := wsMaximized;
     7174    if not Active and (CurrentWindowState = TWindowState.wsFullScreen) then begin
     7175      if PrevWindowState = TWindowState.wsMaximized then begin
     7176        CurrentWindowState := TWindowState.wsMaximized;
    71747177        WindowState := CurrentWindowState;
    71757178      end else begin
    7176         CurrentWindowState := wsNormal;
     7179        CurrentWindowState := TWindowState.wsNormal;
    71777180        WindowState := CurrentWindowState;
    7178         WindowState := wsFullScreen;
     7181        WindowState := TWindowState.wsFullScreen;
    71797182        WindowState := CurrentWindowState;
    71807183      end;
     
    71827185      BorderStyle := bsSizeable;
    71837186      {$ENDIF}
    7184       BorderIcons := [biSystemMenu, biMinimize, biMaximize];
     7187      BorderIcons := [TBorderIcon.biSystemMenu, TBorderIcon.biMinimize,
     7188        TBorderIcon.biMaximize];
    71857189    end;
    71867190end;
     
    79547958    MouseLoc := LocationOfScreenPixel(X, Y);
    79557959    if MouseLoc <> BrushLoc then
    7956       MapBoxMouseDown(nil, mbLeft, Shift, X, Y);
     7960      MapBoxMouseDown(nil, TMouseButton.mbLeft, Shift, X, Y);
    79577961  end
    79587962  (* else if Idle and (UnFocus>=0) then
     
    80678071          TopBarHeight + MapHeight - overlap));
    80688072      end;
    8069       Brush.Style := bsClear;
     8073      Brush.Style := TBrushStyle.bsClear;
    80708074    end;
    80718075  BitBltCanvas(Canvas, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap,
  • trunk/LocalPlayer/Tribes.pas

    r464 r468  
    55
    66uses
    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
    911
    1012type
  • trunk/LocalPlayer/UnitStat.pas

    r460 r468  
    66uses
    77  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};
    911
    1012type
     
    7981
    8082  Back := TBitmap.Create;
    81   Back.PixelFormat := pf24bit;
     83  Back.PixelFormat := TPixelFormat.pf24bit;
    8284  Back.SetSize(5 * wCommon, hMax);
    8385  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    8486  Template := TBitmap.Create;
    85   Template.PixelFormat := pf24bit;
     87  Template.PixelFormat := TPixelFormat.pf24bit;
    8688  LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit.png',
    8789    [gfNoGamma]);
     
    343345              Brush.Color := $FFFFFF;
    344346              FillRect(Rect(X - 3 + dx, Y + 2, X + W - 1 + dx, Y + 16));
    345               Brush.Style := bsClear;
     347              Brush.Style := TBrushStyle.bsClear;
    346348              Textout(X - 3 + dx + 1, Y, S);
    347349              Inc(dx, W + 1);
     
    349351            Brush.Color := $C0C0C0;
    350352            FrameRect(Rect(X - 3 + dx, Y + 2, X + 11 + dx, Y + 16));
    351             Brush.Style := bsClear;
     353            Brush.Style := TBrushStyle.bsClear;
    352354            Sprite(dst, HGrSystem, X - 1 + dx, Y + 4, 10, 10,
    353355              66 + I mod 11 * 11, 137 + I div 11 * 11);
     
    512514            Offscreen.Canvas.FillRect(Rect(xView, yView, xView + 64,
    513515              yView + 16));
    514             Brush.Style := bsClear;
     516            Brush.Style := TBrushStyle.bsClear;
    515517          end;
    516518
  • trunk/LocalPlayer/Wonders.pas

    r460 r468  
    55
    66uses
    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};
    910
    1011type
     
    3536
    3637uses
    37   Term, ClientTools, Help, Tribes, PixelPointer;
     38  {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF}
     39  Term, ClientTools, Help, Tribes;
    3840
    3941{$R *.lfm}
     
    6769begin
    6870  Canvas.Font.Assign(UniFont[ftNormal]);
    69   Canvas.Brush.Style := bsClear;
     71  Canvas.Brush.Style := TBrushStyle.bsClear;
    7072  InitButtons;
    7173end;
Note: See TracChangeset for help on using the changeset viewer.