Changeset 55 for trunk/Forms/UFormNew.pas
- Timestamp:
- Aug 18, 2014, 9:34:15 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNew.pas
r42 r55 69 69 Players: TPlayers; 70 70 public 71 procedure Translate; 71 72 procedure ReloadView; 72 73 procedure Load(Game: TGame); … … 82 83 83 84 uses 84 UFormPlayer; 85 UFormPlayer, UCore; 86 87 resourcestring 88 SGridTypeHexagon = 'Hexagonal'; 89 SGridTypeSquare = 'Square'; 90 SGridTypeTriangle = 'Triangonal'; 91 SGridTypeVoronoi = 'Voronoi random'; 92 SWinObjectiveDefeatAllOponents = 'Defeat all oponents'; 93 SWinObjectiveDefeatAllCities = 'Defeat all oponents cities'; 94 SWinObjectiveCapturePosition = 'Capture position'; 95 SWinObjectiveStayAliveForTurns = 'Stay alive for number of turns'; 96 SGrowNone = 'None'; 97 SGrowPlayerCities = 'Player cities'; 98 SGrowPlayerAllCells = 'Player all cells'; 99 SGrowAmountByOne = 'By one'; 100 SGrowAmountBySquareRoot = 'By square root'; 101 85 102 86 103 { TFormNew } … … 141 158 end; 142 159 160 procedure TFormNew.Translate; 161 var 162 LastIndex: Integer; 163 begin 164 with ComboBoxGridType do begin 165 LastIndex := ItemIndex; 166 Clear; 167 Items.Add(SGridTypeHexagon); 168 Items.Add(SGridTypeSquare); 169 Items.Add(SGridTypeTriangle); 170 if Core.DevelMode then 171 Items.Add(SGridTypeVoronoi); 172 ItemIndex := LastIndex; 173 end; 174 with ComboBoxWinObjective do begin 175 LastIndex := ItemIndex; 176 Clear; 177 Items.Add(SWinObjectiveDefeatAllOponents); 178 Items.Add(SWinObjectiveDefeatAllCities); 179 Items.Add(SWinObjectiveCapturePosition); 180 Items.Add(SWinObjectiveStayAliveForTurns); 181 ItemIndex := LastIndex; 182 end; 183 with RadioGroupGrowCells do begin 184 LastIndex := ItemIndex; 185 Items.Clear; 186 Items.Add(SGrowNone); 187 Items.Add(SGrowPlayerCities); 188 Items.Add(SGrowPlayerAllCells); 189 ItemIndex := LastIndex; 190 end; 191 with RadioGroupGrowAmount do begin 192 LastIndex := ItemIndex; 193 Items.Clear; 194 Items.Add(SGrowAmountByOne); 195 Items.Add(SGrowAmountBySquareRoot); 196 ItemIndex := LastIndex; 197 end; 198 end; 199 143 200 procedure TFormNew.ReloadView; 144 201 begin … … 148 205 ButtonPlayerAdd.Enabled := Players.Count < MaxPlayerCount; 149 206 APlayerModify.Enabled := Assigned(ListView1.Selected); 207 Translate; 150 208 end; 151 209
Note:
See TracChangeset
for help on using the changeset viewer.