Changeset 361 for branches/highdpi/LocalPlayer
- Timestamp:
- Apr 9, 2021, 5:56:50 PM (4 years ago)
- Location:
- branches/highdpi/LocalPlayer
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/Battle.pas
r349 r361 206 206 OKBtn.Caption := Phrases.Lookup('BTN_YES'); 207 207 CancelBtn.Caption := Phrases.Lookup('BTN_NO'); 208 InitButtons ();208 InitButtons; 209 209 end; 210 210 … … 243 243 end; 244 244 Frame(Canvas, Border + 1, Border + 1, ClientWidth - (2 + Border), 245 ClientHeight - (2 + Border), MainTexture. clBevelLight,246 MainTexture. clBevelShade);245 ClientHeight - (2 + Border), MainTexture.ColorBevelLight, 246 MainTexture.ColorBevelShade); 247 247 Frame(Canvas, 2 + Border, 2 + Border, ClientWidth - (3 + Border), 248 ClientHeight - (3 + Border), MainTexture. clBevelLight,249 MainTexture. clBevelShade);248 ClientHeight - (3 + Border), MainTexture.ColorBevelLight, 249 MainTexture.ColorBevelShade); 250 250 251 251 if IsSuicideQuery then -
branches/highdpi/LocalPlayer/CityScreen.pas
r349 r361 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; … … 73 74 CityAreaInfo: TCityAreaInfo; 74 75 AreaMap: TIsoMap; 76 NoMap: TIsoMap; 75 77 CityMapTemplate: TDpiBitmap; 76 78 SmallCityMapTemplate: TDpiBitmap; … … 82 84 ProdHint: Boolean; 83 85 AllowChange: Boolean; 86 RedTex: TTexture; 87 BarTex: TTexture; 84 88 procedure InitSmallCityMap; 85 89 procedure InitZoomCityMap; … … 109 113 110 114 const 111 { modes }112 mSupp = 1;113 mImp = 2;114 115 115 wBar = 106; 116 116 xDiv = 400; … … 197 197 begin 198 198 inherited; 199 RedTex := TTexture.Create; 200 BarTex := TTexture.Create; 201 NoMap := TIsoMap.Create; 199 202 AreaMap := TIsoMap.Create; 200 203 AreaMap.SetOutput(offscreen); 201 204 AreaMap.SetPaintBounds(xmArea - 192, ymArea - 96 - 32, xmArea + 192, 202 205 ymArea + 96); 203 Mode := mImp;206 SmallMapMode := smImprovements; 204 207 ZoomArea := 1; 205 208 ProdHint := false; … … 208 211 AgePrepared := -2; 209 212 Optimize_cixTileChange := -1; 210 InitButtons ();213 InitButtons; 211 214 // InitWindowRegion; 212 215 CloseBtn.Caption := Phrases.Lookup('BTN_OK'); … … 252 255 procedure TCityDlg.FormDestroy(Sender: TObject); 253 256 begin 257 FreeAndNil(NoMap); 254 258 FreeAndNil(AreaMap); 255 259 FreeAndNil(SmallCityMap); … … 259 263 FreeAndNil(Template); 260 264 FreeAndNil(Back); 265 FreeAndNil(RedTex); 266 FreeAndNil(BarTex); 261 267 end; 262 268 263 269 procedure TCityDlg.Reset; 264 270 begin 265 Mode := mImp;271 SmallMapMode := smImprovements; 266 272 ZoomArea := 1; 267 273 end; … … 269 275 procedure TCityDlg.CheckAge; 270 276 begin 271 if MainTextureAge <> AgePrepared then 272 begin 273 AgePrepared := MainTextureAge; 277 if MainTexture.Age <> AgePrepared then begin 278 AgePrepared := MainTexture.Age; 274 279 275 280 UnshareBitmap(Back); … … 370 375 DpiBitCanvas(ZoomCityMap.Canvas, 0, 0, wZoomMap, hZoomMap, 371 376 Back.Canvas, xZoomMap, yZoomMap); 372 if Mode = mImpthen begin377 if SmallMapMode = smImprovements then begin 373 378 if ZoomArea < 3 then begin 374 379 ImageOp_B(ZoomCityMap, CityMapTemplate, 0, 0, 376 * SizeClass, … … 388 393 procedure FillBar(x, y, pos, Growth, max, Kind: integer; 389 394 IndicateComplete: boolean); 390 var 391 Tex: TTexture; 392 begin 393 Tex := MainTexture; 394 if Kind = 3 then 395 begin 396 Tex.clBevelLight := HGrSystem.Data.Canvas.Pixels[104, 36]; 397 Tex.clBevelShade := Tex.clBevelLight; 395 begin 396 BarTex.Assign(MainTexture); 397 if Kind = 3 then begin 398 BarTex.ColorBevelLight := HGrSystem.Data.Canvas.Pixels[104, 36]; 399 BarTex.ColorBevelShade := BarTex.ColorBevelLight; 398 400 end; 399 401 PaintRelativeProgressBar(offscreen.Canvas, Kind, x - 3, y, wBar - 4, pos, 400 Growth, max, IndicateComplete, Tex);402 Growth, max, IndicateComplete, BarTex); 401 403 end; 402 404 … … 492 494 UnitInfo: TUnitInfo; 493 495 UnitReport: TUnitReport; 494 RedTex: TTexture;495 496 IsCityAlive, CanGrow: boolean; 496 497 begin … … 524 525 Report.Working := c.Size; 525 526 526 RedTex := MainTexture;527 RedTex. clBevelLight := $0000FF;528 RedTex. clBevelShade := $000000;529 RedTex. clTextLight := $000000;530 RedTex. clTextShade := $0000FF;527 RedTex.Assign(MainTexture); 528 RedTex.ColorBevelLight := $0000FF; 529 RedTex.ColorBevelShade := $000000; 530 RedTex.ColorTextLight := $000000; 531 RedTex.ColorTextShade := $0000FF; 531 532 532 533 DpiBitCanvas(offscreen.Canvas, 0, 0, 640, 480, Back.Canvas, 0, 0); … … 596 597 597 598 with AreaMap do begin 598 rx := (192 + xxt * 2 - 1) div (xxt * 2); 599 ry := (96 + yyt * 2 - 1) div (yyt * 2); 600 AreaMap.Paint(xmArea - xxt * 2 * rx, ymArea - yyt * 2 * ry - 3 * yyt, 601 dLoc(cLoc, -2 * rx + 1, -2 * ry - 1), 4 * rx - 1, 4 * ry + 1, cLoc, cOwner, 602 false, AllowChange and IsCityAlive and 603 (c.Status and csResourceWeightsMask = 0)); 604 DpiBitCanvas(offscreen.Canvas, xmArea + 102, 42, 90, 33, Back.Canvas, 605 xmArea + 102, 42); 606 607 if IsCityAlive then 608 for dy := -3 to 3 do 609 for dx := -3 to 3 do 610 if ((dx + dy) and 1 = 0) and (dx * dx * dy * dy < 81) then 611 begin 612 Loc1 := dLoc(cLoc, dx, dy); 613 av := CityAreaInfo.Available[(dy + 3) shl 2 + (dx + 3) shr 1]; 614 if ((av = faNotAvailable) or (av = faTreaty) or (av = faInvalid)) and 615 ((Loc1 < 0) or (Loc1 >= G.lx * G.ly) or (MyMap[Loc1] and fCity = 0)) 616 then 617 Sprite(offscreen, HGrTerrain, xmArea - xxt + xxt * dx, 618 ymArea - yyt + yyt * dy, xxt * 2, yyt * 2, 1 + 5 * (xxt * 2 + 1), 619 1 + yyt + 15 * (yyt * 3 + 1)); 620 if (1 shl ((dy + 3) shl 2 + (dx + 3) shr 1) and c.Tiles <> 0) then 621 PaintResources(xmArea - xxt + xxt * dx, ymArea - yyt + yyt * dy, 622 Loc1, (dx = 0) and (dy = 0)); 623 end; 599 rx := (192 + xxt * 2 - 1) div (xxt * 2); 600 ry := (96 + yyt * 2 - 1) div (yyt * 2); 601 AreaMap.Paint(xmArea - xxt * 2 * rx, ymArea - yyt * 2 * ry - 3 * yyt, 602 dLoc(cLoc, -2 * rx + 1, -2 * ry - 1), 4 * rx - 1, 4 * ry + 1, cLoc, cOwner, 603 false, AllowChange and IsCityAlive and 604 (c.Status and csResourceWeightsMask = 0)); 605 DpiBitCanvas(offscreen.Canvas, xmArea + 102, 42, 90, 33, Back.Canvas, 606 xmArea + 102, 42); 607 608 if IsCityAlive then 609 for dy := -3 to 3 do 610 for dx := -3 to 3 do 611 if ((dx + dy) and 1 = 0) and (dx * dx * dy * dy < 81) then begin 612 Loc1 := dLoc(cLoc, dx, dy); 613 av := CityAreaInfo.Available[(dy + 3) shl 2 + (dx + 3) shr 1]; 614 if ((av = faNotAvailable) or (av = faTreaty) or (av = faInvalid)) and 615 ((Loc1 < 0) or (Loc1 >= G.lx * G.ly) or (MyMap[Loc1] and fCity = 0)) 616 then 617 Sprite(offscreen, HGrTerrain, xmArea - xxt + xxt * dx, 618 ymArea - yyt + yyt * dy, xxt * 2, yyt * 2, 1 + 5 * (xxt * 2 + 1), 619 1 + yyt + 15 * (yyt * 3 + 1)); 620 if (1 shl ((dy + 3) shl 2 + (dx + 3) shr 1) and c.Tiles <> 0) then 621 PaintResources(xmArea - xxt + xxt * dx, ymArea - yyt + yyt * dy, 622 Loc1, (dx = 0) and (dy = 0)); 623 end; 624 624 end; 625 625 … … 794 794 DpiBitCanvas(offscreen.Canvas, xSmallMap, ySmallMap, wSmallMap, hSmallMap, 795 795 SmallCityMap.Canvas, 0, 0); 796 if Mode = mImpthen796 if SmallMapMode = smImprovements then 797 797 Frame(offscreen.Canvas, xSmallMap + 48 * (ZoomArea div 3), 798 798 ySmallMap + 24 * (ZoomArea mod 3), xSmallMap + 48 * (ZoomArea div 3) + 49, 799 ySmallMap + 24 * (ZoomArea mod 3) + 25, MainTexture. clMark,800 MainTexture. clMark);799 ySmallMap + 24 * (ZoomArea mod 3) + 25, MainTexture.ColorMark, 800 MainTexture.ColorMark); 801 801 Frame(offscreen.Canvas, xSmallMap - 1, ySmallMap - 1, xSmallMap + wSmallMap, 802 802 ySmallMap + hSmallMap, $B0B0B0, $FFFFFF); … … 810 810 x := xSupport + wSupport div 2; 811 811 y := ySupport + hSupport div 2; 812 if Mode = mSuppthen813 begin 814 offscreen.Canvas.brush.Color := MainTexture. clMark;812 if SmallMapMode = smSupportedUnits then 813 begin 814 offscreen.Canvas.brush.Color := MainTexture.ColorMark; 815 815 offscreen.Canvas.FillRect(Rect(x - 27, y - 6, x + 27, y + 6)); 816 816 offscreen.Canvas.brush.style := bsClear; … … 825 825 for i := 0 to 5 do 826 826 imix[i] := -1; 827 if Mode = mImpthen827 if SmallMapMode = smImprovements then 828 828 begin 829 829 if ZoomArea = 5 then … … 917 917 Imp5Area.Hint := ''; 918 918 end 919 else { if mode=mSuppthen }919 else { if SmallMapMode = smSupportedUnits then } 920 920 begin 921 921 LoweredTextout(offscreen.Canvas, -1, MainTexture, xZoomMap + 6, … … 934 934 y := ((Cnt - 6 * Page) div 3) * 52 + yZoomMap + 20; 935 935 MakeUnitInfo(me, MyUn[i], UnitInfo); 936 AreaMap.SetOutput(offscreen);937 AreaMap.PaintUnit(x, y, UnitInfo, MyUn[i].Status);936 NoMap.SetOutput(offscreen); 937 NoMap.PaintUnit(x, y, UnitInfo, MyUn[i].Status); 938 938 939 939 for j := 0 to UnitReport.FoodSupport - 1 do … … 1048 1048 else { enemy city } 1049 1049 begin 1050 Mode := mImp;1050 SmallMapMode := smImprovements; 1051 1051 Server(sGetCity, me, cLoc, GetCityData); 1052 1052 c := GetCityData.c; … … 1146 1146 (y >= ySmallMap) and (y < ySmallMap + hSmallMap) then 1147 1147 begin 1148 Mode := mImp;1148 SmallMapMode := smImprovements; 1149 1149 ZoomArea := (y - ySmallMap) * 3 div hSmallMap + 3 * 1150 1150 ((x - xSmallMap) * 2 div wSmallMap); … … 1157 1157 (y >= ySupport) and (y < ySupport + hSupport) then 1158 1158 begin 1159 Mode := mSupp;1159 SmallMapMode := smSupportedUnits; 1160 1160 Page := 0; 1161 1161 InitZoomCityMap; … … 1189 1189 ChooseProject; 1190 1190 end 1191 else if ( Mode = mImp) and (x >= xZoomMap) and (x < xZoomMap + wZoomMap) and1191 else if (SmallMapMode = smImprovements) and (x >= xZoomMap) and (x < xZoomMap + wZoomMap) and 1192 1192 (y >= yZoomMap) and (y < yZoomMap + hZoomMap) then 1193 1193 begin … … 1203 1203 if iix >= 0 then 1204 1204 if ssShift in Shift then 1205 HelpDlg.ShowNewContent( Mode or wmPersistent, hkImp, iix)1205 HelpDlg.ShowNewContent(FWindowMode or wmPersistent, hkImp, iix) 1206 1206 else if (ClientMode < scContact) then 1207 1207 with MessgExDlg do … … 1300 1300 end; 1301 1301 end 1302 else if ( Mode = mSupp) and (x >= xZoomMap) and (x < xZoomMap + wZoomMap) and1302 else if (SmallMapMode = smSupportedUnits) and (x >= xZoomMap) and (x < xZoomMap + wZoomMap) and 1303 1303 (y >= yZoomMap) and (y < yZoomMap + hZoomMap) then 1304 1304 begin … … 1321 1321 else if (x >= xmArea - 192) and (x < xmArea + 192) and (y >= ymArea - 96) 1322 1322 and (y < ymArea + 96) then 1323 with AreaMap do 1324 begin 1323 with AreaMap do begin 1325 1324 qx := ((4000 * xxt * yyt) + (x - xmArea) * (yyt * 2) + (y - ymArea + yyt) 1326 1325 * (xxt * 2)) div (xxt * yyt * 4) - 1000; … … 1335 1334 Loc1 := dLoc(cLoc, dx, dy); 1336 1335 if (Loc1 >= 0) and (Loc1 < G.lx * G.ly) then 1337 HelpOnTerrain(Loc1, Mode or wmPersistent)1336 HelpOnTerrain(Loc1, FWindowMode or wmPersistent) 1338 1337 end 1339 1338 else if (ClientMode < scContact) and (cGov <> gAnarchy) and -
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 -
branches/highdpi/LocalPlayer/ClientTools.pas
r349 r361 201 201 i: integer; 202 202 begin 203 if p = me then 204 begin 203 if p = me then begin 205 204 Result := 0; 206 205 for i := 1 to 3 do 207 206 if MyRO.Tech[AgePreq[i]] >= tsApplicable then 208 207 Result := i; 209 end 210 else 211 begin 208 end else begin 212 209 Result := 0; 213 210 for i := 1 to 3 do -
branches/highdpi/LocalPlayer/Diagram.pas
r349 r361 63 63 Canvas.Brush.Style := bsClear; 64 64 ScreenTools.Frame(canvas, Left - 1, Top - 1, Left + Width, Top + 200, 65 MainTexture. clBevelShade, MainTexture.clBevelLight);65 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 66 66 RFrame(canvas, Left - 2, Top - 2, Left + Width + 1, Top + 200 + 1, 67 MainTexture. clBevelShade, MainTexture.clBevelLight);67 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 68 68 69 69 // stars … … 132 132 CaptionRight := CloseBtn.Left; 133 133 CaptionLeft := ToggleBtn.Left + ToggleBtn.Width; 134 InitButtons ();134 InitButtons; 135 135 end; 136 136 … … 163 163 begin 164 164 LoweredTextOut(offscreen.canvas, -1, MainTexture, x - 2, y, Cap); 165 DLine(offscreen.canvas, x - 2, x + 169, y + 16, MainTexture. clTextShade,166 MainTexture. clTextLight);165 DLine(offscreen.canvas, x - 2, x + 169, y + 16, MainTexture.ColorTextShade, 166 MainTexture.ColorTextLight); 167 167 if val0 > 0 then 168 168 s := Format(Phrases.Lookup('SHARE'), [val0, val1]) -
branches/highdpi/LocalPlayer/Draft.pas
r349 r361 68 68 begin 69 69 inherited; 70 InitButtons ();70 InitButtons; 71 71 HelpContext := 'CLASSES'; 72 72 Caption := Phrases.Lookup('TITLE_DRAFT'); … … 183 183 Phrases.Lookup('UNITSPEED')); 184 184 DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16, 185 MainTexture. clBevelShade, MainTexture.clBevelLight);185 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 186 186 DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16, 187 MainTexture. clBevelShade, MainTexture.clBevelLight);187 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 188 188 s := MovementToString(MyRO.DevModel.Speed); 189 189 RisedTextOut(offscreen.Canvas, xTotal2 + 170 + 64 + 30 - … … 199 199 xTotal2 + 148 + 30, y, '='); 200 200 DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16, 201 MainTexture. clBevelShade, MainTexture.clBevelLight);201 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 202 202 DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16, 203 MainTexture. clBevelShade, MainTexture.clBevelLight);203 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 204 204 s := IntToStr(MyRO.DevModel.Cost); 205 205 RisedTextOut(offscreen.Canvas, xTotal2 + 170 + 64 + 30 - 12 - … … 216 216 xTotal2 + 148 + 30, y, '='); 217 217 DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16, 218 MainTexture. clBevelShade, MainTexture.clBevelLight);218 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 219 219 DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16, 220 MainTexture. clBevelShade, MainTexture.clBevelLight);220 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 221 221 s := IntToStr(MyRO.DevModel.Cost * BuildCostMod 222 222 [G.Difficulty[me]] div 12); … … 236 236 237 237 ClientHeight := Template.Height - Cut; 238 if ClientHeight > hMainTexturethen238 if ClientHeight > MainTexture.Height then 239 239 // assemble background from 2 texture tiles 240 240 begin 241 241 DpiBitCanvas(Back.Canvas, 0, 0, ClientWidth, 64, 242 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,243 hMainTexture- 64);242 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 243 MainTexture.Height - 64); 244 244 DpiBitCanvas(Back.Canvas, 0, 64, ClientWidth, ClientHeight - 64, 245 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,245 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 246 246 0); 247 247 end 248 248 else 249 249 DpiBitCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight, 250 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,251 ( hMainTexture- ClientHeight) div 2);250 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 251 (MainTexture.Height - ClientHeight) div 2); 252 252 ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64); 253 253 ImageOp_B(Back, Template, 0, 64, 0, 64 + Cut, Template.Width, … … 320 320 RFrame(offscreen.Canvas, xFeature - (21 + 1), 321 321 yFeature + 2 + LinePitch * i - 1, xFeature - (21 - 24), 322 yFeature + 2 + LinePitch * i + 12, MainTexture. clBevelShade,323 MainTexture. clBevelLight);322 yFeature + 2 + LinePitch * i + 12, MainTexture.ColorBevelShade, 323 MainTexture.ColorBevelLight); 324 324 end 325 325 else … … 329 329 RFrame(offscreen.Canvas, xFeature - (9 + 1), 330 330 yFeature + 2 + LinePitch * i - 1, xFeature - (21 - 24), 331 yFeature + 2 + LinePitch * i + 12, MainTexture. clBevelShade,332 MainTexture. clBevelLight);331 yFeature + 2 + LinePitch * i + 12, MainTexture.ColorBevelShade, 332 MainTexture.ColorBevelLight); 333 333 end; 334 334 … … 362 362 363 363 if MyRO.DevModel.Cap[code[i]] > 0 then 364 TextColor := MainTexture. clLitText364 TextColor := MainTexture.ColorLitText 365 365 else 366 366 TextColor := -1; -
branches/highdpi/LocalPlayer/Enhance.pas
r349 r361 65 65 CaptionRight := CloseBtn.Left; 66 66 CaptionLeft := ToggleBtn.Left + ToggleBtn.Width; 67 InitButtons ();67 InitButtons; 68 68 HelpContext := 'MACRO'; 69 69 Caption := Phrases.Lookup('TITLE_ENHANCE'); -
branches/highdpi/LocalPlayer/Help.pas
r349 r361 301 301 CaptionFont.Assign(UniFont[ftNormal]); 302 302 CaptionFont.Style := CaptionFont.Style + [fsItalic, fsBold]; 303 InitButtons ();303 InitButtons; 304 304 305 305 TopBtn.Hint := Phrases.Lookup('BTN_CONTENTS'); … … 1248 1248 MainText[Count - 1] := Format(HelpText.Lookup('REQUIRED'), 1249 1249 [MainText[Count - 1]]); 1250 end 1250 end; 1251 1251 end; 1252 end 1252 end; 1253 1253 end; 1254 1254 … … 1422 1422 LineFeed; 1423 1423 LineFeed; 1424 end 1425 end 1424 end; 1425 end; 1426 1426 end; 1427 1427 miscSearchResult: … … 1642 1642 NextSection('REPLACE'); 1643 1643 AddItem('REPLACETEXT'); 1644 j := 1 1644 j := 1; 1645 1645 end; 1646 1646 AddImprovement(ImpReplacement[i].OldImp); … … 1676 1676 AddLine(HelpText.Lookup('HELPTITLE_JOBLIST'), pkNormal, 0, 1677 1677 hkMisc + hkCrossLink, miscJobList); 1678 CheckSeeAlso := true 1678 CheckSeeAlso := true; 1679 1679 end; 1680 1680 … … 1696 1696 begin 1697 1697 TerrType := fDesert; 1698 TerrSubType := 0 1698 TerrSubType := 0; 1699 1699 end; 1700 1700 with Terrain[TerrType] do … … 1766 1766 [Phrases.Lookup('TERRAIN', fGrass + 12)]), pkTer, fGrass + 12, 1767 1767 hkTer + hkCrossLink, fGrass + 12); 1768 end 1768 end; 1769 1769 end; 1770 1770 NextSection('SPECIAL'); … … 1778 1778 AddLine(Phrases.Lookup('TERRAIN', 3 * 12 + Special), pkTer, 1779 1779 3 * 12 + Special); 1780 end 1780 end; 1781 1781 end 1782 1782 else if (no < 12) and (no <> fGrass) and (no <> fOcean) then … … 1814 1814 AddImprovement(woGardens); 1815 1815 CheckSeeAlso := true 1816 end 1817 end 1816 end; 1817 end; 1818 1818 end; 1819 1819 … … 1882 1882 AddLine(Format(HelpText.Lookup('WEIGHT'), ['+2']), 1883 1883 pkDomain, dGround); 1884 end 1884 end; 1885 1885 end; 1886 1886 if Feature[no].Preq <> preNone then … … 1969 1969 Line(Canvas, Sel0, False); 1970 1970 if Sel <> -1 then 1971 Line(Canvas, Sel, True) 1972 end 1971 Line(Canvas, Sel, True); 1972 end; 1973 1973 end; 1974 1974 … … 1992 1992 else 1993 1993 ShowNewContent(FWindowMode, Link shr 8 and $3F, Link and $FF); 1994 end 1994 end; 1995 1995 end; 1996 1996 … … 2036 2036 function THelpDlg.TextIndex(Item: string): Integer; 2037 2037 begin 2038 Result := HelpText.Gethandle(Item) 2038 Result := HelpText.Gethandle(Item); 2039 2039 end; 2040 2040 -
branches/highdpi/LocalPlayer/LocalPlayer.pas
r210 r361 5 5 6 6 procedure Client(Command, Player: integer; var Data); stdcall; 7 8 7 procedure SetAIName(p: integer; Name: string); 9 8 … … 12 11 uses 13 12 UDpiControls, Term, CityScreen, Draft, MessgEx, Select, CityType, Help, UnitStat, Diagram, 14 NatStat, Wonders, Nego, Enhance, BaseWin, Battle, Rates, TechTree, 15 16 Forms; 13 NatStat, Wonders, Nego, Enhance, BaseWin, Battle, Rates, TechTree, Forms; 17 14 18 15 var -
branches/highdpi/LocalPlayer/MessgEx.pas
r349 r361 10 10 11 11 type 12 TMessageIconKind = (mikNone, mikImp, mikModel, mikTribe, mikBook, mikAge, 13 mikPureIcon, mikMyArmy, mikEnemyArmy, mikFullControl, mikShip, mikBigIcon, 14 mikEnemyShipComplete); 15 12 16 TMessgExDlg = class(TBaseMessgDlg) 13 17 Button1: TButtonA; … … 26 30 procedure RemoveBtnClick(Sender: TObject); 27 31 public 28 Kind, IconKind, IconIndex, HelpKind, HelpNo, CenterTo: integer; 32 Kind: TMessageKind; 33 IconIndex: Integer; 34 HelpKind: Integer; 35 HelpNo: Integer; 36 CenterTo: Integer; 37 IconKind: TMessageIconKind; 29 38 OpenSound: string; 30 39 function ShowModal: integer; override; … … 38 47 end; 39 48 40 const41 // extra message kinds42 mkYesNoCancel = 4;43 mkOkCancelRemove = 5;44 mkOkHelp = 6;45 mkModel = 7;46 47 // message icon kinds48 mikNone = -1;49 mikImp = 0;50 mikModel = 1;51 mikTribe = 2;52 mikBook = 3;53 mikAge = 4;54 mikPureIcon = 5;55 mikMyArmy = 6;56 mikEnemyArmy = 7;57 mikFullControl = 8;58 mikShip = 9;59 mikBigIcon = 10;60 mikEnemyShipComplete = 11;61 62 49 var 63 50 MessgExDlg: TMessgExDlg; … … 65 52 procedure SoundMessageEx(SimpleText, SoundItem: string); 66 53 procedure TribeMessage(p: integer; SimpleText, SoundItem: string); 67 function SimpleQuery(QueryKind: integer; SimpleText, SoundItem: string)54 function SimpleQuery(QueryKind: TMessageKind; SimpleText, SoundItem: string) 68 55 : integer; 69 56 procedure ContextMessage(SimpleText, SoundItem: string; … … 199 186 function TMessgExDlg.ShowModal: integer; 200 187 var 201 Ticks0, Ticks: TDateTime; 188 Ticks0: TDateTime; 189 Ticks: TDateTime; 202 190 begin 203 191 if GameMode = cMovie then … … 357 345 if (IconKind = mikImp) and (IconIndex = 27) then 358 346 begin // "YOU WIN" message 359 clSaveTextLight := MainTexture. clTextLight;360 clSaveTextShade := MainTexture. clTextShade;361 MainTexture. clTextLight := $000000; // gold362 MainTexture. clTextShade := $0FDBFF;347 clSaveTextLight := MainTexture.ColorTextLight; 348 clSaveTextShade := MainTexture.ColorTextShade; 349 MainTexture.ColorTextLight := $000000; // gold 350 MainTexture.ColorTextShade := $0FDBFF; 363 351 inherited; 364 MainTexture. clTextLight := clSaveTextLight;365 MainTexture. clTextShade := clSaveTextShade;352 MainTexture.ColorTextLight := clSaveTextLight; 353 MainTexture.ColorTextShade := clSaveTextShade; 366 354 end 367 355 else … … 411 399 end; 412 400 mikBook: 413 PaintBook(Canvas, ClientWidth div 2, 24, MainTexture. clPage,414 MainTexture. clCover);401 PaintBook(Canvas, ClientWidth div 2, 24, MainTexture.ColorPage, 402 MainTexture.ColorCover); 415 403 mikTribe: 416 404 if Assigned(Tribe[IconIndex].faceHGr) then … … 516 504 end; 517 505 518 function SimpleQuery(QueryKind: integer; SimpleText, SoundItem: string)506 function SimpleQuery(QueryKind: TMessageKind; SimpleText, SoundItem: string) 519 507 : integer; 520 508 begin … … 524 512 OpenSound := SoundItem; 525 513 Kind := QueryKind; 526 DpiApplication.ProcessMessages; // TODO: Needed for Gtk2, Lazarus gtk2 bug?527 514 ShowModal; 528 515 result := ModalResult; -
branches/highdpi/LocalPlayer/NatStat.pas
r349 r361 81 81 GetMem(SelfReport, SizeOf(TEnemyReport) - 2 * (INFIN + 1)); 82 82 ReportText := TStringList.Create; 83 InitButtons ();83 InitButtons; 84 84 ContactBtn.Template := Templates.Data; 85 85 HelpContext := 'DIPLOMACY'; … … 107 107 procedure TNatStatDlg.CheckAge; 108 108 begin 109 if MainTextureAge <> AgePrepared then 110 begin 111 AgePrepared := MainTextureAge; 109 if MainTexture.Age <> AgePrepared then begin 110 AgePrepared := MainTexture.Age; 112 111 DpiBitCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight, 113 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,114 ( hMainTexture- ClientHeight) div 2);112 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 113 (MainTexture.Height - ClientHeight) div 2); 115 114 ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight); 116 115 end; … … 358 357 with Canvas do 359 358 begin 360 Brush.Color := MainTexture. clBevelShade;359 Brush.Color := MainTexture.ColorBevelShade; 361 360 FillRect(Rect(xReport + wReport, yReport + PaperShade, 362 361 xReport + wReport + PaperShade, yReport + hReport + PaperShade)); -
branches/highdpi/LocalPlayer/Nego.pas
r349 r361 144 144 cix: integer; 145 145 begin 146 InitButtons ();146 InitButtons; 147 147 for cix := 0 to ComponentCount - 1 do 148 148 if Components[cix] is TButtonN then … … 510 510 511 511 Fill(Offscreen.Canvas, 3, 3, ClientWidth - 6, ClientHeight - 6, 512 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);512 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 513 513 Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 514 514 Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 515 MainTexture. clBevelLight, MainTexture.clBevelShade);515 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 516 516 Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 517 MainTexture. clBevelLight, MainTexture.clBevelShade);517 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 518 518 Corner(Offscreen.Canvas, 1, 1, 0, MainTexture); 519 519 Corner(Offscreen.Canvas, ClientWidth - 9, 1, 1, MainTexture); … … 565 565 with Offscreen.Canvas do 566 566 begin 567 Brush.Color := MainTexture. clBevelShade;567 Brush.Color := MainTexture.ColorBevelShade; 568 568 if History[me].Text[Page - 1] <> '' then 569 569 begin -
branches/highdpi/LocalPlayer/Rates.pas
r349 r361 42 42 begin 43 43 TitleHeight := DpiScreen.Height; 44 InitButtons ();44 InitButtons; 45 45 end; 46 46 … … 56 56 57 57 Fill(Offscreen.Canvas, 0, 0, ClientWidth, ClientHeight, 58 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);58 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 59 59 Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 60 60 Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 61 MainTexture. clBevelLight, MainTexture.clBevelShade);61 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 62 62 Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 63 MainTexture. clBevelLight, MainTexture.clBevelShade);63 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 64 64 65 65 BtnFrame(Offscreen.Canvas, CloseBtn.BoundsRect, MainTexture); … … 118 118 Frame(Offscreen.Canvas, x - 1, y - 1, x + max, y + 7, $000000, $000000); 119 119 RFrame(Offscreen.Canvas, x - 2, y - 2, x + max + 1, y + 8, 120 MainTexture. clBevelShade, MainTexture.clBevelLight);120 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 121 121 with Offscreen.Canvas do 122 122 begin … … 138 138 MyRO.LuxRate * 120 div 100, 0, 120, MainTexture); 139 139 RFrame(Offscreen.Canvas, ScienceBtn.Left - 1, LuxBtn.Top - 1, 140 LuxBtn.Left + 12, LuxBtn.Top + 12, MainTexture. clBevelShade,141 MainTexture. clBevelLight);142 end; 143 144 DLine(Offscreen.Canvas, 1, ClientWidth - 2, 154, MainTexture. clBevelShade,145 MainTexture. clBevelLight);140 LuxBtn.Left + 12, LuxBtn.Top + 12, MainTexture.ColorBevelShade, 141 MainTexture.ColorBevelLight); 142 end; 143 144 DLine(Offscreen.Canvas, 1, ClientWidth - 2, 154, MainTexture.ColorBevelShade, 145 MainTexture.ColorBevelLight); 146 146 RisedTextOut(Offscreen.Canvas, 16 + 80, 164, Phrases.Lookup('TAXRATE')); 147 147 s := Format('%d%%', [MyRO.TaxRate]); … … 151 151 MyRO.TaxRate * 120 div 100, 0, 120, MainTexture); 152 152 RFrame(Offscreen.Canvas, TaxUpBtn.Left - 1, TaxUpBtn.Top - 1, 153 TaxUpBtn.Left + 12, TaxDownBtn.Top + 12, MainTexture. clBevelShade,154 MainTexture. clBevelLight);153 TaxUpBtn.Left + 12, TaxDownBtn.Top + 12, MainTexture.ColorBevelShade, 154 MainTexture.ColorBevelLight); 155 155 156 156 MarkUsedOffscreen(ClientWidth, ClientHeight); … … 206 206 SmartUpdateContent; 207 207 MainScreen.UpdateViews(true); 208 end 208 end; 209 209 end; 210 210 -
branches/highdpi/LocalPlayer/Select.pas
r349 r361 112 112 Canvas.Font.Assign(UniFont[ftNormal]); 113 113 sb := TPVScrollbar.Create(Self); 114 sb.SetBorderSpacing(36, 10, 36); 114 115 sb.OnUpdate := ScrollBarUpdate; 115 InitButtons ();116 InitButtons; 116 117 Kind := kMission; 117 118 Layer0Btn.Hint := Phrases.Lookup('BTN_IMPRS'); … … 201 202 begin 202 203 Frame(offscreen.Canvas, x + (16 - 1), y + (16 - 2), x + (16 + xSizeSmall), 203 y + (16 - 1 + ySizeSmall), MainTexture. clBevelLight,204 MainTexture. clBevelShade);204 y + (16 - 1 + ySizeSmall), MainTexture.ColorBevelLight, 205 MainTexture.ColorBevelShade); 205 206 if pix and cpType = 0 then 206 207 if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then … … 230 231 if y + TextSize.cy >= TitleHeight + InnerHeight then 231 232 TextSize.cy := TitleHeight + InnerHeight - y; 232 Fill(ca, x, y, TextSize.cx, TextSize.cy, ( wMaintexture- ClientWidth)233 div 2, ( hMaintexture- ClientHeight) div 2);233 Fill(ca, x, y, TextSize.cx, TextSize.cy, (Maintexture.Width - ClientWidth) 234 div 2, (Maintexture.Height - ClientHeight) div 2); 234 235 end; 235 236 LoweredTextOut(ca, Color, MainTexture, x, y, s); … … 259 260 begin 260 261 x := x + SideFrame; 261 y := y + TitleHeight 262 y := y + TitleHeight; 262 263 end; 263 264 if lit then 264 TextColor := MainTexture. clLitText265 TextColor := MainTexture.ColorLitText 265 266 else 266 267 TextColor := -1; … … 433 434 end; 434 435 if lit then 435 TextColor := MainTexture. clLitText436 TextColor := MainTexture.ColorLitText 436 437 else 437 438 TextColor := -1; … … 555 556 begin 556 557 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36), 557 y0 + 20, MainTexture. clBevelLight, MainTexture.clBevelShade);558 y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 558 559 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 223, 295) 559 560 end … … 561 562 begin 562 563 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36), 563 y0 + 20, MainTexture. clBevelLight, MainTexture.clBevelShade);564 y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 564 565 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 260, 295) 565 566 end … … 567 568 begin 568 569 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36), 569 y0 + 20, MainTexture. clBevelLight, MainTexture.clBevelShade);570 y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 570 571 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 38, 295) 571 572 end … … 574 575 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, 575 576 (8 + 16 + xSizeSmall), y0 + ySizeSmall, 576 MainTexture. clBevelLight, MainTexture.clBevelShade);577 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 577 578 if AdvIcon[lix] < 84 then 578 579 DpiBitCanvas(offscreen.Canvas, (8 + 16), y0, xSizeSmall, … … 680 681 Frame(offscreen.Canvas, 8 + 16 - 1, y0 - 15 + (16 - 2), 681 682 8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall), 682 MainTexture. clBevelLight, MainTexture.clBevelShade);683 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 683 684 DpiBitCanvas(offscreen.Canvas, 8 + 16, y0 - 15 + (16 - 1), 684 685 xSizeSmall, ySizeSmall, SmallImp.Canvas, … … 711 712 end; 712 713 if lit then 713 TextColor := MainTexture. clLitText714 TextColor := MainTexture.ColorLitText 714 715 else 715 716 TextColor := -1; … … 811 812 begin 812 813 Fill(Canvas, 9, ClientHeight - 29, ClientWidth - 18, 24, 813 ( wMaintexture- ClientWidth) div 2,814 ( hMaintexture- ClientHeight) div 2);814 (Maintexture.Width - ClientWidth) div 2, 815 (Maintexture.Height - ClientHeight) div 2); 815 816 if ScienceNation >= 0 then 816 817 begin … … 828 829 ScienceNationDot.Height, Canvas, xScreen - 10, ClientHeight - 27); 829 830 ImageOp_BCC(ScienceNationDotBuffer, Templates.Data, Point(0, 0), 830 ScienceNationDot.BoundsRect, MainTexture. clBevelShade, Tribe[ScienceNation].Color);831 ScienceNationDot.BoundsRect, MainTexture.ColorBevelShade, Tribe[ScienceNation].Color); 831 832 DpiBitCanvas(Canvas, xScreen - 10, ClientHeight - 27, ScienceNationDot.Width, 832 833 ScienceNationDot.Height, ScienceNationDotBuffer.Canvas, 0, 0); … … 1531 1532 begin 1532 1533 LineDistance := 21; // looks ugly with scrollbar 1533 MaxLines := ( hMaintexture- (24 + TitleHeight + NarrowFrame))1534 MaxLines := (Maintexture.Height - (24 + TitleHeight + NarrowFrame)) 1534 1535 div LineDistance - 1; 1535 1536 end … … 1537 1538 begin 1538 1539 LineDistance := 24; 1539 MaxLines := ( hMaintexture- (24 + TitleHeight + WideFrame))1540 MaxLines := (Maintexture.Height - (24 + TitleHeight + WideFrame)) 1540 1541 div LineDistance - 1; 1541 1542 end; … … 1551 1552 if (Kind = kAdvance) and (MyData.FarTech <> adNone) or (Kind = kModels) or 1552 1553 (Kind = kEModels) then begin 1554 sb.SetBorderSpacing(56, 10, 10); 1553 1555 TitleHeight := WideFrame + 20; 1554 sb.SetBorderSpacing(56, 10, 10);1555 1556 end else begin 1557 sb.SetBorderSpacing(36, 10, 34); 1556 1558 TitleHeight := WideFrame; 1557 sb.SetBorderSpacing(36, 10, 34);1558 1559 end; 1559 1560 … … 1576 1577 ClientHeight := InnerHeight + TitleHeight + NarrowFrame; 1577 1578 end; 1578 assert(ClientHeight <= hMaintexture);1579 assert(ClientHeight <= Maintexture.Height); 1579 1580 1580 1581 TechNameSpace := 224; -
branches/highdpi/LocalPlayer/Term.pas
r351 r361 1697 1697 Controls[i].Visible := false; 1698 1698 me := -1; 1699 SetMainTextureByAge(-1);1699 MainTexture.Age := -1; 1700 1700 with Panel.Canvas do 1701 1701 begin … … 1734 1734 { if MyRO.Happened and phGameEnd<>0 then 1735 1735 begin 1736 Age :=3;1737 SetMainTextureByAge(-1);1736 Age := 3; 1737 MainTexture.Age := -1; 1738 1738 end 1739 1739 else } 1740 1740 begin 1741 1741 Age := GetAge(me); 1742 if SetMainTextureByAge(Age) then 1742 if MainTexture.Age <> Age then begin 1743 MainTexture.Age := Age; 1743 1744 EOT.Invalidate; // has visible background parts in its bounds 1745 end; 1744 1746 end; 1745 1747 // age:=MyRO.Turn mod 4; //!!! … … 1754 1756 begin 1755 1757 Age := 0; 1756 SetMainTextureByAge(-1);1758 MainTexture.Age := -1; 1757 1759 if ClientMode = cMovieTurn then 1758 1760 EOT.ButtonIndex := eotCancel … … 2544 2546 Age := 0; 2545 2547 if Command = cHelpOnly then 2546 SetMainTextureByAge(-1);2548 MainTexture.Age := -1; 2547 2549 Tribes.Init; 2548 2550 HelpDlg.UserLeft := (DpiScreen.width - HelpDlg.width) div 2; … … 4271 4273 xMini + 2 + G.lx - MapWidth div (xxt * 2), yMini + 2, 4272 4274 xMini + 1 + G.lx + MapWidth div (xxt * 2), yMini + 2 + G.ly - 1, 4273 MainTexture. clMark, MainTexture.clMark)4275 MainTexture.ColorMark, MainTexture.ColorMark) 4274 4276 else 4275 4277 Frame(Panel.Canvas, 4276 4278 xMini + 2 + G.lx - MapWidth div (xxt * 2), yMini + 2 + yw, 4277 4279 xMini + 1 + G.lx + MapWidth div (xxt * 2), yMini + yw + MapHeight div yyt, 4278 MainTexture. clMark, MainTexture.clMark);4280 MainTexture.ColorMark, MainTexture.ColorMark); 4279 4281 end; 4280 4282 end; … … 4307 4309 begin 4308 4310 Fill(Panel.Canvas, 0, 3, xMidPanel + 7 - 10, PanelHeight - 3, 4309 wMainTexture - (xMidPanel + 7 - 10), hMainTexture- PanelHeight);4311 MainTexture.Width - (xMidPanel + 7 - 10), MainTexture.Height - PanelHeight); 4310 4312 Fill(Panel.Canvas, xRightPanel + 10 - 7, 3, Panel.width - xRightPanel - 10 + 4311 7, PanelHeight - 3, -(xRightPanel + 10 - 7), hMainTexture- PanelHeight);4313 7, PanelHeight - 3, -(xRightPanel + 10 - 7), MainTexture.Height - PanelHeight); 4312 4314 FillLarge(Panel.Canvas, xMidPanel - 2, PanelHeight - MidPanelHeight, 4313 4315 xRightPanel + 2, PanelHeight, ClientWidth div 2); … … 4321 4323 LineTo(xRightPanel, 0); 4322 4324 LineTo(ClientWidth, 0); 4323 Pen.Color := MainTexture. clBevelLight;4325 Pen.Color := MainTexture.ColorBevelLight; 4324 4326 MoveTo(xMidPanel + 7 - 9, PanelHeight - MidPanelHeight + 2); 4325 4327 LineTo(xRightPanel + 10 - 8, PanelHeight - MidPanelHeight + 2); 4326 Pen.Color := MainTexture. clBevelLight;4328 Pen.Color := MainTexture.ColorBevelLight; 4327 4329 MoveTo(0, 1); 4328 4330 LineTo(xMidPanel + 7 - 9, 1); 4329 Pen.Color := MainTexture. clBevelShade;4331 Pen.Color := MainTexture.ColorBevelShade; 4330 4332 LineTo(xMidPanel + 7 - 9, PanelHeight - MidPanelHeight + 1); 4331 Pen.Color := MainTexture. clBevelLight;4333 Pen.Color := MainTexture.ColorBevelLight; 4332 4334 LineTo(xRightPanel + 10 - 9, PanelHeight - MidPanelHeight + 1); 4333 Pen.Color := MainTexture. clBevelLight;4335 Pen.Color := MainTexture.ColorBevelLight; 4334 4336 LineTo(xRightPanel + 10 - 9, 1); 4335 4337 LineTo(ClientWidth, 1); … … 4339 4341 MoveTo(0, 2); 4340 4342 LineTo(xMidPanel + 7 - 10, 2); 4341 Pen.Color := MainTexture. clBevelShade;4343 Pen.Color := MainTexture.ColorBevelShade; 4342 4344 LineTo(xMidPanel + 7 - 10, PanelHeight); 4343 4345 Corner(Panel.Canvas, xMidPanel + 7 - 16, 1, 1, MainTexture); … … 4478 4480 ScreenTools.Frame(Panel.Canvas, xTroop + 1 + x, 4479 4481 yTroop + 6 - yyt div 2, xTroop + 2 * xxt - 1 + x, 4480 yTroop + 2 * yyt + 10, MainTexture. clMark, MainTexture.clMark);4482 yTroop + 2 * yyt + 10, MainTexture.ColorMark, MainTexture.ColorMark); 4481 4483 end; 4482 4484 end; … … 4596 4598 else 4597 4599 x := xTroop - 152; 4598 Pen.Color := MainTexture. clBevelShade;4600 Pen.Color := MainTexture.ColorBevelShade; 4599 4601 MoveTo(x - 1, PanelHeight - MidPanelHeight + 2); 4600 4602 LineTo(x - 1, PanelHeight); 4601 Pen.Color := MainTexture. clBevelLight;4603 Pen.Color := MainTexture.ColorBevelLight; 4602 4604 MoveTo(x, PanelHeight - MidPanelHeight + 2); 4603 4605 LineTo(x, PanelHeight); … … 4637 4639 ScreenTools.Frame(Panel.Canvas, xTroop + 3 + x, 4638 4640 yTroop + 2, xTroop + 63 + x, yTroop + 46, 4639 MainTexture. clMark, MainTexture.clMark);4641 MainTexture.ColorMark, MainTexture.ColorMark); 4640 4642 end 4641 4643 else if (unx.Master >= 0) and (unx.Master = UnFocus) then … … 4644 4646 xTroop + 64 + x, yTroop + 47, 8, $000000); 4645 4647 CFrame(Panel.Canvas, xTroop + 3 + x, yTroop + 2, 4646 xTroop + 63 + x, yTroop + 46, 8, MainTexture. clMark);4648 xTroop + 63 + x, yTroop + 46, 8, MainTexture.ColorMark); 4647 4649 end; 4648 4650 NoMapPanel.SetOutput(Panel); … … 4739 4741 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight + 4740 4742 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight + 4741 PanelHeight, MainTexture. clBevelShade, MainTexture.clBevelLight)4743 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight) 4742 4744 end; { if TroopLoc>=0 } 4743 4745 end; … … 4755 4757 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight + 4756 4758 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight + 4757 PanelHeight, MainTexture. clBevelShade, MainTexture.clBevelLight);4759 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4758 4760 end; 4759 4761 end; … … 4769 4771 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight + 4770 4772 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight + 4771 PanelHeight, MainTexture. clBevelShade, MainTexture.clBevelLight);4773 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4772 4774 end; 4773 4775 end; … … 4786 4788 MoveTo(0, TopBarHeight - 1); 4787 4789 LineTo(ClientWidth, TopBarHeight - 1); 4788 Pen.Color := MainTexture. clBevelShade;4790 Pen.Color := MainTexture.ColorBevelShade; 4789 4791 MoveTo(0, TopBarHeight - 2); 4790 4792 LineTo(ClientWidth, TopBarHeight - 2); 4791 4793 MoveTo(0, TopBarHeight - 3); 4792 4794 LineTo(ClientWidth, TopBarHeight - 3); 4793 Pen.Color := MainTexture. clBevelLight;4795 Pen.Color := MainTexture.ColorBevelLight; 4794 4796 ScreenTools.Frame(TopBar.Canvas, 40, -1, xTreasurySection - 1, 4795 TopBarHeight - 7, MainTexture. clBevelShade, MainTexture.clBevelLight);4797 TopBarHeight - 7, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4796 4798 ScreenTools.Frame(TopBar.Canvas, xResearchSection + 332, -1, ClientWidth, 4797 TopBarHeight - 7, MainTexture. clBevelShade, MainTexture.clBevelLight);4799 TopBarHeight - 7, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4798 4800 end; 4799 4801 if GameMode <> cMovie then … … 5230 5232 Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt), 5231 5233 yMini + 2, xMini + 1 + G.lx + MapWidth div (2 * xxt), 5232 yMini + 2 + G.ly - 1, MainTexture. clMark, MainTexture.clMark)5234 yMini + 2 + G.ly - 1, MainTexture.ColorMark, MainTexture.ColorMark) 5233 5235 else 5234 5236 Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt), 5235 5237 yMini + 2 + yw, xMini + 2 + G.lx + MapWidth div (2 * xxt) - 1, 5236 yMini + 2 + yw + MapHeight div yyt - 2, MainTexture. clMark,5237 MainTexture. clMark);5238 yMini + 2 + yw + MapHeight div yyt - 2, MainTexture.ColorMark, 5239 MainTexture.ColorMark); 5238 5240 end; 5239 5241 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2, … … 7498 7500 Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), 0, 7499 7501 x - xMini - 2 + MapWidth div (xxt * 2) - 1, G.ly - 1, 7500 MainTexture. clMark, MainTexture.clMark)7502 MainTexture.ColorMark, MainTexture.ColorMark) 7501 7503 else 7502 7504 Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), yw, 7503 7505 x - xMini - 2 + MapWidth div (xxt * 2) - 1, yw + MapHeight div yyt - 7504 2, MainTexture. clMark, MainTexture.clMark);7506 2, MainTexture.ColorMark, MainTexture.ColorMark); 7505 7507 DpiBitCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly, 7506 7508 Buffer.Canvas, 0, 0); … … 8036 8038 8037 8039 end. 8040 -
branches/highdpi/LocalPlayer/UnitStat.lfm
r210 r361 1 1 object UnitStatDlg: TUnitStatDlg 2 2 Left = 344 3 Height = 3263 Height = 489 4 4 Top = 213 5 Width = 2085 Width = 312 6 6 BorderStyle = bsNone 7 ClientHeight = 3268 ClientWidth = 2087 ClientHeight = 489 8 ClientWidth = 312 9 9 Color = clBtnFace 10 DesignTimePPI = 144 10 11 Font.Color = clWindowText 11 Font.Height = - 1312 Font.Height = -20 12 13 Font.Name = 'MS Sans Serif' 13 14 FormStyle = fsStayOnTop … … 16 17 OnDestroy = FormDestroy 17 18 OnShow = FormShow 18 LCLVersion = ' 1.6.2.0'19 LCLVersion = '2.0.12.0' 19 20 object SwitchBtn: TButtonB 20 Left = 1 221 Height = 2522 Top = 2923 Width = 2521 Left = 18 22 Height = 38 23 Top = 44 24 Width = 38 24 25 Down = False 25 26 Permanent = False … … 28 29 end 29 30 object CloseBtn: TButtonB 30 Left = 17731 Height = 2532 Top = 633 Width = 2531 Left = 266 32 Height = 38 33 Top = 9 34 Width = 38 34 35 Down = False 35 36 Permanent = False … … 38 39 end 39 40 object ConscriptsBtn: TButtonB 40 Left = 4341 Height = 2542 Top = 2943 Width = 2541 Left = 64 42 Height = 38 43 Top = 44 44 Width = 38 44 45 Down = False 45 46 Permanent = False … … 48 49 end 49 50 object HelpBtn: TButtonC 50 Left = 17851 Height = 1 252 Top = 14553 Width = 1 251 Left = 267 52 Height = 18 53 Top = 218 54 Width = 18 54 55 Down = False 55 56 Permanent = False -
branches/highdpi/LocalPlayer/UnitStat.pas
r349 r361 77 77 AgePrepared := -2; 78 78 TitleHeight := DpiScreen.Height; 79 InitButtons ();79 InitButtons; 80 80 81 81 Back := TDpiBitmap.Create; … … 98 98 procedure TUnitStatDlg.CheckAge; 99 99 begin 100 if MainTextureAge <> AgePrepared then 101 begin 102 AgePrepared := MainTextureAge; 100 if MainTexture.Age <> AgePrepared then begin 101 AgePrepared := MainTexture.Age; 103 102 DpiBitCanvas(Back.Canvas, 0, 0, wCommon, hOwnModel, 104 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,105 ( hMainTexture- hOwnModel) div 2);103 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 104 (MainTexture.Height - hOwnModel) div 2); 106 105 DpiBitCanvas(Back.Canvas, wCommon, 0, wCommon, hEnemyModel, 107 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,108 ( hMainTexture- hEnemyModel) div 2);106 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 107 (MainTexture.Height - hEnemyModel) div 2); 109 108 DpiBitCanvas(Back.Canvas, 2 * wCommon, 0, wCommon, hEnemyUnit, 110 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,111 ( hMainTexture- hEnemyUnit) div 2);109 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 110 (MainTexture.Height - hEnemyUnit) div 2); 112 111 DpiBitCanvas(Back.Canvas, 3 * wCommon, 0, wCommon, hEnemyCityDefense, 113 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,114 ( hMainTexture- hEnemyCityDefense) div 2);112 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 113 (MainTexture.Height - hEnemyCityDefense) div 2); 115 114 DpiBitCanvas(Back.Canvas, 4 * wCommon, 0, wCommon, hEnemyCity, 116 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,117 ( hMainTexture- hEnemyCity) div 2);115 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 116 (MainTexture.Height - hEnemyCity) div 2); 118 117 ImageOp_B(Back, Template, 0, 0, 0, 0, 5 * wCommon, hMax); 119 end 118 end; 120 119 end; 121 120 … … 151 150 dec(ecixShow); 152 151 assert(ecixShow >= 0); 153 end 152 end; 154 153 end; 155 154 case Kind of … … 297 296 result := (PPicture.HGr = PTestPicture.HGr) and 298 297 (PPicture.pix = PTestPicture.pix) and 299 (ModelHash(mox^) = ModelHash(MyRO.EnemyModel[emix])) 298 (ModelHash(mox^) = ModelHash(MyRO.EnemyModel[emix])); 300 299 end 301 300 else 302 301 result := (MyRO.EnemyModel[emix].owner = mox.owner) and 303 (MyRO.EnemyModel[emix].mix = mox.mix) 302 (MyRO.EnemyModel[emix].mix = mox.mix); 304 303 end; 305 304 306 305 procedure FeatureBar(dst: TDpiBitmap; x, y: integer; const mi: TModelInfo; 307 constT: TTexture);306 T: TTexture); 308 307 var 309 308 i, w, dx, num: integer; … … 371 370 end; { featurebar } 372 371 373 procedure NumberBarS(dst: TDpiBitmap; x, y: integer; Cap, s: string; 374 const T: TTexture); 375 begin 376 DLine(dst.Canvas, x - 2, x + 170, y + 16, T.clBevelShade, T.clBevelLight); 372 procedure NumberBarS(dst: TDpiBitmap; x, y: integer; Cap, s: string; T: TTexture); 373 begin 374 DLine(dst.Canvas, x - 2, x + 170, y + 16, T.ColorBevelShade, T.ColorBevelLight); 377 375 LoweredTextOut(dst.Canvas, -1, T, x - 2, y, Cap); 378 376 RisedTextout(dst.Canvas, x + 170 - BiColorTextWidth(dst.Canvas, s), y, s); … … 437 435 begin 438 436 case i of 439 0: 440 j := imWalls; 441 1: 442 j := imCoastalFort; 443 2: 444 j := imMissileBat; 445 3: 446 j := imBunker 437 0: j := imWalls; 438 1: j := imCoastalFort; 439 2: j := imMissileBat; 440 3: j := imBunker 447 441 end; 448 442 Frame(offscreen.Canvas, x - 1, yImp - 1, x + xSizeSmall, 449 yImp + ySizeSmall, MainTexture. clBevelLight,450 MainTexture. clBevelShade);443 yImp + ySizeSmall, MainTexture.ColorBevelLight, 444 MainTexture.ColorBevelShade); 451 445 DpiBitCanvas(offscreen.Canvas, x, yImp, xSizeSmall, ySizeSmall, 452 446 SmallImp.Canvas, j mod 7 * xSizeSmall, 453 447 (j + SystemIconLines * 7) div 7 * ySizeSmall); 454 inc(x, xSizeSmall + 4) 448 inc(x, xSizeSmall + 4); 455 449 end; 456 450 end; … … 469 463 if IsToCount(MyRO.EnemyUn[MyRO.nEnemyUn + uix].emix) then 470 464 inc(Available); 471 end 465 end; 472 466 end 473 467 else // no supervisor -- can only count stack top units … … 512 506 begin 513 507 MakeUnitInfo(me, MyUn[uixShow], ui); 514 MakeModelInfo(me, MyUn[uixShow].mix, MyModel[MyUn[uixShow].mix], mi) 508 MakeModelInfo(me, MyUn[uixShow].mix, MyModel[MyUn[uixShow].mix], mi); 515 509 end 516 510 else … … 518 512 mi := mox^; 519 513 if Kind in [dkEnemyUnit, dkEnemyCityDefense] then 520 ui := MyRO.EnemyUn[euixShow] 514 ui := MyRO.EnemyUn[euixShow]; 521 515 end; 522 516 … … 527 521 begin 528 522 { Frame(offscreen.canvas,xView-1,yView-1,xView+64,yView+48, 529 MainTexture. clBevelShade,MainTexture.clBevelLight);523 MainTexture.ColorBevelShade,MainTexture.ColorBevelLight); 530 524 RFrame(offscreen.canvas,xView-2,yView-2,xView+65,yView+49, 531 MainTexture. clBevelShade,MainTexture.clBevelLight); }525 MainTexture.ColorBevelShade,MainTexture.ColorBevelLight); } 532 526 with offscreen.Canvas do 533 527 begin … … 541 535 begin 542 536 x := 1 + 2 * (xxt * 2 + 1); 543 y := 1 + yyt + 2 * (yyt * 3 + 1) 537 y := 1 + yyt + 2 * (yyt * 3 + 1); 544 538 end 545 539 else 546 540 begin 547 541 x := integer(MyMap[Loc] and fTerrain) * (xxt * 2 + 1) + 1; 548 y := 1 + yyt 542 y := 1 + yyt; 549 543 end; 550 544 for j := -1 to 1 do … … 594 588 (ClientWidth - BiColorTextWidth(offscreen.Canvas, s)) div 2, 595 589 yView + 80, s); 596 end 590 end; 597 591 end 598 592 else … … 615 609 Phrases.Lookup('UNITCOST')); 616 610 DLine(offscreen.Canvas, xTotal - 2, xTotal + 170, yTotal + 57 + 16, 617 MainTexture. clBevelShade, MainTexture.clBevelLight);611 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 618 612 if G.Difficulty[me] = 0 then 619 613 s := IntToStr(mi.cost) … … 636 630 (yTotal + StatDown - 19), Phrases.Lookup('UNITINTRO')); 637 631 DLine(offscreen.Canvas, xTotal - 2, xTotal + 170, 638 (yTotal + StatDown - 19) + 16, MainTexture. clTextShade,639 MainTexture. clTextLight);632 (yTotal + StatDown - 19) + 16, MainTexture.ColorTextShade, 633 MainTexture.ColorTextLight); 640 634 s := TurnToString(MyModel[mixShow].IntroTurn); 641 635 RisedTextout(offscreen.Canvas, … … 675 669 ConscriptsBtn.ButtonIndex := 29; 676 670 ConscriptsBtn.Hint := Phrases.Lookup('BTN_ALLOWCONSCRIPTS'); 677 end 671 end; 678 672 end 679 673 else if Kind = dkEnemyModel then … … 685 679 NumberBar(offscreen, xTotal, yTotal + StatDown, 686 680 Phrases.Lookup('UNITKNOWN'), Available, MainTexture); 687 end 681 end; 688 682 end; 689 683 end; … … 705 699 procedure TUnitStatDlg.ModelBoxChange(Sender: TObject); 706 700 begin 707 SmartUpdateContent 701 SmartUpdateContent; 708 702 end; 709 703 … … 720 714 SwitchBtn.ButtonIndex := 11; 721 715 SwitchBtn.Hint := Phrases.Lookup('BTN_NONOBSOLETE'); 722 end 716 end; 723 717 end; 724 718 … … 735 729 ConscriptsBtn.ButtonIndex := 29; 736 730 ConscriptsBtn.Hint := Phrases.Lookup('BTN_ALLOWCONSCRIPTS'); 737 end 731 end; 738 732 end; 739 733 740 734 procedure TUnitStatDlg.HelpBtnClick(Sender: TObject); 741 735 begin 742 HelpDlg.ShowNewContent(wmPersistent, hkModel, 0) 736 HelpDlg.ShowNewContent(wmPersistent, hkModel, 0); 743 737 end; 744 738 -
branches/highdpi/LocalPlayer/Wonders.pas
r349 r361 199 199 200 200 Fill(Offscreen.Canvas, 3, 3, ClientWidth - 6, ClientHeight - 6, 201 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);201 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 202 202 Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 203 203 Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 204 MainTexture. clBevelLight, MainTexture.clBevelShade);204 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 205 205 Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 206 MainTexture. clBevelLight, MainTexture.clBevelShade);206 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 207 207 Corner(Offscreen.Canvas, 1, 1, 0, MainTexture); 208 208 Corner(Offscreen.Canvas, ClientWidth - 9, 1, 1, MainTexture); … … 230 230 Fill(Offscreen.Canvas, Center.X - xSizeBig div 2 + RingPosition[I].X - 3, 231 231 Center.Y - ySizeBig div 2 + RingPosition[I].Y - 3, xSizeBig + 6, 232 ySizeBig + 6, ( wMaintexture- ClientWidth) div 2,233 ( hMaintexture- ClientHeight) div 2);232 ySizeBig + 6, (Maintexture.Width - ClientWidth) div 2, 233 (Maintexture.Height - ClientHeight) div 2); 234 234 end; 235 235 WonderDestroyed: begin … … 308 308 begin 309 309 Fill(Canvas, 9, ClientHeight - 3 - 46, ClientWidth - 18, 44, 310 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);310 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 311 311 if Selection >= 0 then 312 312 begin … … 318 318 (ClientWidth-BiColorTextWidth(Canvas,S)) div 2+1, 319 319 ClientHeight-3-36+1, S); 320 Canvas.Font.Color:=MainTexture. clBevelLight;320 Canvas.Font.Color:=MainTexture.ColorBevelLight; 321 321 Canvas.TextOut( 322 322 (ClientWidth-BiColorTextWidth(Canvas,S)) div 2,
Note:
See TracChangeset
for help on using the changeset viewer.