Changeset 90 for trunk/Forms/UFormPlayer.pas
- Timestamp:
- Nov 16, 2014, 5:12:25 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormPlayer.pas
r55 r90 16 16 ButtonCancel: TButton; 17 17 ButtonOk: TButton; 18 CheckBoxDefensive: TCheckBox; 18 19 ColorBox1: TColorBox; 19 20 ComboBox1: TComboBox; 21 ComboBoxAgressivity: TComboBox; 20 22 EditName: TEdit; 21 23 Label1: TLabel; 22 24 Label2: TLabel; 23 25 Label3: TLabel; 26 Label4: TLabel; 24 27 private 25 28 { private declarations } … … 40 43 SHuman = 'Human'; 41 44 SComputer = 'Computer'; 45 SAgroNotAttacking = 'Not attacking'; 46 SAgroLow = 'Low'; 47 SAgroMedium = 'Medium'; 48 SAgroHigh = 'High'; 42 49 43 50 { TFormPlayer } … … 54 61 ItemIndex := LastIndex; 55 62 end; 63 with ComboBoxAgressivity do begin 64 LastIndex := ItemIndex; 65 Clear; 66 Items.Add(SAgroLow); 67 Items.Add(SAgroMedium); 68 Items.Add(SAgroHigh); 69 ItemIndex := LastIndex; 70 end; 56 71 end; 57 72 … … 61 76 ComboBox1.ItemIndex := Integer(Player.Mode); 62 77 ColorBox1.Selected := Player.Color; 78 Label4.Visible := Player.Mode = pmComputer; 79 ComboBoxAgressivity.Visible := Player.Mode = pmComputer; 80 ComboBoxAgressivity.ItemIndex := Integer(Player.Agressivity); 81 CheckBoxDefensive.Visible := Player.Mode = pmComputer; 82 CheckBoxDefensive.Checked := Player.Defensive; 63 83 end; 64 84 … … 68 88 Player.Mode := TPlayerMode(ComboBox1.ItemIndex); 69 89 Player.Color := ColorBox1.Selected; 90 Player.Agressivity := TComputerAgressivity(ComboBoxAgressivity.ItemIndex); 91 Player.Defensive := CheckBoxDefensive.Checked; 70 92 end; 71 93
Note:
See TracChangeset
for help on using the changeset viewer.