Changeset 473 for trunk/LocalPlayer/MessgEx.pas
- Timestamp:
- Dec 4, 2023, 12:13:15 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/MessgEx.pas
r471 r473 103 103 else 104 104 Button1.Left := 159; 105 RemoveBtn.Left := ClientWidth - 38;105 RemoveBtn.Left := Width - 38; 106 106 case Kind of 107 107 mkYesNo, mkYesNoCancel: … … 151 151 152 152 SplitText(True); 153 ClientHeight := 72 + Border + TopSpace + Lines * MessageLineSpacing;153 Height := 72 + Border + TopSpace + Lines * MessageLineSpacing; 154 154 if GameMode = cMovie then 155 ClientHeight := ClientHeight - 32;155 Height := Height - 32; 156 156 if Kind = mkModel then 157 ClientHeight := ClientHeight + 36;157 Height := Height + 36; 158 158 if IconKind in [mikMyArmy, mikEnemyArmy] then 159 159 begin 160 160 if nLostArmy > LostUnitsPerLine * 6 then 161 ClientHeight := ClientHeight + 6 * 48161 Height := Height + 6 * 48 162 162 else 163 ClientHeight := ClientHeight + ((nLostArmy - 1) div LostUnitsPerLine163 Height := Height + ((nLostArmy - 1) div LostUnitsPerLine 164 164 + 1) * 48; 165 165 end; … … 167 167 0: 168 168 begin 169 Left := (Screen.Width - ClientWidth) div 2;170 Top := (Screen.Height - ClientHeight) div 2 - MapCenterUp;169 Left := (Screen.Width - Width) div 2; 170 Top := (Screen.Height - Height) div 2 - MapCenterUp; 171 171 end; 172 172 1: 173 173 begin 174 Left := (Screen.Width - ClientWidth) div 4;175 Top := (Screen.Height - ClientHeight) * 2 div 3 - MapCenterUp;174 Left := (Screen.Width - Width) div 4; 175 Top := (Screen.Height - Height) * 2 div 3 - MapCenterUp; 176 176 end; 177 177 -1: 178 178 begin 179 Left := (Screen.Width - ClientWidth) div 4;180 Top := (Screen.Height - ClientHeight) div 3 - MapCenterUp;179 Left := (Screen.Width - Width) div 4; 180 Top := (Screen.Height - Height) div 3 - MapCenterUp; 181 181 end; 182 182 end; 183 183 for I := 0 to ControlCount - 1 do 184 Controls[I].Top := ClientHeight - (34 + Border);184 Controls[I].Top := Height - (34 + Border); 185 185 if Kind = mkModel then 186 EInput.Top := ClientHeight - (76 + Border);186 EInput.Top := Height - (76 + Border); 187 187 end; 188 188 … … 321 321 for count := 0 to LostArmy[emix] - 1 do 322 322 begin 323 X := ClientWidth div 2 + ix * 64 - UnitsInLine * 32;323 X := Width div 2 + ix * 64 - UnitsInLine * 32; 324 324 Y := 26 + Border + TopSpace + Lines * MessageLineSpacing + iy * 48; 325 325 with MyRO.EnemyModel[emix], Tribe[Owner].ModelPicture[mix] do … … 371 371 BitBltCanvas(Buffer.Canvas, 0, 0, xSizeBig + 2 * GlowRange, 372 372 ySizeBig + 2 * GlowRange, Canvas, 373 ClientWidth div 2 - (28 + GlowRange), 24 - GlowRange);373 Width div 2 - (28 + GlowRange), 24 - GlowRange); 374 374 BitBltCanvas(Buffer.Canvas, GlowRange, GlowRange, xSizeBig, ySizeBig, 375 375 BigImp.Canvas, IconIndex mod 7 * xSizeBig, … … 380 380 GlowFrame(Buffer, GlowRange, GlowRange, xSizeBig, ySizeBig, 381 381 Tribe[p1].Color); 382 BitBltCanvas(Canvas, ClientWidth div 2 - (28 + GlowRange),382 BitBltCanvas(Canvas, Width div 2 - (28 + GlowRange), 383 383 24 - GlowRange, xSizeBig + 2 * GlowRange, ySizeBig + 2 * GlowRange, 384 384 Buffer.Canvas, 0, 0); 385 385 end 386 386 else 387 ImpImage(Canvas, ClientWidth div 2 - 28, 24, IconIndex);387 ImpImage(Canvas, Width div 2 - 28, 24, IconIndex); 388 388 mikAge: 389 389 begin 390 390 if IconIndex = 0 then 391 ImpImage(Canvas, ClientWidth div 2 - 28, 24, -7)391 ImpImage(Canvas, Width div 2 - 28, 24, -7) 392 392 else 393 ImpImage(Canvas, ClientWidth div 2 - 28, 24, 24 + IconIndex)393 ImpImage(Canvas, Width div 2 - 28, 24, 24 + IconIndex) 394 394 end; 395 395 mikModel: 396 396 with Tribe[Me].ModelPicture[IconIndex] do 397 397 begin 398 FrameImage(Canvas, BigImp, ClientWidth div 2 - 28, 24, xSizeBig,398 FrameImage(Canvas, BigImp, Width div 2 - 28, 24, xSizeBig, 399 399 ySizeBig, 0, 0); 400 BitBltCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44,400 BitBltCanvas(Canvas, Width div 2 - 32, 20, 64, 44, 401 401 HGr.Mask.Canvas, pix mod 10 * 65 + 1, 402 402 pix div 10 * 49 + 1, SRCAND); 403 BitBltCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44,403 BitBltCanvas(Canvas, Width div 2 - 32, 20, 64, 44, 404 404 HGr.Data.Canvas, pix mod 10 * 65 + 1, 405 405 pix div 10 * 49 + 1, SRCPAINT); 406 406 end; 407 407 mikBook: 408 PaintBook(Canvas, ClientWidth div 2, 24, MainTexture.ColorPage,408 PaintBook(Canvas, Width div 2, 24, MainTexture.ColorPage, 409 409 MainTexture.ColorCover); 410 410 mikTribe: 411 411 if Assigned(Tribe[IconIndex].faceHGr) then 412 412 begin 413 Frame(Canvas, ClientWidth div 2 - 32 - 1, 24 - 1,414 ClientWidth div 2 + 32, 24 + 48, $000000, $000000);415 BitBltCanvas(Canvas, ClientWidth div 2 - 32, 24, 64, 48,413 Frame(Canvas, Width div 2 - 32 - 1, 24 - 1, 414 Width div 2 + 32, 24 + 48, $000000, $000000); 415 BitBltCanvas(Canvas, Width div 2 - 32, 24, 64, 48, 416 416 Tribe[IconIndex].faceHGr.Data.Canvas, 417 417 1 + Tribe[IconIndex].facepix mod 10 * 65, … … 419 419 end; 420 420 mikPureIcon: 421 FrameImage(Canvas, BigImp, ClientWidth div 2 - 28, 24, xSizeBig, ySizeBig,421 FrameImage(Canvas, BigImp, Width div 2 - 28, 24, xSizeBig, ySizeBig, 422 422 IconIndex mod 7 * xSizeBig, IconIndex div 7 * ySizeBig); 423 423 mikBigIcon: 424 FrameImage(Canvas, BigImp, ClientWidth div 2 - 3 * 28, 32, xSizeBig * 3,424 FrameImage(Canvas, BigImp, Width div 2 - 3 * 28, 32, xSizeBig * 3, 425 425 ySizeBig * 3, IconIndex mod 2 * 3 * xSizeBig, 426 426 IconIndex div 2 * 3 * ySizeBig); … … 428 428 begin 429 429 BitBltCanvas(Buffer.Canvas, 0, 0, 140, 120, Canvas, 430 ( ClientWidth - 140) div 2, 24);430 (Width - 140) div 2, 24); 431 431 ImageOp_BCC(Buffer, Templates.Data, Point(0, 0), StarshipDeparted.BoundsRect, 0, $FFFFFF); 432 BitBltCanvas(Canvas, ( ClientWidth - 140) div 2, 24, 140, 120,432 BitBltCanvas(Canvas, (Width - 140) div 2, 24, 140, 120, 433 433 Buffer.Canvas, 0, 0); 434 434 end; … … 438 438 PaintEnemyArmy; 439 439 mikFullControl: 440 Sprite(Canvas, HGrSystem2, ClientWidth div 2 - 31, 24, 63, 63, 1, 281);440 Sprite(Canvas, HGrSystem2, Width div 2 - 31, 24, 63, 63, 1, 281); 441 441 mikShip: 442 PaintColonyShip(Canvas, IconIndex, 17, ClientWidth - 34, 38);442 PaintColonyShip(Canvas, IconIndex, 17, Width - 34, 38); 443 443 end; 444 444
Note:
See TracChangeset
for help on using the changeset viewer.