Changeset 75
- Timestamp:
- Oct 4, 2014, 11:33:16 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 8 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 -
trunk/Languages/xtactics.cs.po
r74 r75 195 195 196 196 #: tformnew.aplayeradd.caption 197 msgid "Add player" 197 #, fuzzy 198 #| msgid "Add player" 199 msgid "Add" 198 200 msgstr "Přidat hráče" 199 201 … … 203 205 204 206 #: tformnew.aplayerremove.caption 205 msgid "Remove player" 207 #, fuzzy 208 #| msgid "Remove player" 209 msgid "Remove" 206 210 msgstr "Odstranit hráče" 207 211 … … 211 215 msgstr "Zrušit" 212 216 217 #: tformnew.buttonimagebrowse.caption 218 msgctxt "tformnew.buttonimagebrowse.caption" 219 msgid "Browse" 220 msgstr "" 221 213 222 #: tformnew.buttonok.caption 214 223 msgctxt "tformnew.buttonok.caption" … … 216 225 msgstr "Ok" 217 226 218 #: tformnew.buttonplayeradd.caption219 msgid "Add"220 msgstr "Přidat"221 222 227 #: tformnew.buttonplayermodify.caption 223 228 msgid "Modify" 224 229 msgstr "Upravit" 225 226 #: tformnew.buttonplayerremove.caption227 msgid "Remove"228 msgstr "Odebrat"229 230 230 231 #: tformnew.caption … … 277 278 msgstr "Nejvíce náhodných neutrálních jednotek:" 278 279 280 #: tformnew.label8.caption 281 msgid "Map shape:" 282 msgstr "" 283 284 #: tformnew.label9.caption 285 msgid "Image file:" 286 msgstr "" 287 279 288 #: tformnew.listview1.columns[0].caption 280 289 msgid "Name" … … 300 309 msgid "Growing cells" 301 310 msgstr "Rostoucí buňky:" 311 312 #: tformnew.tabsheet1.caption 313 msgid "Players" 314 msgstr "" 315 316 #: tformnew.tabsheet2.caption 317 msgid "Map" 318 msgstr "" 319 320 #: tformnew.tabsheet3.caption 321 msgid "Rules" 322 msgstr "" 302 323 303 324 #: tformplayer.buttoncancel.caption … … 414 435 msgstr "tah" 415 436 437 #: uformnew.sfromimagefile 438 msgid "From image file" 439 msgstr "" 440 416 441 #: uformnew.sgridtypehexagon 417 442 msgid "Hexagonal" … … 449 474 msgid "Player cities" 450 475 msgstr "Města hráče" 476 477 #: uformnew.srectangular 478 msgid "Rectangular" 479 msgstr "" 451 480 452 481 #: uformnew.swinobjectivecaptureposition -
trunk/Languages/xtactics.po
r74 r75 185 185 186 186 #: tformnew.aplayeradd.caption 187 msgid "Add player"187 msgid "Add" 188 188 msgstr "" 189 189 … … 193 193 194 194 #: tformnew.aplayerremove.caption 195 msgid "Remove player"195 msgid "Remove" 196 196 msgstr "" 197 197 … … 201 201 msgstr "" 202 202 203 #: tformnew.buttonimagebrowse.caption 204 msgctxt "TFORMNEW.BUTTONIMAGEBROWSE.CAPTION" 205 msgid "Browse" 206 msgstr "" 207 203 208 #: tformnew.buttonok.caption 204 209 msgctxt "TFORMNEW.BUTTONOK.CAPTION" … … 206 211 msgstr "" 207 212 208 #: tformnew.buttonplayeradd.caption209 msgid "Add"210 msgstr ""211 212 213 #: tformnew.buttonplayermodify.caption 213 214 msgid "Modify" 214 msgstr ""215 216 #: tformnew.buttonplayerremove.caption217 msgid "Remove"218 215 msgstr "" 219 216 … … 265 262 msgstr "" 266 263 264 #: tformnew.label8.caption 265 msgid "Map shape:" 266 msgstr "" 267 268 #: tformnew.label9.caption 269 msgid "Image file:" 270 msgstr "" 271 267 272 #: tformnew.listview1.columns[0].caption 268 273 msgid "Name" … … 287 292 #: tformnew.radiogroupgrowcells.caption 288 293 msgid "Growing cells" 294 msgstr "" 295 296 #: tformnew.tabsheet1.caption 297 msgid "Players" 298 msgstr "" 299 300 #: tformnew.tabsheet2.caption 301 msgid "Map" 302 msgstr "" 303 304 #: tformnew.tabsheet3.caption 305 msgid "Rules" 289 306 msgstr "" 290 307 … … 402 419 msgstr "" 403 420 421 #: uformnew.sfromimagefile 422 msgid "From image file" 423 msgstr "" 424 404 425 #: uformnew.sgridtypehexagon 405 426 msgid "Hexagonal" … … 436 457 #: uformnew.sgrowplayercities 437 458 msgid "Player cities" 459 msgstr "" 460 461 #: uformnew.srectangular 462 msgid "Rectangular" 438 463 msgstr "" 439 464 -
trunk/UGame.pas
r74 r75 7 7 uses 8 8 Classes, SysUtils, ExtCtrls, Graphics, Contnrs, XMLConf, XMLRead, XMLWrite, 9 DOM, Math, FileUtil, UXMLUtils ;9 DOM, Math, FileUtil, UXMLUtils, Dialogs; 10 10 11 11 const … … 91 91 end; 92 92 93 TMapShape = (msRectangle, msImage); 94 93 95 { TMap } 94 96 … … 107 109 DefaultCellSize: TPoint; 108 110 Cells: TObjectList; // TList<TCell> 111 Shape: TMapShape; 112 Image: TImage; 113 function IsOutsideShape(Coord: TPoint): Boolean; virtual; 109 114 function IsCellsNeighbor(Cell1, Cell2: TCell): Boolean; virtual; 110 115 function IsValidIndex(Index: TPoint): Boolean; virtual; … … 266 271 FOnWin: TWinEvent; 267 272 FRunning: Boolean; 273 LoadedImageFileName: string; 268 274 procedure Attack(var AttackPower, DefendPower: Integer); 269 275 procedure MoveAll(Player: TPlayer); … … 277 283 Players: TPlayers; 278 284 Map: TMap; 285 MapImageFileName: string; 279 286 VoidEnabled: Boolean; 280 287 VoidPercentage: Integer; … … 596 603 end; 597 604 605 function TMap.IsOutsideShape(Coord: TPoint): Boolean; 606 var 607 Rect: TRect; 608 Color: TColor; 609 Pos: TPoint; 610 begin 611 case Shape of 612 msRectangle: Result := False; 613 msImage: begin 614 Rect := GetPixelRect; 615 with Image.Picture.Bitmap do begin 616 Pos := Point(Trunc(Coord.X / (Rect.Right - Rect.Left) * Width), 617 Trunc(Coord.Y / (Rect.Bottom - Rect.Top) * Height)); 618 Color := Canvas.Pixels[Pos.X, Pos.Y]; 619 end; 620 Result := Color <> clWhite; 621 end; 622 else Result := False; 623 end; 624 end; 625 598 626 procedure TMap.DrawArrow(Canvas: TCanvas; View: TView; Pos: TPoint; 599 627 Angle: Double; Text: string); … … 655 683 Size := Source.Size; 656 684 DefaultCellSize := Source.DefaultCellSize; 685 Shape := Source.Shape; 657 686 //FSize := Source.Size; 658 687 … … 683 712 DefaultCellSize.Y := ReadInteger(Node, 'DefaultCellSizeY', 1); 684 713 MaxPower := ReadInteger(Node, 'MaxPower', 99); 714 Shape := TMapShape(ReadInteger(Node, 'Shape', Integer(msRectangle))); 685 715 end; 686 716 … … 694 724 WriteInteger(Node, 'DefaultCellSizeY', DefaultCellSize.Y); 695 725 WriteInteger(Node, 'MaxPower', MaxPower); 726 WriteInteger(Node, 'Shape', Integer(Shape)); 696 727 NewNode := Node.OwnerDocument.CreateElement('Cells'); 697 728 Node.AppendChild(NewNode); … … 828 859 Cells := TObjectList.create; 829 860 Size := Point(0, 0); 861 Image := TImage.Create(nil); 830 862 end; 831 863 832 864 destructor TMap.Destroy; 833 865 begin 866 Image.Free; 834 867 Size := Point(0, 0); 835 868 FreeAndNil(Cells); … … 1691 1724 with Config do begin 1692 1725 SetValue(Path + '/GridType', Integer(MapType)); 1726 SetValue(Path + '/MapImage', MapImageFileName); 1693 1727 SetValue(Path + '/SymetricMap', SymetricMap); 1694 1728 SetValue(Path + '/VoidEnabled', VoidEnabled); … … 1696 1730 SetValue(Path + '/MapSizeX', Map.Size.X); 1697 1731 SetValue(Path + '/MapSizeY', Map.Size.Y); 1732 SetValue(Path + '/MapShape', Integer(Map.Shape)); 1698 1733 SetValue(Path + '/CityEnabled', CityEnabled); 1699 1734 SetValue(Path + '/CityPercentage', CityPercentage); … … 1710 1745 with Config do begin 1711 1746 MapType := TMapType(GetValue(Path + '/GridType', Integer(mtHexagon))); 1747 MapImageFileName := GetValue(Path + '/MapImage', MapImageFileName); 1712 1748 SymetricMap := GetValue(Path + '/SymetricMap', False); 1713 1749 VoidEnabled := GetValue(Path + '/VoidEnabled', True); … … 1715 1751 Map.Size := Point(GetValue(Path + '/MapSizeX', 10), 1716 1752 GetValue(Path + '/MapSizeY', 10)); 1753 Map.Shape := TMapShape(GetValue(Path + '/MapShape', 0)); 1717 1754 CityEnabled := GetValue(Path + '/CityEnabled', False); 1718 1755 CityPercentage := GetValue(Path + '/CityPercentage', 10); … … 1911 1948 Players := TPlayers.Create; 1912 1949 1950 MapImageFileName := 'Images/Maps/WorldMap.png'; 1951 1913 1952 Randomize; 1914 1953 … … 1952 1991 TurnCounter := 1; 1953 1992 Moves.Clear; 1993 if (Map.Shape = msImage) and FileExists(MapImageFileName) and 1994 (LoadedImageFileName <> MapImageFileName) then begin 1995 LoadedImageFileName := MapImageFileName; 1996 Map.Image.Picture.LoadFromFile(MapImageFileName); 1997 end; 1954 1998 AllCells := Map.GetAllCells; 1955 1999 for C := 0 to Length(AllCells) - 1 do 1956 2000 with AllCells[C] do begin 1957 if VoidEnabled and (Random < VoidPercentage / 100) then Terrain := ttVoid 2001 if (VoidEnabled and (Random < VoidPercentage / 100)) or 2002 (Map.IsOutsideShape(PosPx)) then Terrain := ttVoid 1958 2003 else begin 1959 2004 if CityEnabled and (Random < CityPercentage / 100) then Terrain := ttCity … … 1980 2025 StartCell := nil; 1981 2026 Counter := 0; 1982 while not Assigned(StartCell) or Assigned(StartCell.Player) do begin 2027 while not Assigned(StartCell) or Assigned(StartCell.Player) or 2028 (StartCell.Terrain = ttVoid) do begin 1983 2029 StartCell := AllCells[Random(Length(AllCells))]; 1984 2030 Inc(Counter); -
trunk/xtactics.lpi
r74 r75 135 135 <HasResources Value="True"/> 136 136 <ResourceBaseClass Value="Form"/> 137 <UnitName Value="UFormMove"/> 137 138 </Unit6> 138 139 <Unit7>
Note:
See TracChangeset
for help on using the changeset viewer.