Changeset 330 for trunk/Forms/FormGameSystem.pas
- Timestamp:
- Jul 19, 2024, 9:46:33 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormGameSystem.pas
r317 r330 19 19 CheckBoxUnitsMoveImmediately: TCheckBox; 20 20 CheckBoxUnitsSplitMerge: TCheckBox; 21 ComboBoxPreferredGridType: TComboBox; 22 Label5: TLabel; 21 23 OpenDialog1: TOpenDialog; 22 24 PageControl1: TPageControl; … … 36 38 FormBuildingKinds: TFormList; 37 39 procedure SetGameSystem(AValue: TGameSystem); 40 procedure Translate; 38 41 public 39 42 property GameSystem: TGameSystem read FGameSystem write SetGameSystem; … … 47 50 {$R *.lfm} 48 51 52 uses 53 MapType; 54 49 55 resourcestring 50 56 SFileDialogFilter = 'xTactics game system (.xts)|*.xts|All files|*.*'; 57 51 58 52 59 { TFormGameSystem } … … 88 95 FormBuildingKinds.Align := alClient; 89 96 FormBuildingKinds.Visible := True; 97 Translate; 90 98 end; 91 99 … … 114 122 end; 115 123 124 procedure TFormGameSystem.Translate; 125 var 126 LastIndex: Integer; 127 begin 128 with ComboBoxPreferredGridType do begin 129 LastIndex := ItemIndex; 130 Clear; 131 Items.AddObject(SGridTypeNone, TObject(mtNone)); 132 Items.AddObject(SGridTypeHexagonVertical, TObject(mtHexagonVertical)); 133 Items.AddObject(SGridTypeHexagonHorizontal, TObject(mtHexagonHorizontal)); 134 Items.AddObject(SGridTypeSquare, TObject(mtSquare)); 135 Items.AddObject(SGridTypeTriangle, TObject(mtTriangle)); 136 Items.AddObject(SGridTypeRandom, TObject(mtRandom)); 137 Items.AddObject(SGridTypeIsometric, TObject(mtIsometric)); 138 ItemIndex := LastIndex; 139 end; 140 end; 141 116 142 procedure TFormGameSystem.LoadData(GameSystem: TGameSystem); 117 143 begin … … 120 146 CheckBoxUnitsSplitMerge.Checked := GameSystem.UnitsSplitMerge; 121 147 CheckBoxUnitsMoveImmediately.Checked := GameSystem.UnitsMoveImmediately; 148 ComboBoxPreferredGridType.ItemIndex := Integer(GameSystem.PreferedMapType); 122 149 FormNations.UpdateList; 123 150 FormNations.UpdateInterface; … … 134 161 GameSystem.UnitsSplitMerge := CheckBoxUnitsSplitMerge.Checked; 135 162 GameSystem.UnitsMoveImmediately := CheckBoxUnitsMoveImmediately.Checked; 163 GameSystem.PreferedMapType := TMapType(ComboBoxPreferredGridType.ItemIndex); 136 164 end; 137 165
Note:
See TracChangeset
for help on using the changeset viewer.