Changeset 23 for trunk/Forms/UNewGameForm.pas
- Timestamp:
- Sep 28, 2011, 8:34:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UNewGameForm.pas
r22 r23 19 19 ListView1: TListView; 20 20 procedure ButtonStartClick(Sender: TObject); 21 procedure Form Create(Sender: TObject);21 procedure FormShow(Sender: TObject); 22 22 procedure ListView1Change(Sender: TObject; Item: TListItem; 23 23 Change: TItemChange); … … 40 40 { TNewGameForm } 41 41 42 procedure TNewGameForm.FormCreate(Sender: TObject);43 var44 NewItem: TListItem;45 I: Integer;46 begin47 with ListView1 do try48 BeginUpdate;49 Clear;50 for I := 0 to Engine.Players.Count - 1 do51 with TPlayer(Engine.Players[I]) do begin52 NewItem := Items.Add;53 NewItem.Caption := Name;54 NewItem.SubItems.Add(IntToStr(Color));55 NewItem.SubItems.Add('');56 NewItem.Checked := Enabled;57 NewItem.Data := Pointer(Engine.Players[I]);58 end;59 finally60 EndUpdate;61 end;62 end;63 64 42 procedure TNewGameForm.ListView1Change(Sender: TObject; Item: TListItem; 65 43 Change: TItemChange); … … 74 52 end; 75 53 54 procedure TNewGameForm.FormShow(Sender: TObject); 55 var 56 NewItem: TListItem; 57 I: Integer; 58 begin 59 with ListView1 do try 60 BeginUpdate; 61 Clear; 62 for I := 0 to Engine.PlayerPool.Count - 1 do 63 with TPlayer(Engine.PlayerPool[I]) do begin 64 NewItem := Items.Add; 65 NewItem.Caption := Name; 66 NewItem.SubItems.Add(IntToStr(Color)); 67 NewItem.SubItems.Add(''); 68 NewItem.Checked := Enabled; 69 NewItem.Data := Pointer(Engine.PlayerPool[I]); 70 end; 71 finally 72 EndUpdate; 73 end; 74 end; 75 76 76 end. 77 77
Note:
See TracChangeset
for help on using the changeset viewer.