From 27cf279503ef6498ec1d0447fd0e86d777126099 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 3 Nov 2024 16:31:04 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Fix=20UfrmLargeScaleCommand=20no?= =?UTF-8?q?t=20compiling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/UfrmLargeScaleCommand.lfm | 620 +++++++++++++++---------------- Client/UfrmLargeScaleCommand.pas | 12 +- 2 files changed, 308 insertions(+), 324 deletions(-) diff --git a/Client/UfrmLargeScaleCommand.lfm b/Client/UfrmLargeScaleCommand.lfm index 5f0d30e..076db93 100644 --- a/Client/UfrmLargeScaleCommand.lfm +++ b/Client/UfrmLargeScaleCommand.lfm @@ -1,21 +1,20 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand Left = 320 - Height = 610 + Height = 488 Top = 195 - Width = 969 + Width = 775 ActiveControl = vstActions Caption = 'Large Scale Commands' - ClientHeight = 610 - ClientWidth = 969 - Constraints.MinHeight = 610 - Constraints.MinWidth = 969 - DesignTimePPI = 120 - Font.Height = -18 + ClientHeight = 488 + ClientWidth = 775 + Constraints.MinHeight = 488 + Constraints.MinWidth = 775 + Font.Height = -14 + ShowInTaskBar = stAlways + LCLVersion = '4.99.0.0' OnCreate = FormCreate OnDestroy = FormDestroy OnShow = FormShow - ShowInTaskBar = stAlways - LCLVersion = '2.2.3.0' object nbActions: TNotebook AnchorSideLeft.Control = vstActions AnchorSideLeft.Side = asrBottom @@ -23,7 +22,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = btnClose - Left = 238 + Left = 190 Height = 547 Top = 0 Width = 731 @@ -45,9 +44,9 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand TabOrder = 0 object pbArea: TPaintBox Left = 0 - Height = 164 + Height = 131 Top = 0 - Width = 164 + Width = 131 OnMouseDown = pbAreaMouseDown OnMouseMove = pbAreaMouseMove OnPaint = pbAreaPaint @@ -58,12 +57,12 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand object rgCMAction: TRadioGroup AnchorSideLeft.Control = pgCopyMove AnchorSideTop.Control = pgCopyMove - Left = 12 - Height = 62 - Top = 12 - Width = 288 + Left = 10 + Height = 50 + Top = 10 + Width = 230 AutoFill = True - BorderSpacing.Around = 12 + BorderSpacing.Around = 10 Caption = 'Action' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -74,7 +73,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 2 ClientHeight = 38 - ClientWidth = 286 + ClientWidth = 218 Columns = 2 ItemIndex = 0 Items.Strings = ( @@ -87,25 +86,24 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = rgCMAction AnchorSideTop.Control = rgCMAction AnchorSideTop.Side = asrBottom - Left = 12 - Height = 126 - Top = 88 - Width = 189 + Left = 10 + Height = 101 + Top = 70 + Width = 151 Caption = 'Offset' - ClientHeight = 102 - ClientWidth = 187 + ClientHeight = 89 + ClientWidth = 139 TabOrder = 1 object Label9: TLabel AnchorSideLeft.Control = gbCMOffset AnchorSideTop.Control = seCMOffsetX AnchorSideTop.Side = asrCenter - Left = 12 + Left = 10 Height = 15 - Top = 18 + Top = 14 Width = 12 - BorderSpacing.Around = 12 + BorderSpacing.Around = 10 Caption = 'X:' - Color = clDefault ParentColor = False Transparent = False end @@ -113,12 +111,11 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = Label9 AnchorSideTop.Control = seCMOffsetY AnchorSideTop.Side = asrCenter - Left = 12 + Left = 10 Height = 15 - Top = 61 + Top = 49 Width = 10 Caption = 'Y:' - Color = clDefault ParentColor = False Transparent = False end @@ -127,14 +124,14 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = gbCMOffset AnchorSideRight.Control = btnGrabOffset - Left = 44 + Left = 35 Height = 20 - Top = 12 + Top = 10 Width = 61 Anchors = [akTop, akLeft, akRight] - BorderSpacing.Top = 6 - BorderSpacing.Bottom = 6 - BorderSpacing.Around = 6 + BorderSpacing.Top = 5 + BorderSpacing.Bottom = 5 + BorderSpacing.Around = 5 TabOrder = 0 end object seCMOffsetY: TSpinEdit @@ -143,12 +140,12 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideTop.Side = asrBottom AnchorSideRight.Control = seCMOffsetX AnchorSideRight.Side = asrBottom - Left = 44 + Left = 35 Height = 20 - Top = 56 + Top = 45 Width = 61 Anchors = [akTop, akLeft, akRight] - BorderSpacing.Bottom = 12 + BorderSpacing.Bottom = 10 TabOrder = 1 end object btnGrabOffset: TSpeedButton @@ -156,13 +153,13 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideTop.Side = asrCenter AnchorSideRight.Control = gbCMOffset AnchorSideRight.Side = asrBottom - Left = 80 - Height = 35 + Left = 87 + Height = 28 Hint = 'Grab coordinates and calculate the offset in relation to the selected area.' - Top = 35 - Width = 35 + Top = 28 + Width = 28 Anchors = [akTop, akRight] - BorderSpacing.Around = 6 + BorderSpacing.Around = 5 Enabled = False Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 @@ -200,20 +197,20 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand FF00FFFFFF00FFFFFF00CBCBCB7EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 } - OnClick = btnGrabOffsetClick ShowHint = True ParentShowHint = False + OnClick = btnGrabOffsetClick end end object cbCMEraseTarget: TCheckBox AnchorSideLeft.Control = gbCMOffset AnchorSideTop.Control = gbCMOffset AnchorSideTop.Side = asrBottom - Left = 12 + Left = 10 Height = 22 - Top = 226 + Top = 181 Width = 189 - BorderSpacing.Top = 12 + BorderSpacing.Top = 10 Caption = 'Erase target area (at offset)' TabOrder = 2 end @@ -223,14 +220,13 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = rbSetTerrainAltitude AnchorSideTop.Control = rbSetTerrainAltitude AnchorSideTop.Side = asrBottom - Left = 48 + Left = 38 Height = 49 - Top = 48 + Top = 38 Width = 162 - BorderSpacing.Left = 35 + BorderSpacing.Left = 28 Caption = 'The statics will be elevated according to the terrain change.' - Color = clDefault - Constraints.MaxWidth = 265 + Constraints.MaxWidth = 212 Enabled = False ParentColor = False Transparent = False @@ -238,13 +234,12 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand end object Label3: TLabel AnchorSideTop.Control = rbSetTerrainAltitude - Left = 356 + Left = 285 Height = 32 - Top = 12 + Top = 10 Width = 209 Caption = 'Set the altitude to a value from this range:' - Color = clDefault - Constraints.MaxWidth = 344 + Constraints.MaxWidth = 275 ParentColor = False Transparent = False WordWrap = True @@ -254,25 +249,24 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = seTerrainAltitude1 AnchorSideTop.Side = asrCenter - Left = 448 + Left = 358 Height = 15 - Top = 80 + Top = 64 Width = 12 - BorderSpacing.Left = 12 + BorderSpacing.Left = 10 Caption = 'to' - Color = clDefault ParentColor = False Transparent = False end object rbSetTerrainAltitude: TRadioButton AnchorSideLeft.Control = pgModifyAltitude AnchorSideTop.Control = pgModifyAltitude - Left = 12 + Left = 10 Height = 22 - Top = 12 + Top = 10 Width = 134 - BorderSpacing.Left = 12 - BorderSpacing.Top = 12 + BorderSpacing.Left = 10 + BorderSpacing.Top = 10 Caption = 'Set terrain altitude' Checked = True TabOrder = 0 @@ -282,11 +276,11 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = rbSetTerrainAltitude AnchorSideTop.Control = Label2 AnchorSideTop.Side = asrBottom - Left = 12 + Left = 10 Height = 22 - Top = 136 + Top = 109 Width = 164 - BorderSpacing.Top = 12 + BorderSpacing.Top = 10 Caption = 'Relative altitude change' TabOrder = 1 end @@ -294,11 +288,11 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = Label3 AnchorSideTop.Control = Label3 AnchorSideTop.Side = asrBottom - Left = 356 + Left = 285 Height = 20 - Top = 75 - Width = 78 - BorderSpacing.Top = 12 + Top = 60 + Width = 62 + BorderSpacing.Top = 10 MaxValue = 127 MinValue = -128 TabOrder = 2 @@ -307,11 +301,11 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = Label4 AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = seTerrainAltitude1 - Left = 478 + Left = 382 Height = 20 - Top = 75 - Width = 78 - BorderSpacing.Left = 12 + Top = 60 + Width = 62 + BorderSpacing.Left = 10 MaxValue = 127 MinValue = -128 TabOrder = 3 @@ -320,10 +314,10 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = Label2 AnchorSideTop.Control = rbRelativeAltitudeChange AnchorSideTop.Side = asrBottom - Left = 48 + Left = 38 Height = 20 - Top = 170 - Width = 78 + Top = 136 + Width = 62 MaxValue = 127 MinValue = -128 TabOrder = 4 @@ -335,31 +329,30 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideTop.Control = pgDrawTerrain AnchorSideBottom.Control = pgDrawTerrain AnchorSideBottom.Side = asrBottom - Left = 12 + Left = 10 Height = 333 - Top = 12 - Width = 351 + Top = 10 + Width = 281 Anchors = [akTop, akLeft, akBottom] - BorderSpacing.Around = 12 + BorderSpacing.Around = 10 Caption = 'Tiles' - ClientHeight = 309 - ClientWidth = 349 + ClientHeight = 321 + ClientWidth = 269 TabOrder = 0 object lblDrawTerrainTilesDesc: TLabel AnchorSideLeft.Control = gbDrawTerrainTiles AnchorSideTop.Control = gbDrawTerrainTiles AnchorSideRight.Control = gbDrawTerrainTiles AnchorSideRight.Side = asrBottom - Left = 6 + Left = 5 Height = 66 Top = 0 Width = 215 Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 6 - BorderSpacing.Right = 6 - BorderSpacing.Bottom = 6 + BorderSpacing.Left = 5 + BorderSpacing.Right = 5 + BorderSpacing.Bottom = 5 Caption = 'Drag terrain tiles from the main window and drop them on the list. For each cell in the target area, one of these (random) will be used.' - Color = clDefault ParentColor = False Transparent = False WordWrap = True @@ -373,15 +366,15 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = btnDeleteTerrain Cursor = 63 - Left = 6 + Left = 5 Height = 218 - Top = 110 + Top = 88 Width = 215 Anchors = [akTop, akLeft, akRight, akBottom] - BorderSpacing.Left = 6 - BorderSpacing.Right = 6 - BorderSpacing.Bottom = 6 - DefaultNodeHeight = 69 + BorderSpacing.Left = 5 + BorderSpacing.Right = 5 + BorderSpacing.Bottom = 5 + DefaultNodeHeight = 55 DragMode = dmAutomatic DragType = dtVCL Header.AutoSizeIndex = 0 @@ -393,15 +386,15 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand item Position = 1 Text = 'Tile' - Width = 69 + Width = 55 end item Position = 2 Text = 'Name' - Width = 156 + Width = 125 end> - Header.DefaultHeight = 26 - Header.Height = 45 + Header.DefaultHeight = 21 + Header.Height = 36 Header.Options = [hoColumnResize, hoDrag, hoVisible] Header.ParentFont = True Header.Style = hsFlatButtons @@ -418,11 +411,11 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Side = asrBottom AnchorSideBottom.Control = btnDeleteTerrain AnchorSideBottom.Side = asrBottom - Left = 48 - Height = 35 + Left = 38 + Height = 28 Hint = 'Clear' - Top = 279 - Width = 35 + Top = 286 + Width = 28 Anchors = [akLeft, akBottom] Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 @@ -460,21 +453,21 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 } - OnClick = btnClearTerrainClick ShowHint = True ParentShowHint = False + OnClick = btnClearTerrainClick end object btnDeleteTerrain: TSpeedButton AnchorSideLeft.Control = gbDrawTerrainTiles AnchorSideBottom.Control = gbDrawTerrainTiles AnchorSideBottom.Side = asrBottom - Left = 6 - Height = 35 + Left = 5 + Height = 28 Hint = 'Delete' - Top = 279 - Width = 35 + Top = 286 + Width = 28 Anchors = [akLeft, akBottom] - BorderSpacing.Around = 6 + BorderSpacing.Around = 5 Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 2000000000000004000064000000640000000000000000000000000000000000 @@ -511,9 +504,9 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 } - OnClick = btnDeleteTerrainClick ShowHint = True ParentShowHint = False + OnClick = btnDeleteTerrainClick end end end @@ -523,31 +516,30 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideTop.Control = pgDeleteStatics AnchorSideBottom.Control = pgDeleteStatics AnchorSideBottom.Side = asrBottom - Left = 12 + Left = 10 Height = 300 - Top = 12 - Width = 351 + Top = 10 + Width = 281 Anchors = [akTop, akLeft, akBottom] - BorderSpacing.Around = 12 + BorderSpacing.Around = 10 Caption = 'Tiles' - ClientHeight = 276 - ClientWidth = 349 + ClientHeight = 288 + ClientWidth = 269 TabOrder = 0 object lblDeleteStaticsTilesDesc: TLabel AnchorSideLeft.Control = gbDeleteStaticsTiles AnchorSideTop.Control = gbDeleteStaticsTiles AnchorSideRight.Control = gbDeleteStaticsTiles AnchorSideRight.Side = asrBottom - Left = 6 + Left = 5 Height = 78 Top = 0 Width = 213 Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 6 - BorderSpacing.Right = 6 - BorderSpacing.Bottom = 6 + BorderSpacing.Left = 5 + BorderSpacing.Right = 5 + BorderSpacing.Bottom = 5 Caption = 'Drag statics tiles from the main window and drop them on the list. Only statics matching these tiles will be deleted. If the list is empty, every static will be deleted.' - Color = clDefault ParentColor = False Transparent = False WordWrap = True @@ -561,15 +553,15 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = btnDeleteDStaticsTiles Cursor = 63 - Left = 6 + Left = 5 Height = 184 - Top = 128 + Top = 102 Width = 213 Anchors = [akTop, akLeft, akRight, akBottom] - BorderSpacing.Left = 6 - BorderSpacing.Right = 6 - BorderSpacing.Bottom = 6 - DefaultNodeHeight = 69 + BorderSpacing.Left = 5 + BorderSpacing.Right = 5 + BorderSpacing.Bottom = 5 + DefaultNodeHeight = 55 DragMode = dmAutomatic DragType = dtVCL Header.AutoSizeIndex = 0 @@ -581,15 +573,15 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand item Position = 1 Text = 'Tile' - Width = 69 + Width = 55 end item Position = 2 Text = 'Name' - Width = 156 + Width = 125 end> - Header.DefaultHeight = 26 - Header.Height = 45 + Header.DefaultHeight = 21 + Header.Height = 36 Header.Options = [hoColumnResize, hoDrag, hoVisible] Header.ParentFont = True Header.Style = hsFlatButtons @@ -606,11 +598,11 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Side = asrBottom AnchorSideBottom.Control = btnDeleteDStaticsTiles AnchorSideBottom.Side = asrBottom - Left = 48 - Height = 35 + Left = 38 + Height = 28 Hint = 'Clear' - Top = 257 - Width = 35 + Top = 264 + Width = 28 Anchors = [akLeft, akBottom] Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 @@ -648,21 +640,21 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 } - OnClick = btnClearDStaticsTilesClick ShowHint = True ParentShowHint = False + OnClick = btnClearDStaticsTilesClick end object btnDeleteDStaticsTiles: TSpeedButton AnchorSideLeft.Control = gbDeleteStaticsTiles AnchorSideBottom.Control = gbDeleteStaticsTiles AnchorSideBottom.Side = asrBottom - Left = 6 - Height = 35 + Left = 5 + Height = 28 Hint = 'Delete' - Top = 257 - Width = 35 + Top = 264 + Width = 28 Anchors = [akLeft, akBottom] - BorderSpacing.Around = 6 + BorderSpacing.Around = 5 Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 2000000000000004000064000000640000000000000000000000000000000000 @@ -699,39 +691,38 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 } - OnClick = btnDeleteDStaticsTilesClick ShowHint = True ParentShowHint = False + OnClick = btnDeleteDStaticsTilesClick end end object GroupBox1: TGroupBox AnchorSideLeft.Control = gbDeleteStaticsTiles AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = gbDeleteStaticsTiles - Left = 376 + Left = 301 Height = 79 - Top = 12 + Top = 10 Width = 176 AutoSize = True Caption = 'Z Boundaries' - ClientHeight = 55 - ClientWidth = 174 + ClientHeight = 67 + ClientWidth = 164 TabOrder = 1 object Label7: TLabel AnchorSideLeft.Control = GroupBox1 AnchorSideTop.Control = GroupBox1 AnchorSideRight.Control = GroupBox1 AnchorSideRight.Side = asrBottom - Left = 6 + Left = 5 Height = 30 Top = 0 Width = 164 Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 6 - BorderSpacing.Right = 6 - BorderSpacing.Bottom = 6 + BorderSpacing.Left = 5 + BorderSpacing.Right = 5 + BorderSpacing.Bottom = 5 Caption = 'Only statics within this Z range will be deleted.' - Color = clDefault ParentColor = False Transparent = False WordWrap = True @@ -741,23 +732,22 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = seDeleteStaticsZ1 AnchorSideTop.Side = asrCenter - Left = 98 + Left = 78 Height = 14 - Top = 62 + Top = 50 Width = 12 Caption = 'to' - Color = clDefault ParentColor = False Transparent = False end object seDeleteStaticsZ1: TSpinEdit AnchorSideTop.Control = Label7 AnchorSideTop.Side = asrBottom - Left = 6 + Left = 5 Height = 19 - Top = 60 - Width = 78 - BorderSpacing.Around = 12 + Top = 48 + Width = 62 + BorderSpacing.Around = 10 MaxValue = 127 MinValue = -128 TabOrder = 0 @@ -767,11 +757,11 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = Label8 AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = seDeleteStaticsZ1 - Left = 128 + Left = 102 Height = 19 - Top = 60 - Width = 78 - BorderSpacing.Left = 12 + Top = 48 + Width = 62 + BorderSpacing.Left = 10 MaxValue = 127 MinValue = -128 TabOrder = 1 @@ -785,31 +775,30 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideTop.Control = pgInsertStatics AnchorSideBottom.Control = pgInsertStatics AnchorSideBottom.Side = asrBottom - Left = 12 + Left = 10 Height = 300 - Top = 12 - Width = 351 + Top = 10 + Width = 281 Anchors = [akTop, akLeft, akBottom] - BorderSpacing.Around = 12 + BorderSpacing.Around = 10 Caption = 'Tiles' - ClientHeight = 276 - ClientWidth = 349 + ClientHeight = 288 + ClientWidth = 269 TabOrder = 0 object lblInsertStaticsTiles: TLabel AnchorSideLeft.Control = gbInserStaticsTiles AnchorSideTop.Control = gbInserStaticsTiles AnchorSideRight.Control = gbInserStaticsTiles AnchorSideRight.Side = asrBottom - Left = 6 + Left = 5 Height = 62 Top = 0 Width = 213 Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 6 - BorderSpacing.Right = 6 - BorderSpacing.Bottom = 6 + BorderSpacing.Left = 5 + BorderSpacing.Right = 5 + BorderSpacing.Bottom = 5 Caption = 'Drag statics tiles from the main window and drop them on the list. For each cell in the target area, one of these (random) will be used.' - Color = clDefault ParentColor = False Transparent = False WordWrap = True @@ -822,15 +811,15 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideRight.Control = gbInserStaticsTiles AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = btnDeleteIStaticsTiles - Left = 6 + Left = 5 Height = 200 - Top = 102 + Top = 82 Width = 213 Anchors = [akTop, akLeft, akRight, akBottom] - BorderSpacing.Left = 6 - BorderSpacing.Right = 6 - BorderSpacing.Bottom = 6 - DefaultNodeHeight = 69 + BorderSpacing.Left = 5 + BorderSpacing.Right = 5 + BorderSpacing.Bottom = 5 + DefaultNodeHeight = 55 DragMode = dmAutomatic DragType = dtVCL Header.AutoSizeIndex = 0 @@ -842,15 +831,15 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand item Position = 1 Text = 'Tile' - Width = 69 + Width = 55 end item Position = 2 Text = 'Name' - Width = 156 + Width = 125 end> - Header.DefaultHeight = 26 - Header.Height = 45 + Header.DefaultHeight = 21 + Header.Height = 36 Header.Options = [hoColumnResize, hoDrag, hoVisible] Header.ParentFont = True Header.Style = hsFlatButtons @@ -866,11 +855,11 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = btnDeleteIStaticsTiles AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = btnDeleteIStaticsTiles - Left = 48 - Height = 35 + Left = 38 + Height = 28 Hint = 'Clear' - Top = 422 - Width = 35 + Top = 338 + Width = 28 Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 2000000000000004000064000000640000000000000000000000000000000000 @@ -907,21 +896,21 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 } - OnClick = btnClearIStaticsTilesClick ShowHint = True ParentShowHint = False + OnClick = btnClearIStaticsTilesClick end object btnDeleteIStaticsTiles: TSpeedButton AnchorSideLeft.Control = gbInserStaticsTiles AnchorSideBottom.Control = gbInserStaticsTiles AnchorSideBottom.Side = asrBottom - Left = 6 - Height = 35 + Left = 5 + Height = 28 Hint = 'Delete' - Top = 257 - Width = 35 + Top = 264 + Width = 28 Anchors = [akLeft, akBottom] - BorderSpacing.Around = 6 + BorderSpacing.Around = 5 Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 2000000000000004000064000000640000000000000000000000000000000000 @@ -958,39 +947,38 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 } - OnClick = btnDeleteIStaticsTilesClick ShowHint = True ParentShowHint = False + OnClick = btnDeleteIStaticsTilesClick end end object gbStaticsProbability: TGroupBox AnchorSideLeft.Control = gbInserStaticsTiles AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = gbInserStaticsTiles - Left = 376 + Left = 301 Height = 75 - Top = 12 + Top = 10 Width = 185 AutoSize = True Caption = 'Probability' - ClientHeight = 51 - ClientWidth = 183 + ClientHeight = 63 + ClientWidth = 173 TabOrder = 1 object Label5: TLabel AnchorSideLeft.Control = gbStaticsProbability AnchorSideTop.Control = gbStaticsProbability AnchorSideRight.Control = gbStaticsProbability AnchorSideRight.Side = asrBottom - Left = 6 + Left = 5 Height = 30 Top = 0 Width = 173 Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 6 - BorderSpacing.Right = 6 - BorderSpacing.Bottom = 6 + BorderSpacing.Left = 5 + BorderSpacing.Right = 5 + BorderSpacing.Bottom = 5 Caption = 'A tile will only be placed with this probability:' - Color = clDefault ParentColor = False Transparent = False WordWrap = True @@ -1000,13 +988,12 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = seStaticsProbability AnchorSideTop.Side = asrCenter - Left = 90 + Left = 72 Height = 14 - Top = 56 + Top = 45 Width = 12 - BorderSpacing.Left = 6 + BorderSpacing.Left = 5 Caption = '%' - Color = clDefault ParentColor = False Transparent = False end @@ -1014,11 +1001,11 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = Label5 AnchorSideTop.Control = Label5 AnchorSideTop.Side = asrBottom - Left = 6 + Left = 5 Height = 19 - Top = 52 - Width = 78 - BorderSpacing.Bottom = 12 + Top = 42 + Width = 62 + BorderSpacing.Bottom = 10 TabOrder = 0 Value = 100 end @@ -1030,30 +1017,30 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideTop.Side = asrBottom AnchorSideRight.Control = gbStaticsProbability AnchorSideRight.Side = asrBottom - Left = 376 + Left = 301 Height = 111 - Top = 136 + Top = 109 Width = 185 Anchors = [akTop, akLeft, akRight] AutoSize = True - BorderSpacing.Top = 6 + BorderSpacing.Top = 5 Caption = 'Z Placement' - ClientHeight = 87 - ClientWidth = 183 + ClientHeight = 99 + ClientWidth = 173 TabOrder = 2 object rbPlaceStaticsOnTerrain: TRadioButton AnchorSideLeft.Control = gbStaticsPlacement AnchorSideTop.Control = gbStaticsPlacement AnchorSideRight.Control = gbStaticsPlacement AnchorSideRight.Side = asrBottom - Left = 6 + Left = 5 Height = 22 - Top = 6 + Top = 5 Width = 173 Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 6 - BorderSpacing.Top = 6 - BorderSpacing.Right = 6 + BorderSpacing.Left = 5 + BorderSpacing.Top = 5 + BorderSpacing.Right = 5 Caption = 'Place tiles on terrain' Checked = True TabOrder = 0 @@ -1065,9 +1052,9 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideTop.Side = asrBottom AnchorSideRight.Control = rbPlaceStaticsOnTerrain AnchorSideRight.Side = asrBottom - Left = 6 + Left = 5 Height = 22 - Top = 40 + Top = 32 Width = 173 Anchors = [akTop, akLeft, akRight] Caption = 'Place tiles on top' @@ -1079,9 +1066,9 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideTop.Side = asrBottom AnchorSideRight.Control = rbPlaceStaticsOnTop AnchorSideRight.Side = asrBottom - Left = 6 + Left = 5 Height = 22 - Top = 75 + Top = 60 Width = 173 Anchors = [akTop, akLeft, akRight] Caption = 'Place tiles on:' @@ -1091,12 +1078,12 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = rbPlaceStaticsOnZ AnchorSideTop.Control = rbPlaceStaticsOnZ AnchorSideTop.Side = asrBottom - Left = 40 + Left = 32 Height = 19 - Top = 110 - Width = 78 - BorderSpacing.Left = 35 - BorderSpacing.Bottom = 12 + Top = 88 + Width = 62 + BorderSpacing.Left = 28 + BorderSpacing.Bottom = 10 TabOrder = 3 end end @@ -1107,30 +1094,30 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom - Left = 857 - Height = 39 - Top = 559 - Width = 100 + Left = 877 + Height = 31 + Top = 567 + Width = 80 Anchors = [akRight, akBottom] - BorderSpacing.Around = 12 - BorderSpacing.InnerBorder = 6 + BorderSpacing.Around = 10 + BorderSpacing.InnerBorder = 5 Caption = 'Close' - OnClick = btnCloseClick TabOrder = 1 + OnClick = btnCloseClick end object btnExecute: TButton AnchorSideRight.Control = btnClose AnchorSideBottom.Control = btnClose AnchorSideBottom.Side = asrBottom - Left = 745 - Height = 39 - Top = 559 - Width = 100 + Left = 765 + Height = 31 + Top = 567 + Width = 80 Anchors = [akRight, akBottom] - BorderSpacing.InnerBorder = 6 + BorderSpacing.InnerBorder = 5 Caption = 'Execute' - OnClick = btnExecuteClick TabOrder = 2 + OnClick = btnExecuteClick end object vstArea: TLazVirtualStringTree AnchorSideLeft.Control = Label1 @@ -1139,18 +1126,18 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideRight.Control = Label1 AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = btnDeleteArea - Left = 6 + Left = 5 Height = 176 - Top = 244 + Top = 195 Width = 226 Anchors = [akTop, akLeft, akRight, akBottom] - BorderSpacing.Bottom = 6 - DefaultNodeHeight = 26 + BorderSpacing.Bottom = 5 + DefaultNodeHeight = 21 DefaultText = 'Node' Header.AutoSizeIndex = 0 Header.Columns = <> - Header.DefaultHeight = 26 - Header.Height = 36 + Header.DefaultHeight = 21 + Header.Height = 29 Header.MainColumn = -1 Header.Options = [hoColumnResize, hoDrag] TabOrder = 3 @@ -1165,16 +1152,15 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideTop.Side = asrBottom AnchorSideRight.Control = vstActions AnchorSideRight.Side = asrBottom - Left = 6 + Left = 5 Height = 26 - Top = 218 + Top = 174 Width = 226 Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 6 - BorderSpacing.Top = 6 - BorderSpacing.Right = 6 + BorderSpacing.Left = 5 + BorderSpacing.Top = 5 + BorderSpacing.Right = 5 Caption = 'Area:' - Color = clDefault ParentColor = False Transparent = False end @@ -1182,20 +1168,20 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner Left = 0 - Height = 212 + Height = 170 Top = 0 - Width = 238 - DefaultNodeHeight = 26 + Width = 190 + DefaultNodeHeight = 21 DefaultText = 'Node' Header.AutoSizeIndex = 0 Header.Columns = < item Position = 0 Text = 'Actions' - Width = 236 + Width = 190 end> - Header.DefaultHeight = 26 - Header.Height = 45 + Header.DefaultHeight = 21 + Header.Height = 36 Header.Options = [hoAutoResize, hoVisible] Header.ParentFont = True Header.Style = hsFlatButtons @@ -1211,11 +1197,11 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand object btnAddArea: TSpeedButton AnchorSideTop.Control = btnDeleteArea AnchorSideRight.Control = btnDeleteArea - Left = 61 - Height = 35 + Left = 68 + Height = 28 Hint = 'Add area' - Top = 426 - Width = 35 + Top = 341 + Width = 28 Anchors = [akTop, akRight] Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 @@ -1253,23 +1239,23 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 } - OnClick = btnAddAreaClick ShowHint = True ParentShowHint = False + OnClick = btnAddAreaClick end object btnDeleteArea: TSpeedButton AnchorSideLeft.Control = vstArea AnchorSideLeft.Side = asrCenter AnchorSideTop.Control = vstArea AnchorSideBottom.Control = seX1 - Left = 102 - Height = 35 + Left = 82 + Height = 28 Hint = 'Delete area' - Top = 426 - Width = 35 + Top = 433 + Width = 28 Anchors = [akLeft, akBottom] - BorderSpacing.Bottom = 6 - BorderSpacing.Around = 6 + BorderSpacing.Bottom = 5 + BorderSpacing.Around = 5 Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 2000000000000004000064000000640000000000000000000000000000000000 @@ -1306,19 +1292,19 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 } - OnClick = btnDeleteAreaClick ShowHint = True ParentShowHint = False + OnClick = btnDeleteAreaClick end object btnClearArea: TSpeedButton AnchorSideLeft.Control = btnDeleteArea AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = btnDeleteArea - Left = 143 - Height = 35 + Left = 114 + Height = 28 Hint = 'Delete all areas' - Top = 426 - Width = 35 + Top = 341 + Width = 28 Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 2000000000000004000064000000640000000000000000000000000000000000 @@ -1355,20 +1341,19 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 } - OnClick = btnClearAreaClick ShowHint = True ParentShowHint = False + OnClick = btnClearAreaClick end object lblX: TLabel AnchorSideLeft.Control = lblY AnchorSideTop.Control = seX1 AnchorSideTop.Side = asrCenter - Left = 6 + Left = 5 Height = 26 - Top = 478 + Top = 382 Width = 11 Caption = 'X' - Color = clDefault Enabled = False ParentColor = False Transparent = False @@ -1376,42 +1361,41 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand object seX1: TSpinEdit AnchorSideLeft.Control = seY1 AnchorSideBottom.Control = seY1 - Left = 28 + Left = 22 Height = 36 Top = 473 - Width = 78 + Width = 62 Anchors = [akLeft, akBottom] - BorderSpacing.Bottom = 12 + BorderSpacing.Bottom = 10 Enabled = False - OnChange = seX1Change TabOrder = 5 Value = 1 + OnChange = seX1Change end object seX2: TSpinEdit AnchorSideLeft.Control = seX1 AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = seX1 - Left = 118 + Left = 94 Height = 36 - Top = 473 - Width = 78 - BorderSpacing.Left = 12 + Top = 378 + Width = 62 + BorderSpacing.Left = 10 Enabled = False - OnChange = seX1Change TabOrder = 6 Value = 1 + OnChange = seX1Change end object lblY: TLabel AnchorSideLeft.Control = Owner AnchorSideTop.Control = seY1 AnchorSideTop.Side = asrCenter - Left = 6 + Left = 5 Height = 26 - Top = 526 + Top = 421 Width = 10 - BorderSpacing.Left = 6 + BorderSpacing.Left = 5 Caption = 'Y' - Color = clDefault Enabled = False ParentColor = False Transparent = False @@ -1420,42 +1404,42 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand AnchorSideLeft.Control = lblY AnchorSideLeft.Side = asrBottom AnchorSideBottom.Control = btnGrab1 - Left = 28 + Left = 22 Height = 36 Top = 521 - Width = 78 + Width = 62 Anchors = [akLeft, akBottom] - BorderSpacing.Left = 12 - BorderSpacing.Bottom = 6 + BorderSpacing.Left = 10 + BorderSpacing.Bottom = 5 Enabled = False - OnChange = seX1Change TabOrder = 7 Value = 1 + OnChange = seX1Change end object seY2: TSpinEdit AnchorSideLeft.Control = seX2 AnchorSideTop.Control = seY1 - Left = 118 + Left = 94 Height = 36 - Top = 521 - Width = 78 + Top = 417 + Width = 62 Enabled = False - OnChange = seX1Change TabOrder = 8 Value = 1 + OnChange = seX1Change end object btnGrab1: TSpeedButton AnchorSideLeft.Control = seY1 AnchorSideLeft.Side = asrCenter AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom - Left = 50 - Height = 35 + Left = 40 + Height = 28 Hint = 'Grab coordinates from the main window.' - Top = 563 - Width = 35 + Top = 570 + Width = 28 Anchors = [akLeft, akBottom] - BorderSpacing.Bottom = 12 + BorderSpacing.Bottom = 10 Enabled = False Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 @@ -1493,20 +1477,20 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand FF00FFFFFF00FFFFFF00CBCBCB7EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 } - OnClick = btnGrab1Click ShowHint = True ParentShowHint = False + OnClick = btnGrab1Click end object btnGrab2: TSpeedButton AnchorSideLeft.Control = seY2 AnchorSideLeft.Side = asrCenter AnchorSideBottom.Control = btnGrab1 AnchorSideBottom.Side = asrBottom - Left = 140 - Height = 35 + Left = 112 + Height = 28 Hint = 'Grab coordinates from the main window.' - Top = 563 - Width = 35 + Top = 570 + Width = 28 Anchors = [akLeft, akBottom] Enabled = False Glyph.Data = { @@ -1545,13 +1529,13 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand FF00FFFFFF00FFFFFF00CBCBCB7EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 } - OnClick = btnGrab1Click ShowHint = True ParentShowHint = False + OnClick = btnGrab1Click end object pmSelectOffset: TPopupMenu - Left = 658 - Top = 129 + Left = 526 + Top = 103 object mnuSelectTopLeft: TMenuItem Caption = 'Select Top-Left Corner' OnClick = mnuSelectTopLeftClick diff --git a/Client/UfrmLargeScaleCommand.pas b/Client/UfrmLargeScaleCommand.pas index 6fe66a4..aeebfd0 100644 --- a/Client/UfrmLargeScaleCommand.pas +++ b/Client/UfrmLargeScaleCommand.pas @@ -176,7 +176,7 @@ type function FindNode(AActionID: Integer): PVirtualNode; procedure TileSelection(AWorldItem: TWorldItem); procedure OffsetSelection(AWorldItem: TWorldItem); - procedure SerializeTiles(ATileList: TVirtualDrawTree; + procedure SerializeTiles(ATileList: TLazVirtualDrawTree; AStream: TEnhancedMemoryStream); public { public declarations } @@ -566,11 +566,11 @@ procedure TfrmLargeScaleCommand.vdtTerrainTilesDragDrop(Sender: TBaseVirtualTree Source: TObject; DataObject: IDataObject; Formats: TFormatArray; Shift: TShiftState; Pt: TPoint; var Effect: Integer; Mode: TDropMode); var - sourceTree: TVirtualDrawTree; + sourceTree: TLazVirtualDrawTree; selected, node: PVirtualNode; sourceTileInfo, targetTileInfo: PTileInfo; begin - sourceTree := Source as TVirtualDrawTree; + sourceTree := Source as TLazVirtualDrawTree; if (sourceTree <> Sender) and (sourceTree <> nil) and (sourceTree.Tag = 1) then begin @@ -597,8 +597,8 @@ procedure TfrmLargeScaleCommand.vdtTerrainTilesDragOver(Sender: TBaseVirtualTree Source: TObject; Shift: TShiftState; State: TDragState; Pt: TPoint; Mode: TDropMode; var Effect: Integer; var Accept: Boolean); begin - if (Source <> Sender) and (Source is TVirtualDrawTree) and - (TVirtualDrawTree(Source).Tag = 1) then + if (Source <> Sender) and (Source is TLazVirtualDrawTree) and + (TLazVirtualDrawTree(Source).Tag = 1) then begin Accept := True; end; @@ -768,7 +768,7 @@ begin WindowState := FOldWindowState; end; -procedure TfrmLargeScaleCommand.SerializeTiles(ATileList: TVirtualDrawTree; +procedure TfrmLargeScaleCommand.SerializeTiles(ATileList: TLazVirtualDrawTree; AStream: TEnhancedMemoryStream); var node: PVirtualNode;