source: branches/CpuSingleSize/Message.pas

Last change on this file was 238, checked in by chronos, 16 months ago
  • Modified: Removed U prefix from unit names.
  • Fixed: Memory leaks.
File size: 488 bytes
Line 
1unit Message;
2
3interface
4
5uses
6 Classes, SysUtils, Generics.Collections;
7
8type
9 TMessage = class
10 Text: string;
11 Position: TPoint;
12 end;
13
14 { TMessages }
15
16 TMessages = class(TObjectList<TMessage>)
17 function AddMessage(Text: string; Pos: TPoint): TMessage;
18 end;
19
20
21implementation
22
23{ TMessages }
24
25function TMessages.AddMessage(Text: string; Pos: TPoint): TMessage;
26begin
27 Result := TMessage.Create;
28 Result.Text := Text;
29 Result.Position := Pos;
30 Add(Result);
31end;
32
33end.
34
Note: See TracBrowser for help on using the repository browser.