Ignore:
Timestamp:
Apr 9, 2021, 5:56:50 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Merged changes from trunk r360 into highdpi branch.
File:
1 edited

Legend:

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

    r349 r361  
    6363  inherited;
    6464  CaptionRight := CloseBtn.Left;
    65   InitButtons();
     65  InitButtons;
    6666  HelpContext := 'MACRO';
    6767  Caption := Phrases.Lookup('TITLE_CITYTYPES');
     
    7171procedure TCityTypeDlg.CloseBtnClick(Sender: TObject);
    7272begin
    73   Close
     73  Close;
    7474end;
    7575
     
    9393
    9494  Frame(offscreen.Canvas, 0, yList + 32 * nListRow, InnerWidth - 255,
    95     yPool - 23, MainTexture.clBevelLight, MainTexture.clBevelShade);
     95    yPool - 23, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    9696  Frame(offscreen.Canvas, InnerWidth - 254, yList + 32 * nListRow,
    97     InnerWidth - 89, yPool - 23, MainTexture.clBevelLight,
    98     MainTexture.clBevelShade);
     97    InnerWidth - 89, yPool - 23, MainTexture.ColorBevelLight,
     98    MainTexture.ColorBevelShade);
    9999  Frame(offscreen.Canvas, InnerWidth - 88, yList + 32 * nListRow,
    100     InnerWidth - 1, yPool - 23, MainTexture.clBevelLight,
    101     MainTexture.clBevelShade);
     100    InnerWidth - 1, yPool - 23, MainTexture.ColorBevelLight,
     101    MainTexture.ColorBevelShade);
    102102  Frame(offscreen.Canvas, 0, yPool - 22, InnerWidth - 1, yPool - 1,
    103     MainTexture.clBevelLight, MainTexture.clBevelShade);
     103    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    104104  for i := 0 to nCityType - 1 do
    105105  begin
    106106    RFrame(offscreen.Canvas, xSwitch + i * 42, ySwitch, xSwitch + 39 + i * 42,
    107       ySwitch + 23, MainTexture.clBevelShade, MainTexture.clBevelLight);
     107      ySwitch + 23, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    108108    if i = ctype then
    109109      Frame(offscreen.Canvas, xSwitch + 1 + i * 42, ySwitch + 1,
    110         xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.clBevelShade,
    111         MainTexture.clBevelLight)
     110        xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.ColorBevelShade,
     111        MainTexture.ColorBevelLight)
    112112    else
    113113      Frame(offscreen.Canvas, xSwitch + 1 + i * 42, ySwitch + 1,
    114         xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.clBevelLight,
    115         MainTexture.clBevelShade);
     114        xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.ColorBevelLight,
     115        MainTexture.ColorBevelShade);
    116116    DpiBitCanvas(offscreen.Canvas, xSwitch + 2 + i * 42, ySwitch + 2,
    117117      xSizeSmall, ySizeSmall, SmallImp.Canvas, (i + 3) * xSizeSmall, 0);
     
    130130    for i := 1 to nListRow - 1 do
    131131      DLine(offscreen.Canvas, xList - 5, xList + 4 + 42 * nListCol,
    132         yList - 1 + 32 * i, MainTexture.clBevelLight, MainTexture.clBevelShade);
     132        yList - 1 + 32 * i, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    133133    for i := 0 to nListCol * nListRow - 1 do
    134134    begin
    135135      s := IntToStr(i + 1);
    136       Font.Color := MainTexture.clTextLight;
     136      Font.Color := MainTexture.ColorTextLight;
    137137      Textout(xList + 20 + i mod nListCol * 42 - TextWidth(s) div 2,
    138138        yList + 15 + i div nListCol * 32 - TextHeight(s) div 2, s);
    139     end
     139    end;
    140140  end;
    141141
     
    147147      xList + 21 + xSizeSmall div 2 + i mod nListCol * 42,
    148148      yList + 16 + ySizeSmall div 2 + i div nListCol * 32,
    149       MainTexture.clBevelLight, MainTexture.clBevelShade);
     149      MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    150150    DpiBitCanvas(offscreen.Canvas, xList + 21 - xSizeSmall div 2 +
    151151      i mod nListCol * 42, yList + 16 - ySizeSmall div 2 + i div nListCol * 32,
     
    169169        nPool div nPoolCol * 32, xPool + 21 + xSizeSmall div 2 +
    170170        nPool mod nPoolCol * 42, yPool + 16 + ySizeSmall div 2 +
    171         nPool div nPoolCol * 32, MainTexture.clBevelLight,
    172         MainTexture.clBevelShade);
     171        nPool div nPoolCol * 32, MainTexture.ColorBevelLight,
     172        MainTexture.ColorBevelShade);
    173173      DpiBitCanvas(offscreen.Canvas, xPool + 21 - xSizeSmall div 2 +
    174174        nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 +
     
    201201  begin
    202202    include(listed, MyData.ImpOrder[ctype, i]);
    203     inc(i)
    204   end;
    205   Changed := false
     203    inc(i);
     204  end;
     205  Changed := false;
    206206end;
    207207
     
    215215      if (MyCity[cix].Loc >= 0) and (MyCity[cix].Status and 7 = ctype + 1) then
    216216        AutoBuild(cix, MyData.ImpOrder[ctype]);
    217     Changed := false
     217    Changed := false;
    218218  end;
    219219end;
     
    252252      dragiix := MyData.ImpOrder[ctype, i];
    253253      DpiScreen.Cursor := crImpDrag;
    254       SmartUpdateContent
     254      SmartUpdateContent;
    255255    end;
    256256    exit;
     
    268268      dragiix := Pooliix[i];
    269269      DpiScreen.Cursor := crImpDrag;
    270       SmartUpdateContent
     270      SmartUpdateContent;
    271271    end;
    272272    exit;
     
    279279    SaveType;
    280280    LoadType(i);
    281     SmartUpdateContent
    282   end
     281    SmartUpdateContent;
     282  end;
    283283end;
    284284
     
    318318      MyData.ImpOrder[ctype, i] := dragiix;
    319319      include(listed, dragiix);
    320       Changed := true
     320      Changed := true;
    321321    end
    322322    else if (dragiix in listed) and (x >= xPool) and (x < xPool + nPoolCol * 42)
     
    324324    begin
    325325      UnList(dragiix);
    326       Changed := true
     326      Changed := true;
    327327    end;
    328328    dragiix := -1;
    329     SmartUpdateContent
    330   end;
    331   DpiScreen.Cursor := crDefault
     329    SmartUpdateContent;
     330  end;
     331  DpiScreen.Cursor := crDefault;
    332332end;
    333333
Note: See TracChangeset for help on using the changeset viewer.