Changeset 75 for trunk/Forms
- Timestamp:
- Oct 4, 2014, 11:33:16 PM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMove.lfm
r72 r75 3 3 Height = 257 4 4 Top = 165 5 Width = 3 205 Width = 367 6 6 ActiveControl = ButtonOk 7 7 Caption = 'Move' 8 8 ClientHeight = 257 9 ClientWidth = 3 209 ClientWidth = 367 10 10 OnCreate = FormCreate 11 11 OnKeyPress = FormKeyPress … … 14 14 object SpinEditOnce: TSpinEdit 15 15 Left = 208 16 Height = 3 217 Top = 3216 Height = 35 17 Top = 40 18 18 Width = 98 19 19 OnChange = SpinEditOnceChange … … 22 22 end 23 23 object Label1: TLabel 24 Left = 2425 Height = 2 226 Top = 3227 Width = 4624 Left = 16 25 Height = 25 26 Top = 40 27 Width = 54 28 28 Caption = 'Once:' 29 29 ParentColor = False … … 50 50 object Label2: TLabel 51 51 Left = 24 52 Height = 2 252 Height = 25 53 53 Top = 136 54 Width = 8754 Width = 100 55 55 Caption = 'Every turn:' 56 56 ParentColor = False … … 58 58 object SpinEditRepeat: TSpinEdit 59 59 Left = 208 60 Height = 3 260 Height = 35 61 61 Top = 128 62 62 Width = 98 … … 67 67 object TrackBarOnce: TTrackBar 68 68 Left = 56 69 Height = 4 370 Top = 7171 Width = 2 0869 Height = 46 70 Top = 80 71 Width = 255 72 72 OnChange = TrackBarOnceChange 73 73 PageSize = 1 … … 80 80 object TrackBarRepeat: TTrackBar 81 81 Left = 56 82 Height = 4 382 Height = 46 83 83 Top = 168 84 Width = 2 0884 Width = 255 85 85 OnChange = TrackBarRepeatChange 86 86 PageSize = 1 … … 94 94 Left = 8 95 95 Height = 25 96 Top = 8 096 Top = 88 97 97 Width = 48 98 98 Caption = 'Min' … … 101 101 end 102 102 object ButtonOnceMax: TButton 103 Left = 264103 Left = 311 104 104 Height = 25 105 Top = 8 0105 Top = 88 106 106 Width = 48 107 107 Anchors = [akTop, akRight] … … 120 120 end 121 121 object ButtonRepeatMax: TButton 122 Left = 264122 Left = 311 123 123 Height = 25 124 124 Top = 176 … … 131 131 object Label3: TLabel 132 132 Left = 16 133 Height = 2 2133 Height = 25 134 134 Top = 8 135 Width = 1 27135 Width = 145 136 136 Caption = 'Win probability:' 137 137 ParentColor = False 138 138 end 139 139 object LabelWinProbability: TLabel 140 Left = 2 32141 Height = 2 2140 Left = 264 141 Height = 25 142 142 Top = 8 143 143 Width = 15 -
trunk/Forms/UFormNew.lfm
r74 r75 1 1 object FormNew: TFormNew 2 Left = 4403 Height = 6144 Top = 1785 Width = 7 162 Left = 987 3 Height = 528 4 Top = 500 5 Width = 745 6 6 Caption = 'New game' 7 ClientHeight = 6148 ClientWidth = 7 167 ClientHeight = 528 8 ClientWidth = 745 9 9 OnCreate = FormCreate 10 10 OnDestroy = FormDestroy 11 11 OnShow = FormShow 12 12 LCLVersion = '1.3' 13 object Panel1: TPanel14 Left = 015 Height = 17016 Top = 017 Width = 71618 Align = alTop19 BevelOuter = bvNone20 ClientHeight = 17021 ClientWidth = 71622 TabOrder = 023 object ListView1: TListView24 Left = 1625 Height = 15026 Top = 827 Width = 59428 Anchors = [akTop, akLeft, akRight, akBottom]29 Columns = <30 item31 Caption = 'Name'32 Width = 20033 end34 item35 Caption = 'Type'36 Width = 10037 end38 item39 Caption = 'Color'40 Width = 10041 end42 item43 Caption = 'Start units'44 Width = 17745 end>46 OwnerData = True47 ReadOnly = True48 RowSelect = True49 TabOrder = 050 ViewStyle = vsReport51 OnCustomDrawSubItem = ListView1CustomDrawSubItem52 OnData = ListView1Data53 OnDblClick = ListView1DblClick54 OnKeyPress = ListView1KeyPress55 OnKeyUp = ListView1KeyUp56 OnSelectItem = ListView1SelectItem57 end58 object ButtonPlayerAdd: TButton59 Left = 61660 Height = 2561 Top = 862 Width = 8363 Action = APlayerAdd64 Anchors = [akTop, akLeft, akRight]65 Caption = 'Add'66 TabOrder = 167 end68 object ButtonPlayerRemove: TButton69 Left = 61670 Height = 2571 Top = 4072 Width = 8373 Action = APlayerRemove74 Anchors = [akTop, akRight]75 Caption = 'Remove'76 TabOrder = 277 end78 object ButtonPlayerModify: TButton79 Left = 61680 Height = 2581 Top = 7282 Width = 8383 Action = APlayerModify84 Anchors = [akTop, akRight]85 Caption = 'Modify'86 TabOrder = 387 end88 end89 13 object Splitter1: TSplitter 90 14 Cursor = crVSplit 91 15 Left = 0 92 16 Height = 5 93 Top = 17094 Width = 7 1617 Top = 0 18 Width = 745 95 19 Align = alTop 96 20 ResizeAnchor = akTop 97 21 end 98 object Panel2: TPanel 22 object ButtonCancel: TButton 23 Left = 522 24 Height = 25 25 Top = 486 26 Width = 75 27 Anchors = [akBottom] 28 Caption = 'Cancel' 29 ModalResult = 2 30 TabOrder = 1 31 end 32 object ButtonOk: TButton 33 Left = 626 34 Height = 25 35 Top = 486 36 Width = 75 37 Anchors = [akRight, akBottom] 38 Caption = 'Ok' 39 ModalResult = 1 40 TabOrder = 2 41 end 42 object PageControl1: TPageControl 99 43 Left = 0 100 Height = 439 101 Top = 175 102 Width = 716 103 Align = alClient 104 BevelOuter = bvNone 105 ClientHeight = 439 106 ClientWidth = 716 107 TabOrder = 2 108 object ButtonOk: TButton 109 Left = 624 110 Height = 25 111 Top = 392 112 Width = 75 113 Anchors = [akRight, akBottom] 114 Caption = 'Ok' 115 ModalResult = 1 116 TabOrder = 0 117 end 118 object ButtonCancel: TButton 119 Left = 535 120 Height = 25 121 Top = 392 122 Width = 75 123 Anchors = [akBottom] 124 Caption = 'Cancel' 125 ModalResult = 2 126 TabOrder = 1 127 end 128 object CheckBoxVoid: TCheckBox 129 Left = 8 130 Height = 27 131 Top = 101 132 Width = 198 133 Caption = 'Inaccessible places' 134 OnChange = CheckBoxVoidChange 135 TabOrder = 2 136 end 137 object Label1: TLabel 138 Left = 8 139 Height = 25 140 Top = 9 141 Width = 104 142 Caption = 'Map width:' 143 ParentColor = False 144 end 145 object SpinEditMapSizeX: TSpinEdit 146 Left = 128 147 Height = 35 148 Top = 4 149 Width = 98 150 MinValue = 2 151 OnChange = SpinEditMapSizeXChange 152 TabOrder = 3 153 Value = 2 154 end 155 object SpinEditMapSizeY: TSpinEdit 156 Left = 128 157 Height = 35 158 Top = 55 159 Width = 98 160 MinValue = 2 161 OnChange = SpinEditMapSizeYChange 162 TabOrder = 4 163 Value = 2 164 end 165 object SpinEditVoidPercent: TSpinEdit 166 Left = 216 167 Height = 35 168 Top = 97 169 Width = 106 170 MinValue = 1 171 TabOrder = 5 172 Value = 1 173 end 174 object Label3: TLabel 175 Left = 331 176 Height = 25 177 Top = 102 178 Width = 17 179 Caption = '%' 180 ParentColor = False 181 end 182 object TrackBarSizeX: TTrackBar 183 Left = 240 184 Height = 46 185 Top = 1 186 Width = 451 187 Max = 100 188 Min = 2 189 OnChange = TrackBarSizeXChange 190 Position = 2 191 TickStyle = tsNone 192 Anchors = [akTop, akLeft, akRight] 193 TabOrder = 6 194 end 195 object TrackBarSizeY: TTrackBar 196 Left = 240 197 Height = 46 198 Top = 49 199 Width = 451 200 Max = 100 201 Min = 2 202 OnChange = TrackBarSizeYChange 203 Position = 2 204 TickStyle = tsNone 205 Anchors = [akTop, akLeft, akRight] 206 TabOrder = 7 207 end 208 object Label2: TLabel 209 Left = 8 210 Height = 25 211 Top = 57 212 Width = 110 213 Caption = 'Map height:' 214 ParentColor = False 215 end 216 object CheckBoxCity: TCheckBox 217 Left = 8 218 Height = 27 219 Top = 141 220 Width = 73 221 Caption = 'Cities' 222 OnChange = CheckBoxCityChange 223 TabOrder = 8 224 end 225 object SpinEditCityPercent: TSpinEdit 226 Left = 216 227 Height = 35 228 Top = 137 229 Width = 106 230 MinValue = 1 231 TabOrder = 9 232 Value = 1 233 end 234 object Label4: TLabel 235 Left = 331 236 Height = 25 237 Top = 142 238 Width = 17 239 Caption = '%' 240 ParentColor = False 241 end 242 object RadioGroupGrowAmount: TRadioGroup 243 Left = 376 244 Height = 76 245 Top = 97 246 Width = 305 247 AutoFill = True 248 Caption = 'Per turn grow amount' 249 ChildSizing.LeftRightSpacing = 6 250 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize 251 ChildSizing.EnlargeVertical = crsHomogenousChildResize 252 ChildSizing.ShrinkHorizontal = crsScaleChilds 253 ChildSizing.ShrinkVertical = crsScaleChilds 254 ChildSizing.Layout = cclLeftToRightThenTopToBottom 255 ChildSizing.ControlsPerLine = 1 256 ClientHeight = 49 257 ClientWidth = 301 258 Items.Strings = ( 259 'By one' 260 'By square root' 261 ) 262 TabOrder = 10 263 end 264 object RadioGroupGrowCells: TRadioGroup 265 Left = 8 266 Height = 105 267 Top = 184 268 Width = 312 269 AutoFill = True 270 Caption = 'Growing cells' 271 ChildSizing.LeftRightSpacing = 6 272 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize 273 ChildSizing.EnlargeVertical = crsHomogenousChildResize 274 ChildSizing.ShrinkHorizontal = crsScaleChilds 275 ChildSizing.ShrinkVertical = crsScaleChilds 276 ChildSizing.Layout = cclLeftToRightThenTopToBottom 277 ChildSizing.ControlsPerLine = 1 278 ClientHeight = 78 279 ClientWidth = 308 280 Items.Strings = ( 281 'None' 282 'Player cities' 283 'Player all' 284 ) 285 TabOrder = 11 286 end 287 object ComboBoxGridType: TComboBox 288 Left = 473 289 Height = 37 290 Top = 201 291 Width = 208 292 ItemHeight = 0 293 Items.Strings = ( 294 'Hexagonal' 295 'Square' 296 'Triangular' 297 ) 298 Style = csDropDownList 299 TabOrder = 12 300 end 301 object Label5: TLabel 302 Left = 336 303 Height = 25 304 Top = 201 305 Width = 90 306 Caption = 'Grid type:' 307 ParentColor = False 308 end 309 object Label6: TLabel 310 Left = 8 311 Height = 25 312 Top = 313 313 Width = 129 314 Caption = 'Win objective:' 315 ParentColor = False 316 end 317 object ComboBoxWinObjective: TComboBox 318 Left = 232 319 Height = 37 320 Top = 305 321 Width = 328 322 ItemHeight = 0 323 Items.Strings = ( 324 'Defeat all oponents' 325 'Defeat all oponents cities' 326 'Capture position' 327 'Stay alive for number of turns' 328 ) 329 Style = csDropDownList 330 TabOrder = 13 331 end 332 object Label7: TLabel 333 Left = 8 334 Height = 25 335 Top = 348 336 Width = 245 337 Caption = 'Max random neutral units:' 338 ParentColor = False 339 end 340 object SpinEditNeutralUnits: TSpinEdit 341 Left = 384 342 Height = 35 343 Top = 344 344 Width = 98 345 MaxValue = 99 346 OnChange = SpinEditMapSizeYChange 347 TabOrder = 14 348 Value = 12 349 end 350 object CheckBoxSymetricMap: TCheckBox 351 Left = 334 352 Height = 27 353 Top = 238 354 Width = 151 355 Caption = 'Symetric map' 356 TabOrder = 15 44 Height = 465 45 Top = 5 46 Width = 745 47 ActivePage = TabSheet1 48 Align = alTop 49 Anchors = [akTop, akLeft, akRight, akBottom] 50 TabIndex = 0 51 TabOrder = 3 52 object TabSheet1: TTabSheet 53 Caption = 'Players' 54 ClientHeight = 422 55 ClientWidth = 739 56 object ListView1: TListView 57 Left = 8 58 Height = 368 59 Top = 8 60 Width = 713 61 Anchors = [akTop, akLeft, akRight, akBottom] 62 Columns = < 63 item 64 Caption = 'Name' 65 Width = 200 66 end 67 item 68 Caption = 'Type' 69 Width = 100 70 end 71 item 72 Caption = 'Color' 73 Width = 100 74 end 75 item 76 Caption = 'Start units' 77 Width = 296 78 end> 79 OwnerData = True 80 PopupMenu = PopupMenu1 81 ReadOnly = True 82 RowSelect = True 83 TabOrder = 0 84 ViewStyle = vsReport 85 OnCustomDrawSubItem = ListView1CustomDrawSubItem 86 OnData = ListView1Data 87 OnDblClick = ListView1DblClick 88 OnKeyPress = ListView1KeyPress 89 OnKeyUp = ListView1KeyUp 90 OnSelectItem = ListView1SelectItem 91 end 92 object ButtonPlayerRemove: TButton 93 Left = 240 94 Height = 25 95 Top = 384 96 Width = 83 97 Action = APlayerRemove 98 Anchors = [akRight, akBottom] 99 TabOrder = 1 100 end 101 object ButtonPlayerAdd: TButton 102 Left = 32 103 Height = 25 104 Top = 384 105 Width = 83 106 Action = APlayerAdd 107 Anchors = [akRight, akBottom] 108 TabOrder = 2 109 end 110 object ButtonPlayerModify: TButton 111 Left = 136 112 Height = 25 113 Top = 384 114 Width = 83 115 Action = APlayerModify 116 Anchors = [akRight, akBottom] 117 Caption = 'Modify' 118 TabOrder = 3 119 end 120 end 121 object TabSheet2: TTabSheet 122 Caption = 'Map' 123 ClientHeight = 422 124 ClientWidth = 739 125 object Label1: TLabel 126 Left = 8 127 Height = 25 128 Top = 9 129 Width = 104 130 Caption = 'Map width:' 131 ParentColor = False 132 end 133 object Label2: TLabel 134 Left = 8 135 Height = 25 136 Top = 57 137 Width = 110 138 Caption = 'Map height:' 139 ParentColor = False 140 end 141 object SpinEditMapSizeX: TSpinEdit 142 Left = 128 143 Height = 35 144 Top = 4 145 Width = 98 146 MinValue = 2 147 OnChange = SpinEditMapSizeXChange 148 TabOrder = 0 149 Value = 2 150 end 151 object SpinEditMapSizeY: TSpinEdit 152 Left = 128 153 Height = 35 154 Top = 55 155 Width = 98 156 MinValue = 2 157 OnChange = SpinEditMapSizeYChange 158 TabOrder = 1 159 Value = 2 160 end 161 object TrackBarSizeX: TTrackBar 162 Left = 240 163 Height = 46 164 Top = 8 165 Width = 488 166 Max = 100 167 Min = 2 168 OnChange = TrackBarSizeXChange 169 Position = 2 170 TickStyle = tsNone 171 Anchors = [akTop, akLeft, akRight] 172 TabOrder = 2 173 end 174 object TrackBarSizeY: TTrackBar 175 Left = 240 176 Height = 46 177 Top = 49 178 Width = 488 179 Max = 100 180 Min = 2 181 OnChange = TrackBarSizeYChange 182 Position = 2 183 TickStyle = tsNone 184 Anchors = [akTop, akLeft, akRight] 185 TabOrder = 3 186 end 187 object Label5: TLabel 188 Left = 8 189 Height = 25 190 Top = 104 191 Width = 90 192 Caption = 'Grid type:' 193 ParentColor = False 194 end 195 object ComboBoxGridType: TComboBox 196 Left = 146 197 Height = 33 198 Top = 104 199 Width = 208 200 ItemHeight = 0 201 Items.Strings = ( 202 'Hexagonal' 203 'Square' 204 'Triangular' 205 ) 206 Style = csDropDownList 207 TabOrder = 4 208 end 209 object ComboBoxMapShape: TComboBox 210 Left = 146 211 Height = 33 212 Top = 144 213 Width = 208 214 ItemHeight = 0 215 Items.Strings = ( 216 'Hexagonal' 217 'Square' 218 'Triangular' 219 ) 220 OnChange = ComboBoxMapShapeChange 221 Style = csDropDownList 222 TabOrder = 5 223 end 224 object Label8: TLabel 225 Left = 8 226 Height = 25 227 Top = 144 228 Width = 107 229 Caption = 'Map shape:' 230 ParentColor = False 231 end 232 object CheckBoxSymetricMap: TCheckBox 233 Left = 472 234 Height = 27 235 Top = 110 236 Width = 151 237 Caption = 'Symetric map' 238 TabOrder = 6 239 end 240 object SpinEditVoidPercent: TSpinEdit 241 Left = 216 242 Height = 35 243 Top = 224 244 Width = 106 245 MinValue = 1 246 TabOrder = 7 247 Value = 1 248 end 249 object CheckBoxVoid: TCheckBox 250 Left = 8 251 Height = 27 252 Top = 232 253 Width = 198 254 Caption = 'Inaccessible places' 255 OnChange = CheckBoxVoidChange 256 TabOrder = 8 257 end 258 object CheckBoxCity: TCheckBox 259 Left = 8 260 Height = 27 261 Top = 272 262 Width = 73 263 Caption = 'Cities' 264 OnChange = CheckBoxCityChange 265 TabOrder = 9 266 end 267 object SpinEditCityPercent: TSpinEdit 268 Left = 216 269 Height = 35 270 Top = 272 271 Width = 106 272 MinValue = 1 273 TabOrder = 10 274 Value = 1 275 end 276 object Label4: TLabel 277 Left = 331 278 Height = 25 279 Top = 272 280 Width = 17 281 Caption = '%' 282 ParentColor = False 283 end 284 object Label3: TLabel 285 Left = 331 286 Height = 25 287 Top = 232 288 Width = 17 289 Caption = '%' 290 ParentColor = False 291 end 292 object SpinEditNeutralUnits: TSpinEdit 293 Left = 408 294 Height = 35 295 Top = 352 296 Width = 98 297 MaxValue = 99 298 OnChange = SpinEditMapSizeYChange 299 TabOrder = 11 300 Value = 12 301 end 302 object Label7: TLabel 303 Left = 8 304 Height = 25 305 Top = 352 306 Width = 245 307 Caption = 'Max random neutral units:' 308 ParentColor = False 309 end 310 object EditImageFile: TEdit 311 Left = 144 312 Height = 35 313 Top = 184 314 Width = 472 315 Anchors = [akTop, akLeft, akRight] 316 TabOrder = 12 317 end 318 object ButtonImageBrowse: TButton 319 Left = 624 320 Height = 25 321 Top = 192 322 Width = 99 323 Anchors = [akTop, akRight] 324 Caption = 'Browse' 325 OnClick = ButtonImageBrowseClick 326 TabOrder = 13 327 end 328 object Label9: TLabel 329 Left = 8 330 Height = 25 331 Top = 184 332 Width = 98 333 Caption = 'Image file:' 334 ParentColor = False 335 end 336 end 337 object TabSheet3: TTabSheet 338 Caption = 'Rules' 339 ClientHeight = 422 340 ClientWidth = 739 341 object RadioGroupGrowCells: TRadioGroup 342 Left = 8 343 Height = 105 344 Top = 104 345 Width = 312 346 AutoFill = True 347 Caption = 'Growing cells' 348 ChildSizing.LeftRightSpacing = 6 349 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize 350 ChildSizing.EnlargeVertical = crsHomogenousChildResize 351 ChildSizing.ShrinkHorizontal = crsScaleChilds 352 ChildSizing.ShrinkVertical = crsScaleChilds 353 ChildSizing.Layout = cclLeftToRightThenTopToBottom 354 ChildSizing.ControlsPerLine = 1 355 ClientHeight = 78 356 ClientWidth = 308 357 Items.Strings = ( 358 'None' 359 'Player cities' 360 'Player all' 361 ) 362 TabOrder = 0 363 end 364 object Label6: TLabel 365 Left = 8 366 Height = 25 367 Top = 248 368 Width = 129 369 Caption = 'Win objective:' 370 ParentColor = False 371 end 372 object ComboBoxWinObjective: TComboBox 373 Left = 232 374 Height = 37 375 Top = 240 376 Width = 328 377 ItemHeight = 0 378 Items.Strings = ( 379 'Defeat all oponents' 380 'Defeat all oponents cities' 381 'Capture position' 382 'Stay alive for number of turns' 383 ) 384 Style = csDropDownList 385 TabOrder = 1 386 end 387 object RadioGroupGrowAmount: TRadioGroup 388 Left = 15 389 Height = 76 390 Top = 16 391 Width = 305 392 AutoFill = True 393 Caption = 'Per turn grow amount' 394 ChildSizing.LeftRightSpacing = 6 395 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize 396 ChildSizing.EnlargeVertical = crsHomogenousChildResize 397 ChildSizing.ShrinkHorizontal = crsScaleChilds 398 ChildSizing.ShrinkVertical = crsScaleChilds 399 ChildSizing.Layout = cclLeftToRightThenTopToBottom 400 ChildSizing.ControlsPerLine = 1 401 ClientHeight = 49 402 ClientWidth = 301 403 Items.Strings = ( 404 'By one' 405 'By square root' 406 ) 407 TabOrder = 2 408 end 357 409 end 358 410 end 359 411 object ActionList1: TActionList 360 412 Images = Core.ImageListSmall 361 left = 2 24362 top = 64413 left = 256 414 top = 440 363 415 object APlayerModify: TAction 364 416 Caption = 'Modify player' … … 366 418 end 367 419 object APlayerAdd: TAction 368 Caption = 'Add player'420 Caption = 'Add' 369 421 OnExecute = APlayerAddExecute 370 422 end 371 423 object APlayerRemove: TAction 372 Caption = 'Remove player'424 Caption = 'Remove' 373 425 OnExecute = APlayerRemoveExecute 374 426 end 375 427 end 428 object OpenPictureDialog1: TOpenPictureDialog 429 left = 616 430 top = 280 431 end 432 object PopupMenu1: TPopupMenu 433 left = 128 434 top = 143 435 object MenuItem1: TMenuItem 436 Action = APlayerAdd 437 end 438 object MenuItem2: TMenuItem 439 Action = APlayerModify 440 Default = True 441 end 442 object MenuItem3: TMenuItem 443 Action = APlayerRemove 444 end 445 end 376 446 end -
trunk/Forms/UFormNew.lrt
r70 r75 1 1 TFORMNEW.CAPTION=New game 2 TFORMNEW.BUTTONCANCEL.CAPTION=Cancel 3 TFORMNEW.BUTTONOK.CAPTION=Ok 4 TFORMNEW.TABSHEET1.CAPTION=Players 2 5 TFORMNEW.LISTVIEW1.COLUMNS[0].CAPTION=Name 3 6 TFORMNEW.LISTVIEW1.COLUMNS[1].CAPTION=Type 4 7 TFORMNEW.LISTVIEW1.COLUMNS[2].CAPTION=Color 5 8 TFORMNEW.LISTVIEW1.COLUMNS[3].CAPTION=Start units 6 TFORMNEW.BUTTONPLAYERADD.CAPTION=Add7 TFORMNEW.BUTTONPLAYERREMOVE.CAPTION=Remove8 9 TFORMNEW.BUTTONPLAYERMODIFY.CAPTION=Modify 9 TFORMNEW.BUTTONOK.CAPTION=Ok 10 TFORMNEW.BUTTONCANCEL.CAPTION=Cancel 10 TFORMNEW.TABSHEET2.CAPTION=Map 11 TFORMNEW.LABEL1.CAPTION=Map width: 12 TFORMNEW.LABEL2.CAPTION=Map height: 13 TFORMNEW.LABEL5.CAPTION=Grid type: 14 TFORMNEW.LABEL8.CAPTION=Map shape: 15 TFORMNEW.CHECKBOXSYMETRICMAP.CAPTION=Symetric map 11 16 TFORMNEW.CHECKBOXVOID.CAPTION=Inaccessible places 12 TFORMNEW.LABEL1.CAPTION=Map width:13 TFORMNEW.LABEL3.CAPTION=%14 TFORMNEW.LABEL2.CAPTION=Map height:15 17 TFORMNEW.CHECKBOXCITY.CAPTION=Cities 16 18 TFORMNEW.LABEL4.CAPTION=% 19 TFORMNEW.LABEL3.CAPTION=% 20 TFORMNEW.LABEL7.CAPTION=Max random neutral units: 21 TFORMNEW.BUTTONIMAGEBROWSE.CAPTION=Browse 22 TFORMNEW.LABEL9.CAPTION=Image file: 23 TFORMNEW.TABSHEET3.CAPTION=Rules 24 TFORMNEW.RADIOGROUPGROWCELLS.CAPTION=Growing cells 25 TFORMNEW.LABEL6.CAPTION=Win objective: 17 26 TFORMNEW.RADIOGROUPGROWAMOUNT.CAPTION=Per turn grow amount 18 TFORMNEW.RADIOGROUPGROWCELLS.CAPTION=Growing cells19 TFORMNEW.LABEL5.CAPTION=Grid type:20 TFORMNEW.LABEL6.CAPTION=Win objective:21 TFORMNEW.LABEL7.CAPTION=Max random neutral units:22 TFORMNEW.CHECKBOXSYMETRICMAP.CAPTION=Symetric map23 27 TFORMNEW.APLAYERMODIFY.CAPTION=Modify player 24 TFORMNEW.APLAYERADD.CAPTION=Add player25 TFORMNEW.APLAYERREMOVE.CAPTION=Remove player28 TFORMNEW.APLAYERADD.CAPTION=Add 29 TFORMNEW.APLAYERREMOVE.CAPTION=Remove -
trunk/Forms/UFormNew.pas
r74 r75 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, Spin, ExtCtrls, ActnList, UGame;9 ComCtrls, Spin, ExtCtrls, ActnList, ExtDlgs, Menus, UGame; 10 10 11 11 type … … 18 18 APlayerModify: TAction; 19 19 ActionList1: TActionList; 20 ButtonImageBrowse: TButton; 20 21 ButtonCancel: TButton; 21 22 ButtonOk: TButton; … … 23 24 ButtonPlayerModify: TButton; 24 25 ButtonPlayerRemove: TButton; 26 CheckBoxCity: TCheckBox; 25 27 CheckBoxSymetricMap: TCheckBox; 26 CheckBoxCity: TCheckBox;27 28 CheckBoxVoid: TCheckBox; 28 29 ComboBoxGridType: TComboBox; 30 ComboBoxMapShape: TComboBox; 29 31 ComboBoxWinObjective: TComboBox; 32 EditImageFile: TEdit; 30 33 Label1: TLabel; 31 34 Label2: TLabel; … … 35 38 Label6: TLabel; 36 39 Label7: TLabel; 40 Label8: TLabel; 41 Label9: TLabel; 37 42 ListView1: TListView; 38 Panel1: TPanel; 39 Panel2: TPanel; 43 MenuItem1: TMenuItem; 44 MenuItem2: TMenuItem; 45 MenuItem3: TMenuItem; 46 OpenPictureDialog1: TOpenPictureDialog; 47 PageControl1: TPageControl; 48 PopupMenu1: TPopupMenu; 40 49 RadioGroupGrowAmount: TRadioGroup; 41 50 RadioGroupGrowCells: TRadioGroup; … … 46 55 SpinEditVoidPercent: TSpinEdit; 47 56 Splitter1: TSplitter; 57 TabSheet1: TTabSheet; 58 TabSheet2: TTabSheet; 59 TabSheet3: TTabSheet; 48 60 TrackBarSizeX: TTrackBar; 49 61 TrackBarSizeY: TTrackBar; … … 51 63 procedure APlayerModifyExecute(Sender: TObject); 52 64 procedure APlayerRemoveExecute(Sender: TObject); 65 procedure ButtonImageBrowseClick(Sender: TObject); 53 66 procedure CheckBoxCityChange(Sender: TObject); 54 67 procedure CheckBoxVoidChange(Sender: TObject); 68 procedure ComboBoxMapShapeChange(Sender: TObject); 55 69 procedure FormCreate(Sender: TObject); 56 70 procedure FormDestroy(Sender: TObject); … … 103 117 SGrowAmountByOne = 'By one'; 104 118 SGrowAmountBySquareRoot = 'By square root'; 105 119 SRectangular = 'Rectangular'; 120 SFromImageFile = 'From image file'; 106 121 107 122 { TFormNew } … … 185 200 ItemIndex := LastIndex; 186 201 end; 202 with ComboBoxMapShape do begin 203 LastIndex := ItemIndex; 204 Clear; 205 Items.Add(SRectangular); 206 Items.Add(SFromImageFile); 207 ItemIndex := LastIndex; 208 end; 187 209 with RadioGroupGrowCells do begin 188 210 LastIndex := ItemIndex; … … 209 231 ButtonPlayerAdd.Enabled := Players.Count < MaxPlayerCount; 210 232 APlayerModify.Enabled := Assigned(ListView1.Selected); 233 EditImageFile.Enabled := ComboBoxMapShape.ItemIndex = Integer(msImage); 234 ButtonImageBrowse.Enabled := ComboBoxMapShape.ItemIndex = Integer(msImage); 211 235 Translate; 212 236 end; … … 242 266 begin 243 267 SpinEditVoidPercent.Enabled := CheckBoxVoid.Checked; 268 end; 269 270 procedure TFormNew.ComboBoxMapShapeChange(Sender: TObject); 271 begin 272 ReloadView; 244 273 end; 245 274 … … 260 289 Players.Remove(ListView1.Selected.Data); 261 290 ReloadView; 291 end; 292 end; 293 294 procedure TFormNew.ButtonImageBrowseClick(Sender: TObject); 295 begin 296 OpenPictureDialog1.FileName := EditImageFile.Text; 297 if OpenPictureDialog1.Execute then begin 298 EditImageFile.Text := OpenPictureDialog1.FileName; 262 299 end; 263 300 end; … … 309 346 ComboBoxWinObjective.ItemIndex := Integer(Game.WinObjective); 310 347 SpinEditNeutralUnits.Value := Game.MaxNeutralUnits; 348 ComboBoxMapShape.ItemIndex := Integer(Game.Map.Shape); 349 EditImageFile.Text := Game.MapImageFileName; 311 350 end; 312 351 … … 334 373 Game.WinObjective := TWinObjective(ComboBoxWinObjective.ItemIndex); 335 374 Game.MaxNeutralUnits := SpinEditNeutralUnits.Value; 375 Game.Map.Shape := TMapShape(ComboBoxMapShape.ItemIndex); 376 Game.MapImageFileName := EditImageFile.Text; 336 377 end; 337 378
Note:
See TracChangeset
for help on using the changeset viewer.