Ignore:
Timestamp:
Jun 23, 2019, 3:15:29 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Use DpiControls package for High DPI support.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/LocalPlayer/CityScreen.pas

    r173 r178  
    88  LMessages,
    99  {$ENDIF}
    10   Protocol, ClientTools, Term, ScreenTools, IsoEngine, BaseWin,
     10  Protocol, ClientTools, Term, ScreenTools, IsoEngine, BaseWin, UDpiControls,
    1111  LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls,
    1212  ButtonA, ButtonC, Area, GraphType;
     
    7474    AreaMap: TIsoMap;
    7575    CityMapTemplate, SmallCityMapTemplate, Back, SmallCityMap, ZoomCityMap,
    76       Template: TBitmap;
     76      Template: TDpiBitmap;
    7777    IsPort, ProdHint, AllowChange: boolean;
    7878    procedure InitSmallCityMap;
     
    9090
    9191uses
    92   Select, Messg, MessgEx, Help, Tribes, Directories, Math, PixelPointer, Sound;
     92  Select, Messg, MessgEx, Help, Tribes, Directories, Math;
    9393
    9494{$R *.lfm}
     
    210210  end;
    211211
    212   Back := TBitmap.Create;
     212  Back := TDpiBitmap.Create;
    213213  Back.PixelFormat := pf24bit;
    214214  Back.SetSize(Width, Height);
    215215  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    216   Template := TBitmap.Create;
     216  Template := TDpiBitmap.Create;
    217217  Template.PixelFormat := pf24bit;
    218218  LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'City.png', gfNoGamma);
    219   CityMapTemplate := TBitmap.Create;
     219  CityMapTemplate := TDpiBitmap.Create;
    220220  CityMapTemplate.PixelFormat := pf24bit;
    221221  LoadGraphicFile(CityMapTemplate, HomeDir + 'Graphics' + DirectorySeparator + 'BigCityMap.png', gfNoGamma);
    222   SmallCityMapTemplate := TBitmap.Create;
     222  SmallCityMapTemplate := TDpiBitmap.Create;
    223223  SmallCityMapTemplate.PixelFormat := pf24bit;
    224224  LoadGraphicFile(SmallCityMapTemplate, HomeDir + 'Graphics' + DirectorySeparator + 'SmallCityMap.png',
    225225    gfNoGamma);
    226   SmallCityMap := TBitmap.Create;
     226  SmallCityMap := TDpiBitmap.Create;
    227227  SmallCityMap.PixelFormat := pf24bit;
    228228  SmallCityMap.SetSize(98, 74);
    229229  SmallCityMap.Canvas.FillRect(0, 0, SmallCityMap.Width, SmallCityMap.Height);
    230   ZoomCityMap := TBitmap.Create;
     230  ZoomCityMap := TDpiBitmap.Create;
    231231  ZoomCityMap.PixelFormat := pf24bit;
    232232  ZoomCityMap.SetSize(228, 124);
Note: See TracChangeset for help on using the changeset viewer.