Changeset 55 for trunk/Forms
- Timestamp:
- Aug 18, 2014, 9:34:15 AM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNew.lfm
r47 r55 240 240 end 241 241 object RadioGroupGrowAmount: TRadioGroup 242 Left = 3 60242 Left = 376 243 243 Height = 76 244 244 Top = 97 245 Width = 241245 Width = 305 246 246 AutoFill = True 247 247 Caption = 'Per turn grow amount' … … 254 254 ChildSizing.ControlsPerLine = 1 255 255 ClientHeight = 49 256 ClientWidth = 237256 ClientWidth = 301 257 257 Items.Strings = ( 258 258 'By one' … … 264 264 Left = 8 265 265 Height = 105 266 Top = 18 5267 Width = 185266 Top = 184 267 Width = 312 268 268 AutoFill = True 269 269 Caption = 'Growing cells' … … 276 276 ChildSizing.ControlsPerLine = 1 277 277 ClientHeight = 78 278 ClientWidth = 181278 ClientWidth = 308 279 279 Items.Strings = ( 280 280 'None' … … 285 285 end 286 286 object ComboBoxGridType: TComboBox 287 Left = 312288 Height = 3 7287 Left = 473 288 Height = 33 289 289 Top = 201 290 290 Width = 208 … … 299 299 end 300 300 object Label5: TLabel 301 Left = 216301 Left = 336 302 302 Height = 25 303 303 Top = 201 … … 315 315 end 316 316 object ComboBoxWinObjective: TComboBox 317 Left = 160318 Height = 3 7317 Left = 232 318 Height = 33 319 319 Top = 305 320 Width = 208320 Width = 328 321 321 ItemHeight = 0 322 322 Items.Strings = ( … … 338 338 end 339 339 object SpinEditNeutralUnits: TSpinEdit 340 Left = 272341 Height = 35 342 Top = 34 3340 Left = 384 341 Height = 35 342 Top = 344 343 343 Width = 98 344 344 MaxValue = 99 -
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 -
trunk/Forms/UFormPlayer.pas
r29 r55 25 25 { private declarations } 26 26 public 27 procedure Translate; 27 28 procedure Load(Player: TPlayer); 28 29 procedure Save(Player: TPlayer); … … 36 37 {$R *.lfm} 37 38 39 resourcestring 40 SHuman = 'Human'; 41 SComputer = 'Computer'; 42 38 43 { TFormPlayer } 44 45 procedure TFormPlayer.Translate; 46 var 47 LastIndex: Integer; 48 begin 49 with ComboBox1 do begin 50 LastIndex := ItemIndex; 51 Clear; 52 Items.Add(SHuman); 53 Items.Add(SComputer); 54 ItemIndex := LastIndex; 55 end; 56 end; 39 57 40 58 procedure TFormPlayer.Load(Player: TPlayer); -
trunk/Forms/UFormSettings.lfm
r33 r55 29 29 object Label1: TLabel 30 30 Left = 20 31 Height = 2 231 Height = 25 32 32 Top = 26 33 Width = 8033 Width = 95 34 34 Caption = 'Language:' 35 35 ParentColor = False … … 37 37 object ComboBoxLanguage: TComboBox 38 38 Left = 178 39 Height = 3 239 Height = 37 40 40 Top = 24 41 41 Width = 196 … … 44 44 TabOrder = 2 45 45 end 46 object CheckBoxDevelMode: TCheckBox 47 Left = 16 48 Height = 27 49 Top = 80 50 Width = 176 51 Caption = 'Developer mode' 52 TabOrder = 3 53 end 46 54 end -
trunk/Forms/UFormSettings.lrt
r33 r55 3 3 TFORMSETTINGS.BUTTONCANCEL.CAPTION=Cancel 4 4 TFORMSETTINGS.LABEL1.CAPTION=Language: 5 TFORMSETTINGS.CHECKBOXDEVELMODE.CAPTION=Developer mode -
trunk/Forms/UFormSettings.pas
r33 r55 15 15 ButtonOk: TButton; 16 16 ButtonCancel: TButton; 17 CheckBoxDevelMode: TCheckBox; 17 18 ComboBoxLanguage: TComboBox; 18 19 Label1: TLabel; … … 41 42 ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language); 42 43 if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0; 44 CheckBoxDevelMode.Checked := Core.DevelMode; 43 45 end; 44 46 … … 47 49 if ComboBoxLanguage.ItemIndex <> -1 then 48 50 Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]); 51 Core.DevelMode := CheckBoxDevelMode.Checked; 49 52 end; 50 53
Note:
See TracChangeset
for help on using the changeset viewer.