Changeset 22 for trunk/Forms
- Timestamp:
- Sep 28, 2011, 3:10:01 PM (13 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UMainForm.pas
r21 r22 115 115 PlayerCount := 4; 116 116 with TPlayer(Players[0]) do begin 117 Name := 'Player 1'; 117 118 Keys.Left := 65; 118 119 Keys.Down := 83; … … 122 123 end; 123 124 with TPlayer(Players[1]) do begin 125 Name := 'Player 2'; 124 126 Keys.Left := 37; 125 127 Keys.Down := 40; … … 129 131 end; 130 132 with TPlayer(Players[2]) do begin 133 Name := 'Player 3'; 131 134 Keys.Left := 76; 132 135 Keys.Down := 186; … … 136 139 end; 137 140 with TPlayer(Players[3]) do begin 141 Name := 'Player 4'; 138 142 Keys.Left := 100; 139 143 Keys.Down := 98; -
trunk/Forms/UNewGameForm.lfm
r21 r22 17 17 Caption = 'Start' 18 18 ModalResult = 1 19 OnClick = ButtonStartClick 19 20 TabOrder = 0 20 21 end … … 59 60 TabOrder = 2 60 61 ViewStyle = vsReport 62 OnChange = ListView1Change 61 63 end 62 64 end -
trunk/Forms/UNewGameForm.pas
r21 r22 18 18 Label1: TLabel; 19 19 ListView1: TListView; 20 procedure ButtonStartClick(Sender: TObject); 20 21 procedure FormCreate(Sender: TObject); 22 procedure ListView1Change(Sender: TObject; Item: TListItem; 23 Change: TItemChange); 21 24 private 22 25 { private declarations } … … 52 55 NewItem.SubItems.Add(''); 53 56 NewItem.Checked := Enabled; 57 NewItem.Data := Pointer(Engine.Players[I]); 54 58 end; 55 59 finally … … 58 62 end; 59 63 64 procedure TNewGameForm.ListView1Change(Sender: TObject; Item: TListItem; 65 Change: TItemChange); 66 begin 67 if Change = ctState then 68 TPlayer(Item.Data).Enabled := Item.Checked; 69 end; 70 71 procedure TNewGameForm.ButtonStartClick(Sender: TObject); 72 begin 73 74 end; 75 60 76 end. 61 77
Note:
See TracChangeset
for help on using the changeset viewer.