Changeset 210 for branches/highdpi/LocalPlayer/MessgEx.pas
- Timestamp:
- May 9, 2020, 4:02:07 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/MessgEx.pas
r193 r210 5 5 6 6 uses 7 Messg, Protocol, ScreenTools, Platform, DateUtils, UDpiControls,7 UDpiControls, Messg, Protocol, ScreenTools, Platform, DateUtils, 8 8 LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonA, 9 9 ButtonB, StdCtrls, DrawDlg; … … 73 73 74 74 uses 75 ClientTools, BaseWin, Term, Help, UnitStat, Tribes, 76 IsoEngine, Diagram ;75 ClientTools, BaseWin, Term, Help, UnitStat, Tribes, UPixelPointer, 76 IsoEngine, Diagram, Sound; 77 77 78 78 {$R *.lfm} … … 209 209 Ticks0 := NowPrecise; 210 210 repeat 211 Application.ProcessMessages;211 DpiApplication.ProcessMessages; 212 212 Sleep(1); 213 213 Ticks := NowPrecise; … … 246 246 for iy := 0 to 39 do begin 247 247 for ix := 0 to 55 do begin 248 SrcPtr .Init(BigImp, ix + xIcon, iy + yIcon);248 SrcPtr := PixelPointer(BigImp, ix + xIcon, iy + yIcon); 249 249 xR := ix * (37 + iy * 5 / 40) / 56; 250 250 xDst := Trunc(xR); … … 291 291 292 292 // paint 293 BitBltCanvas(LogoBuffer.Canvas, 0, 0, wb, hb, ca, x, y, SRCCOPY);293 DpiBitCanvas(LogoBuffer.Canvas, 0, 0, wb, hb, ca, x, y); 294 294 295 295 if IconIndex >= 0 then … … 304 304 ImageOp_BCC(LogoBuffer, Templates, 0, 0, xb, yb, wb, hb, clCover, clPage); 305 305 306 DpiBit Blt(ca.Handle, x, y, wb, hb, LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);306 DpiBitCanvas(ca, x, y, wb, hb, LogoBuffer.Canvas, 0, 0); 307 307 end; 308 308 … … 328 328 with MyRO.EnemyModel[emix], Tribe[Owner].ModelPicture[mix] do 329 329 begin 330 DpiBit Blt(Canvas.Handle, x, y, 64, 48, GrExt[HGr].Mask.Canvas.Handle,330 DpiBitCanvas(Canvas, x, y, 64, 48, GrExt[HGr].Mask.Canvas, 331 331 pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCAND); 332 DpiBit Blt(Canvas.Handle, x, y, 64, 48, GrExt[HGr].Data.Canvas.Handle,332 DpiBitCanvas(Canvas, x, y, 64, 48, GrExt[HGr].Data.Canvas, 333 333 pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCPAINT); 334 334 end; … … 345 345 if UnitsInLine > LostUnitsPerLine then 346 346 UnitsInLine := LostUnitsPerLine; 347 end 347 end; 348 348 end; 349 349 end; … … 371 371 begin 372 372 p1 := MyRO.Wonder[IconIndex].EffectiveOwner; 373 DpiBit Blt(Buffer.Canvas.Handle, 0, 0, xSizeBig + 2 * GlowRange,374 ySizeBig + 2 * GlowRange, Canvas .Handle,375 ClientWidth div 2 - (28 + GlowRange), 24 - GlowRange , SRCCOPY);376 DpiBit Blt(Buffer.Canvas.Handle, GlowRange, GlowRange, xSizeBig, ySizeBig,377 BigImp.Canvas .Handle, IconIndex mod 7 * xSizeBig,378 (IconIndex + SystemIconLines * 7) div 7 * ySizeBig , SRCCOPY);373 DpiBitCanvas(Buffer.Canvas, 0, 0, xSizeBig + 2 * GlowRange, 374 ySizeBig + 2 * GlowRange, Canvas, 375 ClientWidth div 2 - (28 + GlowRange), 24 - GlowRange); 376 DpiBitCanvas(Buffer.Canvas, GlowRange, GlowRange, xSizeBig, ySizeBig, 377 BigImp.Canvas, IconIndex mod 7 * xSizeBig, 378 (IconIndex + SystemIconLines * 7) div 7 * ySizeBig); 379 379 if p1 < 0 then 380 380 GlowFrame(Buffer, GlowRange, GlowRange, xSizeBig, ySizeBig, $000000) … … 382 382 GlowFrame(Buffer, GlowRange, GlowRange, xSizeBig, ySizeBig, 383 383 Tribe[p1].Color); 384 DpiBit Blt(Canvas.Handle, ClientWidth div 2 - (28 + GlowRange),384 DpiBitCanvas(Canvas, ClientWidth div 2 - (28 + GlowRange), 385 385 24 - GlowRange, xSizeBig + 2 * GlowRange, ySizeBig + 2 * GlowRange, 386 Buffer.Canvas .Handle, 0, 0, SRCCOPY);386 Buffer.Canvas, 0, 0); 387 387 end 388 388 else … … 400 400 FrameImage(Canvas, BigImp, ClientWidth div 2 - 28, 24, xSizeBig, 401 401 ySizeBig, 0, 0); 402 DpiBit Blt(Canvas.Handle, ClientWidth div 2 - 32, 20, 64, 44,403 GrExt[HGr].Mask.Canvas .Handle, pix mod 10 * 65 + 1,402 DpiBitCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44, 403 GrExt[HGr].Mask.Canvas, pix mod 10 * 65 + 1, 404 404 pix div 10 * 49 + 1, SRCAND); 405 DpiBit Blt(Canvas.Handle, ClientWidth div 2 - 32, 20, 64, 44,406 GrExt[HGr].Data.Canvas .Handle, pix mod 10 * 65 + 1,405 DpiBitCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44, 406 GrExt[HGr].Data.Canvas, pix mod 10 * 65 + 1, 407 407 pix div 10 * 49 + 1, SRCPAINT); 408 408 end; … … 415 415 Frame(Canvas, ClientWidth div 2 - 32 - 1, 24 - 1, 416 416 ClientWidth div 2 + 32, 24 + 48, $000000, $000000); 417 DpiBit Blt(Canvas.Handle, ClientWidth div 2 - 32, 24, 64, 48,418 GrExt[Tribe[IconIndex].faceHGr].Data.Canvas .Handle,417 DpiBitCanvas(Canvas, ClientWidth div 2 - 32, 24, 64, 48, 418 GrExt[Tribe[IconIndex].faceHGr].Data.Canvas, 419 419 1 + Tribe[IconIndex].facepix mod 10 * 65, 420 1 + Tribe[IconIndex].facepix div 10 * 49 , SRCCOPY)420 1 + Tribe[IconIndex].facepix div 10 * 49) 421 421 end; 422 422 mikPureIcon: … … 429 429 mikEnemyShipComplete: 430 430 begin 431 BitBltCanvas(Buffer.Canvas, 0, 0, 140, 120, Canvas,432 (ClientWidth - 140) div 2, 24 , SRCCOPY);431 DpiBitCanvas(Buffer.Canvas, 0, 0, 140, 120, Canvas, 432 (ClientWidth - 140) div 2, 24); 433 433 ImageOp_BCC(Buffer, Templates, 0, 0, 1, 279, 140, 120, 0, $FFFFFF); 434 DpiBit Blt(Canvas.Handle, (ClientWidth - 140) div 2, 24, 140, 120,435 Buffer.Canvas .Handle, 0, 0, SRCCOPY);434 DpiBitCanvas(Canvas, (ClientWidth - 140) div 2, 24, 140, 120, 435 Buffer.Canvas, 0, 0); 436 436 end; 437 437 mikMyArmy: … … 450 450 if OpenSound <> '' then 451 451 PostMessage(Handle, WM_PLAYSOUND, 0, 0); 452 end; { FormPaint }452 end; 453 453 454 454 procedure TMessgExDlg.Button1Click(Sender: TObject); … … 469 469 procedure TMessgExDlg.Button3Click(Sender: TObject); 470 470 begin 471 ModalResult := mrCancel 471 ModalResult := mrCancel; 472 472 end; 473 473 474 474 procedure TMessgExDlg.RemoveBtnClick(Sender: TObject); 475 475 begin 476 ModalResult := mrNo 476 ModalResult := mrNo; 477 477 end; 478 478 … … 485 485 ModalResult := mrCancel 486 486 else if Button2.Visible then 487 ModalResult := mrIgnore 487 ModalResult := mrIgnore; 488 488 end; 489 489 … … 497 497 Kind := mkOk; 498 498 ShowModal; 499 end 499 end; 500 500 end; 501 501 … … 522 522 Kind := QueryKind; 523 523 ShowModal; 524 result := ModalResult 525 end 524 result := ModalResult; 525 end; 526 526 end; 527 527 … … 537 537 HelpNo := ContextNo; 538 538 ShowModal; 539 end 539 end; 540 540 end; 541 541 … … 552 552 end; 553 553 554 554 555 initialization 555 556
Note:
See TracChangeset
for help on using the changeset viewer.