Changeset 38 for trunk/Forms
- Timestamp:
- Mar 8, 2014, 10:34:55 PM (11 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNew.lfm
r36 r38 1 1 object FormNew: TFormNew 2 2 Left = 706 3 Height = 5 163 Height = 526 4 4 Top = 455 5 5 Width = 716 6 6 Caption = 'New game' 7 ClientHeight = 5 167 ClientHeight = 526 8 8 ClientWidth = 716 9 9 OnCreate = FormCreate … … 14 14 Left = 632 15 15 Height = 25 16 Top = 4 7916 Top = 490 17 17 Width = 75 18 Anchors = [akRight, akBottom] 18 19 Caption = 'Ok' 19 20 ModalResult = 1 … … 23 24 Left = 544 24 25 Height = 25 25 Top = 4 8026 Top = 491 26 27 Width = 75 28 Anchors = [akBottom] 27 29 Caption = 'Cancel' 28 30 ModalResult = 2 … … 32 34 Left = 16 33 35 Height = 24 34 Top = 17235 Width = 1 7536 Top = 276 37 Width = 194 36 38 Caption = 'Inaccessible places' 37 39 OnChange = CheckBoxVoidChange … … 89 91 Left = 16 90 92 Height = 22 91 Top = 22492 Width = 8893 Top = 184 94 Width = 99 93 95 Caption = 'Map width:' 94 96 ParentColor = False … … 97 99 Left = 136 98 100 Height = 32 99 Top = 219101 Top = 179 100 102 Width = 98 101 103 MinValue = 2 … … 107 109 Left = 136 108 110 Height = 32 109 Top = 2 70111 Top = 230 110 112 Width = 98 111 113 MinValue = 2 … … 127 129 Left = 224 128 130 Height = 32 129 Top = 168131 Top = 272 130 132 Width = 106 131 133 MinValue = 1 … … 136 138 Left = 339 137 139 Height = 22 138 Top = 173139 Width = 1 5140 Top = 277 141 Width = 17 140 142 Caption = '%' 141 143 ParentColor = False … … 144 146 Left = 248 145 147 Height = 43 146 Top = 216148 Top = 176 147 149 Width = 451 148 150 Max = 100 … … 157 159 Left = 248 158 160 Height = 43 159 Top = 2 64161 Top = 224 160 162 Width = 451 161 163 Max = 100 … … 170 172 Left = 16 171 173 Height = 22 174 Top = 232 175 Width = 106 176 Caption = 'Map height:' 177 ParentColor = False 178 end 179 object CheckBoxCity: TCheckBox 180 Left = 16 181 Height = 24 182 Top = 316 183 Width = 73 184 Caption = 'Cities' 185 OnChange = CheckBoxCityChange 186 TabOrder = 12 187 end 188 object SpinEditCityPercent: TSpinEdit 189 Left = 224 190 Height = 32 191 Top = 312 192 Width = 106 193 MinValue = 1 194 TabOrder = 13 195 Value = 1 196 end 197 object Label4: TLabel 198 Left = 339 199 Height = 22 200 Top = 317 201 Width = 17 202 Caption = '%' 203 ParentColor = False 204 end 205 object RadioGroupGrowAmount: TRadioGroup 206 Left = 376 207 Height = 76 172 208 Top = 272 173 Width = 94 174 Caption = 'Map height:' 175 ParentColor = False 209 Width = 241 210 AutoFill = True 211 Caption = 'Per turn grow amount' 212 ChildSizing.LeftRightSpacing = 6 213 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize 214 ChildSizing.EnlargeVertical = crsHomogenousChildResize 215 ChildSizing.ShrinkHorizontal = crsScaleChilds 216 ChildSizing.ShrinkVertical = crsScaleChilds 217 ChildSizing.Layout = cclLeftToRightThenTopToBottom 218 ChildSizing.ControlsPerLine = 1 219 ClientHeight = 52 220 ClientWidth = 237 221 Items.Strings = ( 222 'By one' 223 'By square root' 224 ) 225 TabOrder = 14 226 end 227 object RadioGroupGrowCells: TRadioGroup 228 Left = 16 229 Height = 105 230 Top = 360 231 Width = 185 232 AutoFill = True 233 Caption = 'Growing cells' 234 ChildSizing.LeftRightSpacing = 6 235 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize 236 ChildSizing.EnlargeVertical = crsHomogenousChildResize 237 ChildSizing.ShrinkHorizontal = crsScaleChilds 238 ChildSizing.ShrinkVertical = crsScaleChilds 239 ChildSizing.Layout = cclLeftToRightThenTopToBottom 240 ChildSizing.ControlsPerLine = 1 241 ClientHeight = 81 242 ClientWidth = 181 243 Items.Strings = ( 244 'None' 245 'Player cities' 246 'Player all' 247 ) 248 TabOrder = 15 176 249 end 177 250 end -
trunk/Forms/UFormNew.lrt
r36 r38 13 13 TFORMNEW.LABEL3.CAPTION=% 14 14 TFORMNEW.LABEL2.CAPTION=Map height: 15 TFORMNEW.CHECKBOXCITY.CAPTION=Cities 16 TFORMNEW.LABEL4.CAPTION=% 17 TFORMNEW.RADIOGROUPGROWAMOUNT.CAPTION=Per turn grow amount 18 TFORMNEW.RADIOGROUPGROWCELLS.CAPTION=Growing cells -
trunk/Forms/UFormNew.pas
r36 r38 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, Spin, UGame;9 ComCtrls, Spin, ExtCtrls, UGame; 10 10 11 11 type … … 20 20 ButtonPlayerModify: TButton; 21 21 CheckBoxVoid: TCheckBox; 22 CheckBoxCity: TCheckBox; 22 23 Label1: TLabel; 23 24 Label2: TLabel; 24 25 Label3: TLabel; 26 Label4: TLabel; 25 27 ListView1: TListView; 28 RadioGroupGrowCells: TRadioGroup; 29 RadioGroupGrowAmount: TRadioGroup; 26 30 SpinEditVoidPercent: TSpinEdit; 27 31 SpinEditMapSizeX: TSpinEdit; 28 32 SpinEditMapSizeY: TSpinEdit; 33 SpinEditCityPercent: TSpinEdit; 29 34 TrackBarSizeX: TTrackBar; 30 35 TrackBarSizeY: TTrackBar; … … 33 38 procedure ButtonPlayerModifyClick(Sender: TObject); 34 39 procedure ButtonPlayerRemoveClick(Sender: TObject); 40 procedure CheckBoxCityChange(Sender: TObject); 35 41 procedure CheckBoxVoidChange(Sender: TObject); 36 42 procedure FormCreate(Sender: TObject); … … 128 134 end; 129 135 136 procedure TFormNew.CheckBoxCityChange(Sender: TObject); 137 begin 138 SpinEditCityPercent.Enabled := CheckBoxCity.Checked; 139 end; 140 130 141 procedure TFormNew.CheckBoxVoidChange(Sender: TObject); 131 142 begin … … 177 188 TPlayer(Players[I]).Assign(TPlayer(Game.Players[I])); 178 189 end; 190 CheckBoxCity.Checked := Game.CityEnabled; 191 SpinEditCityPercent.Value := Game.CityPercentage; 179 192 SpinEditMapSizeX.Value := Game.Map.Size.X; 180 193 SpinEditMapSizeY.Value := Game.Map.Size.Y; 194 RadioGroupGrowAmount.ItemIndex := Integer(Game.GrowAmount); 195 RadioGroupGrowCells.ItemIndex := Integer(Game.GrowCells); 181 196 end; 182 197 … … 195 210 Game.VoidEnabled := CheckBoxVoid.Checked; 196 211 Game.VoidPercentage := SpinEditVoidPercent.Value; 212 Game.CityEnabled := CheckBoxCity.Checked; 213 Game.CityPercentage := SpinEditCityPercent.Value; 197 214 Game.Map.Size := Point(SpinEditMapSizeX.Value, SpinEditMapSizeY.Value); 215 Game.GrowAmount := TGrowAmount(RadioGroupGrowAmount.ItemIndex); 216 Game.GrowCells := TGrowCells(RadioGroupGrowCells.ItemIndex); 198 217 end; 199 218
Note:
See TracChangeset
for help on using the changeset viewer.