Changeset 194 for trunk/Start.pas
- Timestamp:
- May 7, 2020, 8:39:24 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Start.pas
r192 r194 155 155 procedure SaveConfig; 156 156 procedure LoadAiBrainsPictures; 157 procedure UpdateInterface; 157 158 end; 158 159 … … 432 433 var 433 434 x, i: Integer; 434 r0, r1: HRgn;435 Location: TPoint;436 435 PlayerSlot: TPlayerSlot; 437 436 AIBrains: TBrains; … … 445 444 end; 446 445 LoadConfig; 446 LoadAssets; 447 447 448 448 ActionsOffered := [maConfig, maManual, maCredits, maWeb]; … … 467 467 DirectDlg.Top := (Screen.Height - DirectDlg.Height) div 2; 468 468 469 if FullScreen then begin 470 Location := Point((Screen.Width - 800) * 3 div 8, 471 Screen.Height - Height - (Screen.Height - 600) div 3); 472 Left := Location.X; 473 Top := Location.Y; 474 475 r0 := CreateRectRgn(0, 0, Width, Height); 476 r1 := CreateRectRgn(TabOffset + 4 * TabSize + 2, 0, Width, TabHeight); 477 CombineRgn(r0, r0, r1, RGN_DIFF); 478 DeleteObject(r1); 479 r1 := CreateRectRgn(QuitBtn.Left, QuitBtn.Top, QuitBtn.Left + QuitBtn.Width, 480 QuitBtn.top + QuitBtn.Height); 481 CombineRgn(r0, r0, r1, RGN_OR); 482 DeleteObject(r1); 483 SetWindowRgn(Handle, r0, False); 484 DeleteObject(r0); // causes crash with Windows 95 485 end else begin 486 Left := (Screen.Width - Width) div 2; 487 Top := (Screen.Height - Height) div 2; 488 end; 469 UpdateInterface; 489 470 490 471 Canvas.Font.Assign(UniFont[ftNormal]); … … 703 684 end; 704 685 AIBrains.Free; 686 end; 687 688 procedure TStartDlg.UpdateInterface; 689 var 690 r0, r1: HRgn; 691 Location: TPoint; 692 begin 693 if FullScreen then begin 694 Location := Point((Screen.Width - 800) * 3 div 8, 695 Screen.Height - Height - (Screen.Height - 600) div 3); 696 Left := Location.X; 697 Top := Location.Y; 698 699 r0 := CreateRectRgn(0, 0, Width, Height); 700 r1 := CreateRectRgn(TabOffset + 4 * TabSize + 2, 0, Width, TabHeight); 701 CombineRgn(r0, r0, r1, RGN_DIFF); 702 DeleteObject(r1); 703 r1 := CreateRectRgn(QuitBtn.Left, QuitBtn.Top, QuitBtn.Left + QuitBtn.Width, 704 QuitBtn.top + QuitBtn.Height); 705 CombineRgn(r0, r0, r1, RGN_OR); 706 DeleteObject(r1); 707 SetWindowRgn(Handle, r0, False); 708 DeleteObject(r0); // causes crash with Windows 95 709 end else begin 710 Left := (Screen.Width - Width) div 2; 711 Top := (Screen.Height - Height) div 2; 712 end; 705 713 end; 706 714 … … 1636 1644 LocaleDlg := TLocaleDlg.Create(nil); 1637 1645 if LocaleDlg.ShowModal = mrOk then begin 1638 Load Phrases;1646 LoadAssets; 1639 1647 Invalidate; 1648 UpdateInterface; 1649 Background.UpdateInterface; 1640 1650 end; 1641 1651 FreeAndNil(LocaleDlg);
Note:
See TracChangeset
for help on using the changeset viewer.