Ignore:
Timestamp:
May 9, 2020, 4:02:07 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Improved HighDPI branch. Imported new changes from trunk branch.
File:
1 edited

Legend:

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

    r179 r210  
    55
    66uses
    7   Protocol, ClientTools, Term, ScreenTools, BaseWin, LCLIntf, LCLType,
     7  UDpiControls, Protocol, ClientTools, Term, ScreenTools, BaseWin, LCLIntf, LCLType,
    88  SysUtils, Classes, Graphics, Controls, Forms,
    99  ButtonB, ExtCtrls;
     
    3939  CityTypeDlg: TCityTypeDlg;
    4040
    41 
    4241implementation
    4342
    44 uses
    45   Help, UDpiControls;
     43uses Help;
    4644
    4745{$R *.lfm}
     
    116114        xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.clBevelLight,
    117115        MainTexture.clBevelShade);
    118     DpiBitBlt(offscreen.Canvas.Handle, xSwitch + 2 + i * 42, ySwitch + 2,
    119       xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle, (i + 3) * xSizeSmall,
    120       0, SRCCOPY)
     116    DpiBitCanvas(offscreen.Canvas, xSwitch + 2 + i * 42, ySwitch + 2,
     117      xSizeSmall, ySizeSmall, SmallImp.Canvas, (i + 3) * xSizeSmall, 0);
    121118  end;
    122119  RisedTextOut(offscreen.Canvas, 8, yList + 32 * nListRow + 2,
     
    151148      yList + 16 + ySizeSmall div 2 + i div nListCol * 32,
    152149      MainTexture.clBevelLight, MainTexture.clBevelShade);
    153     DpiBitBlt(offscreen.Canvas.Handle, xList + 21 - xSizeSmall div 2 +
     150    DpiBitCanvas(offscreen.Canvas, xList + 21 - xSizeSmall div 2 +
    154151      i mod nListCol * 42, yList + 16 - ySizeSmall div 2 + i div nListCol * 32,
    155       xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
     152      xSizeSmall, ySizeSmall, SmallImp.Canvas,
    156153      MyData.ImpOrder[ctype, i] mod 7 * xSizeSmall,
    157154      (MyData.ImpOrder[ctype, i] + SystemIconLines * 7) div 7 *
    158       ySizeSmall, SRCCOPY);
     155      ySizeSmall);
    159156    inc(i);
    160157  end;
     
    174171        nPool div nPoolCol * 32, MainTexture.clBevelLight,
    175172        MainTexture.clBevelShade);
    176       DpiBitBlt(offscreen.Canvas.Handle, xPool + 21 - xSizeSmall div 2 +
     173      DpiBitCanvas(offscreen.Canvas, xPool + 21 - xSizeSmall div 2 +
    177174        nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 +
    178         nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
     175        nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp.Canvas,
    179176        iix mod 7 * xSizeSmall, (iix + SystemIconLines * 7) div 7 *
    180         ySizeSmall, SRCCOPY);
    181       inc(nPool)
     177        ySizeSmall);
     178      inc(nPool);
    182179    end;
    183180  DeleteBtn.Visible := MyData.ImpOrder[ctype, 0] >= 0;
     
    254251    begin
    255252      dragiix := MyData.ImpOrder[ctype, i];
    256       Screen.Cursor := crImpDrag;
     253      DpiScreen.Cursor := crImpDrag;
    257254      SmartUpdateContent
    258255    end;
     
    270267    begin
    271268      dragiix := Pooliix[i];
    272       Screen.Cursor := crImpDrag;
     269      DpiScreen.Cursor := crImpDrag;
    273270      SmartUpdateContent
    274271    end;
     
    332329    SmartUpdateContent
    333330  end;
    334   Screen.Cursor := crDefault
     331  DpiScreen.Cursor := crDefault
    335332end;
    336333
Note: See TracChangeset for help on using the changeset viewer.