- Timestamp:
- Apr 8, 2021, 9:57:38 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/CityScreen.pas
r352 r356 15 15 type 16 16 TCityCloseAction = (None, RestoreFocus, StepFocus); 17 TSmallMapMode = (smSupportedUnits, smImprovements); 17 18 18 19 TCityDlg = class(TBufferedDrawDlg) … … 59 60 cix: Integer; 60 61 cLoc: Integer; 61 Mode: Integer;62 SmallMapMode: TSmallMapMode; 62 63 ZoomArea: Integer; 63 64 Page: Integer; … … 111 112 112 113 const 113 { modes }114 mSupp = 1;115 mImp = 2;116 117 114 wBar = 106; 118 115 xDiv = 400; … … 205 202 AreaMap.SetPaintBounds(xmArea - 192, ymArea - 96 - 32, xmArea + 192, 206 203 ymArea + 96); 207 Mode := mImp;204 SmallMapMode := smImprovements; 208 205 ZoomArea := 1; 209 206 ProdHint := false; … … 269 266 procedure TCityDlg.Reset; 270 267 begin 271 Mode := mImp;268 SmallMapMode := smImprovements; 272 269 ZoomArea := 1; 273 270 end; … … 375 372 BitBltCanvas(ZoomCityMap.Canvas, 0, 0, wZoomMap, hZoomMap, 376 373 Back.Canvas, xZoomMap, yZoomMap); 377 if Mode = mImpthen begin374 if SmallMapMode = smImprovements then begin 378 375 if ZoomArea < 3 then begin 379 376 ImageOp_B(ZoomCityMap, CityMapTemplate, 0, 0, 376 * SizeClass, … … 795 792 BitBltCanvas(offscreen.Canvas, xSmallMap, ySmallMap, wSmallMap, hSmallMap, 796 793 SmallCityMap.Canvas, 0, 0); 797 if Mode = mImpthen794 if SmallMapMode = smImprovements then 798 795 Frame(offscreen.Canvas, xSmallMap + 48 * (ZoomArea div 3), 799 796 ySmallMap + 24 * (ZoomArea mod 3), xSmallMap + 48 * (ZoomArea div 3) + 49, … … 811 808 x := xSupport + wSupport div 2; 812 809 y := ySupport + hSupport div 2; 813 if Mode = mSuppthen810 if SmallMapMode = smSupportedUnits then 814 811 begin 815 812 offscreen.Canvas.brush.Color := MainTexture.ColorMark; … … 826 823 for i := 0 to 5 do 827 824 imix[i] := -1; 828 if Mode = mImpthen825 if SmallMapMode = smImprovements then 829 826 begin 830 827 if ZoomArea = 5 then … … 918 915 Imp5Area.Hint := ''; 919 916 end 920 else { if mode=mSuppthen }917 else { if SmallMapMode=smSupportedUnits then } 921 918 begin 922 919 LoweredTextout(offscreen.Canvas, -1, MainTexture, xZoomMap + 6, … … 1049 1046 else { enemy city } 1050 1047 begin 1051 Mode := mImp;1048 SmallMapMode := smImprovements; 1052 1049 Server(sGetCity, me, cLoc, GetCityData); 1053 1050 c := GetCityData.c; … … 1147 1144 (y >= ySmallMap) and (y < ySmallMap + hSmallMap) then 1148 1145 begin 1149 Mode := mImp;1146 SmallMapMode := smImprovements; 1150 1147 ZoomArea := (y - ySmallMap) * 3 div hSmallMap + 3 * 1151 1148 ((x - xSmallMap) * 2 div wSmallMap); … … 1158 1155 (y >= ySupport) and (y < ySupport + hSupport) then 1159 1156 begin 1160 Mode := mSupp;1157 SmallMapMode := smSupportedUnits; 1161 1158 Page := 0; 1162 1159 InitZoomCityMap; … … 1190 1187 ChooseProject; 1191 1188 end 1192 else if ( Mode = mImp) and (x >= xZoomMap) and (x < xZoomMap + wZoomMap) and1189 else if (SmallMapMode = smImprovements) and (x >= xZoomMap) and (x < xZoomMap + wZoomMap) and 1193 1190 (y >= yZoomMap) and (y < yZoomMap + hZoomMap) then 1194 1191 begin … … 1204 1201 if iix >= 0 then 1205 1202 if ssShift in Shift then 1206 HelpDlg.ShowNewContent( Mode or wmPersistent, hkImp, iix)1203 HelpDlg.ShowNewContent(FWindowMode or wmPersistent, hkImp, iix) 1207 1204 else if (ClientMode < scContact) then 1208 1205 with MessgExDlg do … … 1301 1298 end; 1302 1299 end 1303 else if ( Mode = mSupp) and (x >= xZoomMap) and (x < xZoomMap + wZoomMap) and1300 else if (SmallMapMode = smSupportedUnits) and (x >= xZoomMap) and (x < xZoomMap + wZoomMap) and 1304 1301 (y >= yZoomMap) and (y < yZoomMap + hZoomMap) then 1305 1302 begin … … 1336 1333 Loc1 := dLoc(cLoc, dx, dy); 1337 1334 if (Loc1 >= 0) and (Loc1 < G.lx * G.ly) then 1338 HelpOnTerrain(Loc1, Mode or wmPersistent)1335 HelpOnTerrain(Loc1, FWindowMode or wmPersistent) 1339 1336 end 1340 1337 else if (ClientMode < scContact) and (cGov <> gAnarchy) and
Note:
See TracChangeset
for help on using the changeset viewer.