Ignore:
Timestamp:
Dec 3, 2023, 11:28:08 AM (5 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.