Changeset 155 for trunk/LocalPlayer/BaseWin.pas
- Timestamp:
- Nov 10, 2018, 7:47:29 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/BaseWin.pas
r118 r155 9 9 10 10 type 11 12 { TBufferedDrawDlg } 13 11 14 TBufferedDrawDlg = class(TDrawDlg) 12 15 public 13 16 UserLeft, UserTop: integer; 14 17 constructor Create(AOwner: TComponent); override; 18 destructor Destroy; override; 15 19 procedure FormClose(Sender: TObject; var Action: TCloseAction); 16 20 procedure FormPaint(Sender: TObject); … … 27 31 procedure VPaint; virtual; 28 32 public 33 UsedOffscreenWidth, UsedOffscreenHeight: integer; 34 Offscreen: TBitmap; 35 OffscreenUser: TForm; 29 36 property WindowMode: integer read FWindowMode; 30 37 end; … … 55 62 SideFrame = 9; 56 63 57 var 58 UsedOffscreenWidth, UsedOffscreenHeight: integer; 59 Offscreen: TBitmap; 60 OffscreenUser: TForm; 61 62 procedure CreateOffscreen; 64 procedure CreateOffscreen(var Offscreen: TBitmap); 63 65 64 66 implementation … … 67 69 Term, Help, ButtonBase, Area; 68 70 69 constructor TBufferedDrawDlg.Create; 70 begin 71 constructor TBufferedDrawDlg.Create(AOwner: TComponent); 72 begin 73 BaseWin.CreateOffscreen(Offscreen); 71 74 OnClose := FormClose; 72 75 OnPaint := FormPaint; … … 80 83 UserLeft := (Screen.Width - Width) div 2; 81 84 UserTop := (Screen.Height - Height) div 2; 85 end; 86 87 destructor TBufferedDrawDlg.Destroy; 88 begin 89 Offscreen.Free; 90 inherited Destroy; 82 91 end; 83 92 … … 464 473 end; 465 474 466 procedure CreateOffscreen ;475 procedure CreateOffscreen(var Offscreen: TBitmap); 467 476 begin 468 477 if Offscreen <> nil then … … 480 489 initialization 481 490 482 Offscreen := nil;483 OffscreenUser := nil;484 485 491 finalization 486 492 487 Offscreen.Free;488 489 493 end.
Note:
See TracChangeset
for help on using the changeset viewer.