Changeset 361 for branches/highdpi/LocalPlayer/CityType.pas
- Timestamp:
- Apr 9, 2021, 5:56:50 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/CityType.pas
r349 r361 63 63 inherited; 64 64 CaptionRight := CloseBtn.Left; 65 InitButtons ();65 InitButtons; 66 66 HelpContext := 'MACRO'; 67 67 Caption := Phrases.Lookup('TITLE_CITYTYPES'); … … 71 71 procedure TCityTypeDlg.CloseBtnClick(Sender: TObject); 72 72 begin 73 Close 73 Close; 74 74 end; 75 75 … … 93 93 94 94 Frame(offscreen.Canvas, 0, yList + 32 * nListRow, InnerWidth - 255, 95 yPool - 23, MainTexture. clBevelLight, MainTexture.clBevelShade);95 yPool - 23, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 96 96 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); 99 99 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); 102 102 Frame(offscreen.Canvas, 0, yPool - 22, InnerWidth - 1, yPool - 1, 103 MainTexture. clBevelLight, MainTexture.clBevelShade);103 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 104 104 for i := 0 to nCityType - 1 do 105 105 begin 106 106 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); 108 108 if i = ctype then 109 109 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) 112 112 else 113 113 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); 116 116 DpiBitCanvas(offscreen.Canvas, xSwitch + 2 + i * 42, ySwitch + 2, 117 117 xSizeSmall, ySizeSmall, SmallImp.Canvas, (i + 3) * xSizeSmall, 0); … … 130 130 for i := 1 to nListRow - 1 do 131 131 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); 133 133 for i := 0 to nListCol * nListRow - 1 do 134 134 begin 135 135 s := IntToStr(i + 1); 136 Font.Color := MainTexture. clTextLight;136 Font.Color := MainTexture.ColorTextLight; 137 137 Textout(xList + 20 + i mod nListCol * 42 - TextWidth(s) div 2, 138 138 yList + 15 + i div nListCol * 32 - TextHeight(s) div 2, s); 139 end 139 end; 140 140 end; 141 141 … … 147 147 xList + 21 + xSizeSmall div 2 + i mod nListCol * 42, 148 148 yList + 16 + ySizeSmall div 2 + i div nListCol * 32, 149 MainTexture. clBevelLight, MainTexture.clBevelShade);149 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 150 150 DpiBitCanvas(offscreen.Canvas, xList + 21 - xSizeSmall div 2 + 151 151 i mod nListCol * 42, yList + 16 - ySizeSmall div 2 + i div nListCol * 32, … … 169 169 nPool div nPoolCol * 32, xPool + 21 + xSizeSmall div 2 + 170 170 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); 173 173 DpiBitCanvas(offscreen.Canvas, xPool + 21 - xSizeSmall div 2 + 174 174 nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 + … … 201 201 begin 202 202 include(listed, MyData.ImpOrder[ctype, i]); 203 inc(i) 204 end; 205 Changed := false 203 inc(i); 204 end; 205 Changed := false; 206 206 end; 207 207 … … 215 215 if (MyCity[cix].Loc >= 0) and (MyCity[cix].Status and 7 = ctype + 1) then 216 216 AutoBuild(cix, MyData.ImpOrder[ctype]); 217 Changed := false 217 Changed := false; 218 218 end; 219 219 end; … … 252 252 dragiix := MyData.ImpOrder[ctype, i]; 253 253 DpiScreen.Cursor := crImpDrag; 254 SmartUpdateContent 254 SmartUpdateContent; 255 255 end; 256 256 exit; … … 268 268 dragiix := Pooliix[i]; 269 269 DpiScreen.Cursor := crImpDrag; 270 SmartUpdateContent 270 SmartUpdateContent; 271 271 end; 272 272 exit; … … 279 279 SaveType; 280 280 LoadType(i); 281 SmartUpdateContent 282 end 281 SmartUpdateContent; 282 end; 283 283 end; 284 284 … … 318 318 MyData.ImpOrder[ctype, i] := dragiix; 319 319 include(listed, dragiix); 320 Changed := true 320 Changed := true; 321 321 end 322 322 else if (dragiix in listed) and (x >= xPool) and (x < xPool + nPoolCol * 42) … … 324 324 begin 325 325 UnList(dragiix); 326 Changed := true 326 Changed := true; 327 327 end; 328 328 dragiix := -1; 329 SmartUpdateContent 330 end; 331 DpiScreen.Cursor := crDefault 329 SmartUpdateContent; 330 end; 331 DpiScreen.Cursor := crDefault; 332 332 end; 333 333
Note:
See TracChangeset
for help on using the changeset viewer.