- Fixed TfrmEditAccount.RegionDeleted to check, if the region is known (to prevent index out of bounds errors)
- Fixed UfrmMain to be compatible with newer versions of FPC - Added a slider to frmRegionControl - Added buttons to add and delete regions to frmRegionControl - Fixed unsaved regions not being removed in TfrmRegionControl - Extracted TfrmRegionControl.CheckUnsaved
This commit is contained in:
parent
01f5b2ca58
commit
e727aadcf2
|
@ -13,21 +13,20 @@ object frmEditAccount: TfrmEditAccount
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
|
ParentFont = False
|
||||||
Position = poOwnerFormCenter
|
Position = poOwnerFormCenter
|
||||||
LCLVersion = '0.9.25'
|
LCLVersion = '0.9.27'
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Height = 173
|
Height = 173
|
||||||
Width = 261
|
Width = 261
|
||||||
ActivePage = tsGeneral
|
ActivePage = tsGeneral
|
||||||
Align = alClient
|
Align = alClient
|
||||||
ParentFont = True
|
|
||||||
TabIndex = 0
|
TabIndex = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object tsGeneral: TTabSheet
|
object tsGeneral: TTabSheet
|
||||||
Caption = 'General'
|
Caption = 'General'
|
||||||
ClientHeight = 144
|
ClientHeight = 148
|
||||||
ClientWidth = 257
|
ClientWidth = 259
|
||||||
ParentFont = True
|
|
||||||
object lblPasswordHint: TLabel
|
object lblPasswordHint: TLabel
|
||||||
Left = 86
|
Left = 86
|
||||||
Height = 28
|
Height = 28
|
||||||
|
@ -37,7 +36,6 @@ object frmEditAccount: TfrmEditAccount
|
||||||
Caption = 'Leave empty to leave the password unchanged.'
|
Caption = 'Leave empty to leave the password unchanged.'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object lblUsername: TLabel
|
object lblUsername: TLabel
|
||||||
|
@ -47,7 +45,6 @@ object frmEditAccount: TfrmEditAccount
|
||||||
Width = 58
|
Width = 58
|
||||||
Caption = 'Username:'
|
Caption = 'Username:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object lblPassword: TLabel
|
object lblPassword: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
|
@ -56,7 +53,6 @@ object frmEditAccount: TfrmEditAccount
|
||||||
Width = 54
|
Width = 54
|
||||||
Caption = 'Password:'
|
Caption = 'Password:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object lblAccessLevel: TLabel
|
object lblAccessLevel: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
|
@ -65,7 +61,6 @@ object frmEditAccount: TfrmEditAccount
|
||||||
Width = 63
|
Width = 63
|
||||||
Caption = 'Accesslevel:'
|
Caption = 'Accesslevel:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object edUsername: TEdit
|
object edUsername: TEdit
|
||||||
Left = 86
|
Left = 86
|
||||||
|
@ -73,7 +68,6 @@ object frmEditAccount: TfrmEditAccount
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 160
|
Width = 160
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
ParentFont = True
|
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
|
@ -83,38 +77,33 @@ object frmEditAccount: TfrmEditAccount
|
||||||
Top = 40
|
Top = 40
|
||||||
Width = 160
|
Width = 160
|
||||||
EchoMode = emPassword
|
EchoMode = emPassword
|
||||||
ParentFont = True
|
|
||||||
PasswordChar = '*'
|
PasswordChar = '*'
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object cbAccessLevel: TComboBox
|
object cbAccessLevel: TComboBox
|
||||||
Left = 86
|
Left = 86
|
||||||
Height = 29
|
Height = 25
|
||||||
Top = 104
|
Top = 104
|
||||||
Width = 160
|
Width = 160
|
||||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'None'
|
'None'
|
||||||
'Viewer'
|
'Viewer'
|
||||||
'Normal'
|
'Normal'
|
||||||
'Administrator'
|
'Administrator'
|
||||||
)
|
)
|
||||||
MaxLength = 0
|
|
||||||
ParentFont = True
|
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tsRegions: TTabSheet
|
object tsRegions: TTabSheet
|
||||||
Caption = 'Regions'
|
Caption = 'Regions'
|
||||||
ClientHeight = 144
|
ClientHeight = 148
|
||||||
ClientWidth = 257
|
ClientWidth = 259
|
||||||
ParentFont = True
|
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 241
|
Width = 243
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
|
@ -122,20 +111,18 @@ object frmEditAccount: TfrmEditAccount
|
||||||
BorderSpacing.Bottom = 4
|
BorderSpacing.Bottom = 4
|
||||||
Caption = 'Allowed Regions:'
|
Caption = 'Allowed Regions:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object cbRegions: TCheckListBox
|
object cbRegions: TCheckListBox
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 110
|
Height = 114
|
||||||
Top = 26
|
Top = 26
|
||||||
Width = 241
|
Width = 243
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
ItemHeight = 13
|
ItemHeight = 13
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TopIndex = -1
|
TopIndex = -1
|
||||||
end
|
end
|
||||||
|
@ -151,7 +138,6 @@ object frmEditAccount: TfrmEditAccount
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 25
|
ClientHeight = 25
|
||||||
ClientWidth = 245
|
ClientWidth = 245
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object btnCancel: TButton
|
object btnCancel: TButton
|
||||||
Left = 170
|
Left = 170
|
||||||
|
@ -163,7 +149,6 @@ object frmEditAccount: TfrmEditAccount
|
||||||
Cancel = True
|
Cancel = True
|
||||||
Caption = 'Cancel'
|
Caption = 'Cancel'
|
||||||
ModalResult = 2
|
ModalResult = 2
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object btnOK: TButton
|
object btnOK: TButton
|
||||||
|
@ -176,7 +161,6 @@ object frmEditAccount: TfrmEditAccount
|
||||||
Caption = 'OK'
|
Caption = 'OK'
|
||||||
Default = True
|
Default = True
|
||||||
ModalResult = 1
|
ModalResult = 1
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -143,8 +143,12 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmEditAccount.RegionDeleted(ARegionName: string);
|
procedure TfrmEditAccount.RegionDeleted(ARegionName: string);
|
||||||
|
var
|
||||||
|
index: Integer;
|
||||||
begin
|
begin
|
||||||
cbRegions.Items.Delete(cbRegions.Items.IndexOf(ARegionName));
|
index := cbRegions.Items.IndexOf(ARegionName);
|
||||||
|
if index > -1 then
|
||||||
|
cbRegions.Items.Delete(index);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmEditAccount.RegionList;
|
procedure TfrmEditAccount.RegionList;
|
||||||
|
|
|
@ -15,9 +15,10 @@ object frmMain: TfrmMain
|
||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
|
ParentFont = False
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
ShowInTaskBar = stAlways
|
ShowInTaskBar = stAlways
|
||||||
LCLVersion = '0.9.25'
|
LCLVersion = '0.9.27'
|
||||||
WindowState = wsMaximized
|
WindowState = wsMaximized
|
||||||
object pnlBottom: TPanel
|
object pnlBottom: TPanel
|
||||||
Height = 31
|
Height = 31
|
||||||
|
@ -27,57 +28,53 @@ object frmMain: TfrmMain
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 31
|
ClientHeight = 31
|
||||||
ClientWidth = 766
|
ClientWidth = 766
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object lblX: TLabel
|
object lblX: TLabel
|
||||||
Left = 11
|
Left = 11
|
||||||
Height = 13
|
Height = 14
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 12
|
Width = 11
|
||||||
Caption = 'X:'
|
Caption = 'X:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object lblY: TLabel
|
object lblY: TLabel
|
||||||
Left = 88
|
Left = 88
|
||||||
Height = 13
|
Height = 14
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 12
|
Width = 11
|
||||||
Caption = 'Y:'
|
Caption = 'Y:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object lblTileInfo: TLabel
|
object lblTileInfo: TLabel
|
||||||
Left = 240
|
Left = 240
|
||||||
Height = 13
|
Height = 14
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 4
|
Width = 4
|
||||||
Caption = ' '
|
Caption = ' '
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object lblTip: TLabel
|
object lblTip: TLabel
|
||||||
Left = 519
|
Left = 554
|
||||||
Height = 31
|
Height = 31
|
||||||
Width = 239
|
Width = 204
|
||||||
Align = alRight
|
Align = alRight
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
Caption = 'Right click shows a menu with all the tools.'
|
Caption = 'Right click shows a menu with all the tools.'
|
||||||
Layout = tlCenter
|
Layout = tlCenter
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object lblTipC: TLabel
|
object lblTipC: TLabel
|
||||||
Left = 490
|
Left = 530
|
||||||
Height = 31
|
Height = 31
|
||||||
Width = 29
|
Width = 24
|
||||||
Align = alRight
|
Align = alRight
|
||||||
Caption = 'Tip: '
|
Caption = 'Tip: '
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
Layout = tlCenter
|
Layout = tlCenter
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object edX: TSpinEdit
|
object edX: TSpinEdit
|
||||||
Left = 24
|
Left = 24
|
||||||
|
@ -85,7 +82,6 @@ object frmMain: TfrmMain
|
||||||
Top = 3
|
Top = 3
|
||||||
Width = 55
|
Width = 55
|
||||||
MaxValue = 100000
|
MaxValue = 100000
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object edY: TSpinEdit
|
object edY: TSpinEdit
|
||||||
|
@ -94,7 +90,6 @@ object frmMain: TfrmMain
|
||||||
Top = 3
|
Top = 3
|
||||||
Width = 52
|
Width = 52
|
||||||
MaxValue = 100000
|
MaxValue = 100000
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object btnGoTo: TButton
|
object btnGoTo: TButton
|
||||||
|
@ -105,7 +100,6 @@ object frmMain: TfrmMain
|
||||||
BorderSpacing.InnerBorder = 4
|
BorderSpacing.InnerBorder = 4
|
||||||
Caption = 'GoTo'
|
Caption = 'GoTo'
|
||||||
OnClick = btnGoToClick
|
OnClick = btnGoToClick
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -115,14 +109,12 @@ object frmMain: TfrmMain
|
||||||
Width = 224
|
Width = 224
|
||||||
ActivePage = tsTiles
|
ActivePage = tsTiles
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
ParentFont = True
|
|
||||||
TabIndex = 0
|
TabIndex = 0
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object tsTiles: TTabSheet
|
object tsTiles: TTabSheet
|
||||||
Caption = 'Tiles'
|
Caption = 'Tiles'
|
||||||
ClientHeight = 500
|
ClientHeight = 500
|
||||||
ClientWidth = 222
|
ClientWidth = 222
|
||||||
ParentFont = True
|
|
||||||
object pnlTileListSettings: TPanel
|
object pnlTileListSettings: TPanel
|
||||||
Height = 56
|
Height = 56
|
||||||
Width = 222
|
Width = 222
|
||||||
|
@ -130,7 +122,6 @@ object frmMain: TfrmMain
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 56
|
ClientHeight = 56
|
||||||
ClientWidth = 222
|
ClientWidth = 222
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object lblFilter: TLabel
|
object lblFilter: TLabel
|
||||||
Left = 84
|
Left = 84
|
||||||
|
@ -139,7 +130,6 @@ object frmMain: TfrmMain
|
||||||
Width = 30
|
Width = 30
|
||||||
Caption = 'Filter:'
|
Caption = 'Filter:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object cbTerrain: TCheckBox
|
object cbTerrain: TCheckBox
|
||||||
Left = 4
|
Left = 4
|
||||||
|
@ -149,7 +139,6 @@ object frmMain: TfrmMain
|
||||||
Caption = 'Terrain'
|
Caption = 'Terrain'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = cbTerrainChange
|
OnChange = cbTerrainChange
|
||||||
ParentFont = True
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
|
@ -161,7 +150,6 @@ object frmMain: TfrmMain
|
||||||
Caption = 'Statics'
|
Caption = 'Statics'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = cbStaticsChange
|
OnChange = cbStaticsChange
|
||||||
ParentFont = True
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
|
@ -171,7 +159,6 @@ object frmMain: TfrmMain
|
||||||
Top = 24
|
Top = 24
|
||||||
Width = 112
|
Width = 112
|
||||||
OnEditingDone = edFilterEditingDone
|
OnEditingDone = edFilterEditingDone
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -189,12 +176,11 @@ object frmMain: TfrmMain
|
||||||
Header.Options = [hoVisible]
|
Header.Options = [hoVisible]
|
||||||
Header.ParentFont = True
|
Header.ParentFont = True
|
||||||
Header.Style = hsFlatButtons
|
Header.Style = hsFlatButtons
|
||||||
ParentFont = True
|
|
||||||
PopupMenu = pmTileList
|
PopupMenu = pmTileList
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
TreeOptions.AutoOptions = [toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
TreeOptions.AutoOptions = [toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||||
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toFullRowDrag]
|
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toFullRowDrag]
|
||||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages, toStaticBackground]
|
||||||
TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect, toCenterScrollIntoView]
|
TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect, toCenterScrollIntoView]
|
||||||
OnClick = vdtTilesClick
|
OnClick = vdtTilesClick
|
||||||
OnDrawNode = vdtTilesDrawNode
|
OnDrawNode = vdtTilesDrawNode
|
||||||
|
@ -227,7 +213,6 @@ object frmMain: TfrmMain
|
||||||
Caption = 'Random pool'
|
Caption = 'Random pool'
|
||||||
ClientHeight = 179
|
ClientHeight = 179
|
||||||
ClientWidth = 220
|
ClientWidth = 220
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object vdtRandom: TVirtualDrawTree
|
object vdtRandom: TVirtualDrawTree
|
||||||
Tag = 1
|
Tag = 1
|
||||||
|
@ -241,7 +226,6 @@ object frmMain: TfrmMain
|
||||||
Header.Options = [hoColumnResize, hoDrag, hoVisible]
|
Header.Options = [hoColumnResize, hoDrag, hoVisible]
|
||||||
Header.ParentFont = True
|
Header.ParentFont = True
|
||||||
Header.Style = hsFlatButtons
|
Header.Style = hsFlatButtons
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
||||||
TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect]
|
TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect]
|
||||||
|
@ -273,7 +257,6 @@ object frmMain: TfrmMain
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 22
|
ClientHeight = 22
|
||||||
ClientWidth = 220
|
ClientWidth = 220
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object btnAddRandom: TSpeedButton
|
object btnAddRandom: TSpeedButton
|
||||||
Left = 2
|
Left = 2
|
||||||
|
@ -427,7 +410,6 @@ object frmMain: TfrmMain
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 22
|
ClientHeight = 22
|
||||||
ClientWidth = 212
|
ClientWidth = 212
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object btnRandomPresetSave: TSpeedButton
|
object btnRandomPresetSave: TSpeedButton
|
||||||
Left = 158
|
Left = 158
|
||||||
|
@ -530,7 +512,6 @@ object frmMain: TfrmMain
|
||||||
Width = 152
|
Width = 152
|
||||||
MaxLength = -1
|
MaxLength = -1
|
||||||
OnChange = cbRandomPresetChange
|
OnChange = cbRandomPresetChange
|
||||||
ParentFont = True
|
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
|
@ -553,7 +534,6 @@ object frmMain: TfrmMain
|
||||||
CharCase = ecUppercase
|
CharCase = ecUppercase
|
||||||
OnExit = edSearchIDExit
|
OnExit = edSearchIDExit
|
||||||
OnKeyPress = edSearchIDKeyPress
|
OnKeyPress = edSearchIDKeyPress
|
||||||
ParentFont = True
|
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
@ -564,13 +544,11 @@ object frmMain: TfrmMain
|
||||||
Caption = 'Clients'
|
Caption = 'Clients'
|
||||||
ClientHeight = 500
|
ClientHeight = 500
|
||||||
ClientWidth = 222
|
ClientWidth = 222
|
||||||
ParentFont = True
|
|
||||||
object lbClients: TListBox
|
object lbClients: TListBox
|
||||||
Height = 500
|
Height = 500
|
||||||
Width = 222
|
Width = 222
|
||||||
Align = alClient
|
Align = alClient
|
||||||
OnDblClick = mnuGoToClientClick
|
OnDblClick = mnuGoToClientClick
|
||||||
ParentFont = True
|
|
||||||
PopupMenu = pmClients
|
PopupMenu = pmClients
|
||||||
Sorted = True
|
Sorted = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
@ -581,7 +559,6 @@ object frmMain: TfrmMain
|
||||||
Caption = 'Locations'
|
Caption = 'Locations'
|
||||||
ClientHeight = 500
|
ClientHeight = 500
|
||||||
ClientWidth = 222
|
ClientWidth = 222
|
||||||
ParentFont = True
|
|
||||||
object vstLocations: TVirtualStringTree
|
object vstLocations: TVirtualStringTree
|
||||||
Cursor = 63
|
Cursor = 63
|
||||||
Left = 4
|
Left = 4
|
||||||
|
@ -595,7 +572,6 @@ object frmMain: TfrmMain
|
||||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
|
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
|
||||||
Header.ParentFont = True
|
Header.ParentFont = True
|
||||||
Header.Style = hsFlatButtons
|
Header.Style = hsFlatButtons
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TreeOptions.AutoOptions = [toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
TreeOptions.AutoOptions = [toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
||||||
|
@ -613,7 +589,7 @@ object frmMain: TfrmMain
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Position = 1
|
Position = 1
|
||||||
Width = 135
|
Width = 139
|
||||||
WideText = 'Name'
|
WideText = 'Name'
|
||||||
end>
|
end>
|
||||||
end
|
end
|
||||||
|
@ -627,7 +603,6 @@ object frmMain: TfrmMain
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 24
|
ClientHeight = 24
|
||||||
ClientWidth = 214
|
ClientWidth = 214
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object btnClearLocations: TSpeedButton
|
object btnClearLocations: TSpeedButton
|
||||||
Left = 112
|
Left = 112
|
||||||
|
@ -957,7 +932,6 @@ object frmMain: TfrmMain
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 525
|
ClientHeight = 525
|
||||||
ClientWidth = 542
|
ClientWidth = 542
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object oglGameWindow: TOpenGLControl
|
object oglGameWindow: TOpenGLControl
|
||||||
Height = 374
|
Height = 374
|
||||||
|
@ -981,20 +955,18 @@ object frmMain: TfrmMain
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
ClientHeight = 24
|
ClientHeight = 24
|
||||||
ClientWidth = 542
|
ClientWidth = 542
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object lblChatHeaderCaption: TLabel
|
object lblChatHeaderCaption: TLabel
|
||||||
Cursor = crHandPoint
|
Cursor = crHandPoint
|
||||||
Left = 10
|
Left = 10
|
||||||
Height = 20
|
Height = 20
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 104
|
Width = 95
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Chat and Messages'
|
Caption = 'Chat and Messages'
|
||||||
Layout = tlCenter
|
Layout = tlCenter
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
OnClick = lblChatHeaderCaptionClick
|
OnClick = lblChatHeaderCaptionClick
|
||||||
OnMouseEnter = lblChatHeaderCaptionMouseEnter
|
OnMouseEnter = lblChatHeaderCaptionMouseEnter
|
||||||
OnMouseLeave = lblChatHeaderCaptionMouseLeave
|
OnMouseLeave = lblChatHeaderCaptionMouseLeave
|
||||||
|
@ -1008,7 +980,6 @@ object frmMain: TfrmMain
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 122
|
ClientHeight = 122
|
||||||
ClientWidth = 542
|
ClientWidth = 542
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Visible = False
|
Visible = False
|
||||||
object vstChat: TVirtualStringTree
|
object vstChat: TVirtualStringTree
|
||||||
|
@ -1021,7 +992,6 @@ object frmMain: TfrmMain
|
||||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
|
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
|
||||||
Header.ParentFont = True
|
Header.ParentFont = True
|
||||||
Header.Style = hsFlatButtons
|
Header.Style = hsFlatButtons
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||||
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||||
|
@ -1052,7 +1022,6 @@ object frmMain: TfrmMain
|
||||||
Width = 542
|
Width = 542
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
OnKeyPress = edChatKeyPress
|
OnKeyPress = edChatKeyPress
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1253,6 +1222,42 @@ object frmMain: TfrmMain
|
||||||
end
|
end
|
||||||
object mnuRegionControl: TMenuItem
|
object mnuRegionControl: TMenuItem
|
||||||
Caption = '&Region Management'
|
Caption = '&Region Management'
|
||||||
|
Bitmap.Data = {
|
||||||
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
|
2000000000000004000064000000640000000000000000000000454D47FF5F6A
|
||||||
|
61FF636F64FF646F64FF143F56FF295F86FF4988BCFF4A86A7FF5D7070FF646F
|
||||||
|
66FF646F66FF646F67FF646F67FF647067FF616C63FF474E48FF5F6A60FFEBF5
|
||||||
|
ECFFD4EDD7FFD4EED7FF2E6784FF94C7F9FF91C9F9FF4185C9FF256BACFFB7D9
|
||||||
|
D4FFD4E2ECFFCFE5D6FFD5EDD9FFD8EFDCFFD5EDD9FF616C63FF626E64FFEEF8
|
||||||
|
EFFFA4DBBCFF8CCAA6FF4389AAFFE0F2FFFF549AD8FF1A7ABEFF4998C5FF3B86
|
||||||
|
BFFF6074E7FF81C5A3FF8CD0A6FF85CAA0FFD2E9D7FF646F67FF616E64FFECF7
|
||||||
|
EEFF96DBAFFF7FC99AFF63ADA5FF7AB6D5FF90B7D1FF55C9E4FF5BDFF5FF78D0
|
||||||
|
EDFF4696D9FF76C1A1FF87D0A0FF80CA9AFFD6EEDAFF646F66FF616E63FFF7FB
|
||||||
|
F8FF9BDEC4FF73C393FF80CF9FFF53AD9CFF73B9D5FFC2F6FDFF63DFF7FF5DE2
|
||||||
|
F8FF79D3F0FF4395DAFF6CB8A4FF74C38FFFD7EFDAFF646F66FF616E63FFF8FC
|
||||||
|
F9FFBCFBFBFF9DE7DFFF93E1BBFF77C997FF63BDAEFF77CBE7FFC7F7FDFF5EDC
|
||||||
|
F5FF5AE1F7FF7BD4F1FF4395DDFF589BC3FFD0E9DBFF646F66FF606D63FFF8FC
|
||||||
|
F8FFA4EBEDFF8DDFDFFF97EBEBFF72CFB7FF74CA99FF4790BDFF79D3EEFFC7F7
|
||||||
|
FDFF5FDCF5FF5BE2F7FF7AD6F2FF4399DFFFB1D4D9FF646F66FF606D62FFF8FC
|
||||||
|
F8FFAFFAFAFF94EBEBFFA2F9FAFF8AEAEBFF95EDF3FF595FEBFF6BCFE5FF7CD4
|
||||||
|
EEFFC4F6FDFF6CDDF6FF6DCAEDFF63A3D7FF66A1D3FF617474FF606D61FFF8FC
|
||||||
|
F8FF9FF1F1FF81DDDFFF8AEAEBFF75DEDEFF6591EEFF557EE2FF68DCDDFF5BBC
|
||||||
|
C5FF80D5EDFFB2E3F9FF8BC0E7FFAED3F6FFC4E0FCFF669DD0FF5F6D61FFF8FC
|
||||||
|
F8FFA6F9F9FF8BE9EAFF99F8FAFF78D3EBFF656BFFFF77DCEAFF70DFDEFFC1C5
|
||||||
|
B5FFA8C8C8FF77BEE7FFB4D2F0FFE5F3FFFFACD2EFFF4A89BEFF5F6D61FFF8FC
|
||||||
|
F8FF90EAEAFF78DDDEFF81E9EAFF4E6BE2FF639DEEFF5ED7D7FF5BCBC9FFD4B0
|
||||||
|
97FFE2BA9FFFA1ADA9FF58A5D8FF85B1DBFF469DD0FF4E7C8CFF5F6D61FFF7FC
|
||||||
|
F8FF9FF9F9FF85E9EAFF84D3FAFF525AF0FF87F2F7FF60DAD7FF98D5CAFFE0B7
|
||||||
|
9CFFEDC7A9FFE0B394FFE6B898FFDEAE8CFFD7ECD6FF636E64FF5F6D60FFF7FC
|
||||||
|
F8FF8AEAEAFF72DDDEFF5665F0FF569FDFFF73E8E8FF46C1C1FFBBBBA5FFD0A4
|
||||||
|
83FFDEB08EFFD19E7AFFD6A27AFFCF9871FFD7EBD5FF626E64FF5F6D60FFF7FC
|
||||||
|
F8FF9DF9F9FF6CB4EDFF6271FEFF80E7E9FF8CF4F4FF52CDCDFFECC2A4FFDDAD
|
||||||
|
8AFFEBBA97FFDDA780FFE2AB83FFDAA075FFD9EAD4FF616E64FF5C6A5DFFFBFC
|
||||||
|
FBFFFCFEFCFFF7FCF8FFF7FCF8FFF7FCF8FFF8FCF8FFF7FCF9FFF8FCF8FFF8FC
|
||||||
|
F8FFECF7EEFFEDF7EEFFEFF6EDFFEEF4ECFFEBF4EBFF5E6A5FFF536876FF5C6A
|
||||||
|
5DFF5F6D60FF5F6D60FF5F6D60FF5F6D60FF5F6D61FF5F6D61FF5F6D61FF5F6D
|
||||||
|
61FF606D61FF606D62FF606D62FF606D63FF5E6A5FFF454E46FF
|
||||||
|
}
|
||||||
ImageIndex = 19
|
ImageIndex = 19
|
||||||
OnClick = mnuRegionControlClick
|
OnClick = mnuRegionControlClick
|
||||||
end
|
end
|
||||||
|
|
|
@ -559,7 +559,7 @@ begin
|
||||||
if frmDrawSettings.cbForceAltitude.Checked then
|
if frmDrawSettings.cbForceAltitude.Checked then
|
||||||
map.Altitude := frmDrawSettings.seForceAltitude.Value;
|
map.Altitude := frmDrawSettings.seForceAltitude.Value;
|
||||||
if frmDrawSettings.cbRandomHeight.Checked then
|
if frmDrawSettings.cbRandomHeight.Checked then
|
||||||
Inc(map.Altitude, Random(frmDrawSettings.seRandomHeight.Value));
|
map.Altitude := map.Altitude + Random(frmDrawSettings.seRandomHeight.Value);
|
||||||
dmNetwork.Send(TDrawMapPacket.Create(map.X, map.Y, map.Z, tileInfo^.ID));
|
dmNetwork.Send(TDrawMapPacket.Create(map.X, map.Y, map.Z, tileInfo^.ID));
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
|
@ -2047,7 +2047,7 @@ begin
|
||||||
begin
|
begin
|
||||||
FGhostTile.Z := CurrentTile.Z;
|
FGhostTile.Z := CurrentTile.Z;
|
||||||
if CurrentTile is TStaticItem then
|
if CurrentTile is TStaticItem then
|
||||||
Inc(FGhostTile.Z, ResMan.Tiledata.StaticTiles[CurrentTile.TileID].Height);
|
FGhostTile.Z := FGhostTile.Z + ResMan.Tiledata.StaticTiles[CurrentTile.TileID].Height;
|
||||||
end else
|
end else
|
||||||
FGhostTile.Z := frmDrawSettings.seForceAltitude.Value;
|
FGhostTile.Z := frmDrawSettings.seForceAltitude.Value;
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -1,51 +1,48 @@
|
||||||
object frmRegionControl: TfrmRegionControl
|
object frmRegionControl: TfrmRegionControl
|
||||||
Left = 247
|
Left = 247
|
||||||
Height = 392
|
Height = 413
|
||||||
Top = 139
|
Top = 139
|
||||||
Width = 620
|
Width = 620
|
||||||
ActiveControl = vstRegions
|
|
||||||
Caption = 'Region Control'
|
Caption = 'Region Control'
|
||||||
ClientHeight = 392
|
ClientHeight = 413
|
||||||
ClientWidth = 620
|
ClientWidth = 620
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
|
OnClose = FormClose
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
|
ParentFont = False
|
||||||
Position = poOwnerFormCenter
|
Position = poOwnerFormCenter
|
||||||
ShowInTaskBar = stAlways
|
ShowInTaskBar = stAlways
|
||||||
LCLVersion = '0.9.25'
|
LCLVersion = '0.9.27'
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Height = 359
|
Height = 380
|
||||||
Width = 160
|
Width = 160
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
Caption = 'Panel1'
|
ClientHeight = 380
|
||||||
ClientHeight = 359
|
|
||||||
ClientWidth = 160
|
ClientWidth = 160
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 5
|
Left = 5
|
||||||
Height = 13
|
Height = 14
|
||||||
Top = 137
|
Top = 176
|
||||||
Width = 150
|
Width = 150
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
Caption = 'Area:'
|
Caption = 'Area:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object pnlAreaControls: TPanel
|
object pnlAreaControls: TPanel
|
||||||
Left = 5
|
Left = 5
|
||||||
Height = 82
|
Height = 82
|
||||||
Top = 272
|
Top = 293
|
||||||
Width = 150
|
Width = 150
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 82
|
ClientHeight = 82
|
||||||
ClientWidth = 150
|
ClientWidth = 150
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object lblX: TLabel
|
object lblX: TLabel
|
||||||
Left = 4
|
Left = 4
|
||||||
|
@ -55,7 +52,6 @@ object frmRegionControl: TfrmRegionControl
|
||||||
Caption = 'X'
|
Caption = 'X'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object lblY: TLabel
|
object lblY: TLabel
|
||||||
Left = 4
|
Left = 4
|
||||||
|
@ -65,7 +61,6 @@ object frmRegionControl: TfrmRegionControl
|
||||||
Caption = 'Y'
|
Caption = 'Y'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = True
|
|
||||||
end
|
end
|
||||||
object btnAddArea: TSpeedButton
|
object btnAddArea: TSpeedButton
|
||||||
Left = 30
|
Left = 30
|
||||||
|
@ -218,7 +213,6 @@ object frmRegionControl: TfrmRegionControl
|
||||||
Width = 50
|
Width = 50
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnChange = seX1Change
|
OnChange = seX1Change
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object seX2: TSpinEdit
|
object seX2: TSpinEdit
|
||||||
|
@ -228,7 +222,6 @@ object frmRegionControl: TfrmRegionControl
|
||||||
Width = 50
|
Width = 50
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnChange = seX1Change
|
OnChange = seX1Change
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object seY1: TSpinEdit
|
object seY1: TSpinEdit
|
||||||
|
@ -238,7 +231,6 @@ object frmRegionControl: TfrmRegionControl
|
||||||
Width = 50
|
Width = 50
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnChange = seX1Change
|
OnChange = seX1Change
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object seY2: TSpinEdit
|
object seY2: TSpinEdit
|
||||||
|
@ -248,14 +240,13 @@ object frmRegionControl: TfrmRegionControl
|
||||||
Width = 50
|
Width = 50
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnChange = seX1Change
|
OnChange = seX1Change
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object vstArea: TVirtualStringTree
|
object vstArea: TVirtualStringTree
|
||||||
Left = 5
|
Left = 5
|
||||||
Height = 118
|
Height = 99
|
||||||
Top = 150
|
Top = 190
|
||||||
Width = 150
|
Width = 150
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
|
@ -264,7 +255,6 @@ object frmRegionControl: TfrmRegionControl
|
||||||
BorderStyle = bsSingle
|
BorderStyle = bsSingle
|
||||||
Header.MainColumn = -1
|
Header.MainColumn = -1
|
||||||
Header.Options = [hoColumnResize, hoDrag]
|
Header.Options = [hoColumnResize, hoDrag]
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
||||||
TreeOptions.SelectionOptions = [toFullRowSelect]
|
TreeOptions.SelectionOptions = [toFullRowSelect]
|
||||||
|
@ -272,48 +262,172 @@ object frmRegionControl: TfrmRegionControl
|
||||||
OnGetText = vstAreaGetText
|
OnGetText = vstAreaGetText
|
||||||
Columns = <>
|
Columns = <>
|
||||||
end
|
end
|
||||||
object vstRegions: TVirtualStringTree
|
object spRegionsArea: TSplitter
|
||||||
|
Cursor = crVSplit
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 136
|
Height = 5
|
||||||
|
Top = 171
|
||||||
|
Width = 158
|
||||||
|
Align = alTop
|
||||||
|
AutoSnap = False
|
||||||
|
ResizeAnchor = akTop
|
||||||
|
end
|
||||||
|
object Panel4: TPanel
|
||||||
|
Left = 1
|
||||||
|
Height = 170
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 158
|
Width = 158
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Header.Options = [hoAutoResize, hoVisible]
|
Anchors = [akLeft, akRight]
|
||||||
Header.ParentFont = True
|
BevelOuter = bvNone
|
||||||
Header.Style = hsFlatButtons
|
ClientHeight = 170
|
||||||
ParentFont = True
|
ClientWidth = 158
|
||||||
PopupMenu = pmRegions
|
TabOrder = 3
|
||||||
TabOrder = 2
|
object vstRegions: TVirtualStringTree
|
||||||
TreeOptions.MiscOptions = [toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
Height = 144
|
||||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
Width = 158
|
||||||
TreeOptions.SelectionOptions = [toFullRowSelect]
|
Align = alClient
|
||||||
OnChange = vstRegionsChange
|
Header.Options = [hoAutoResize, hoVisible]
|
||||||
OnFreeNode = vstRegionsFreeNode
|
Header.ParentFont = True
|
||||||
OnGetText = vstRegionsGetText
|
Header.Style = hsFlatButtons
|
||||||
Columns = <
|
PopupMenu = pmRegions
|
||||||
item
|
TabOrder = 0
|
||||||
Width = 158
|
TreeOptions.MiscOptions = [toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||||
WideText = 'Regions'
|
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
||||||
end>
|
TreeOptions.SelectionOptions = [toFullRowSelect]
|
||||||
|
OnChange = vstRegionsChange
|
||||||
|
OnFreeNode = vstRegionsFreeNode
|
||||||
|
OnGetText = vstRegionsGetText
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
Width = 158
|
||||||
|
WideText = 'Regions'
|
||||||
|
end>
|
||||||
|
end
|
||||||
|
object Panel5: TPanel
|
||||||
|
Height = 26
|
||||||
|
Top = 144
|
||||||
|
Width = 158
|
||||||
|
Align = alBottom
|
||||||
|
BevelOuter = bvNone
|
||||||
|
ClientHeight = 26
|
||||||
|
ClientWidth = 158
|
||||||
|
TabOrder = 1
|
||||||
|
object btnAddRegion: TSpeedButton
|
||||||
|
Left = 54
|
||||||
|
Height = 22
|
||||||
|
Hint = 'Add region'
|
||||||
|
Top = 3
|
||||||
|
Width = 23
|
||||||
|
Color = clBtnFace
|
||||||
|
Glyph.Data = {
|
||||||
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
|
2000000000000004000064000000640000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000003A8C44FF368940FF32873CFF2F84
|
||||||
|
37FF000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000459653FF419950FF7DC28FFF96D0A6FF96CFA6FF78BE
|
||||||
|
89FF368D42FF2C8134FF00000000000000000000000000000000000000000000
|
||||||
|
0000000000004D9C5DFF64B478FFA8DBB5FF87CC98FF66BC7DFF64BA7CFF86CB
|
||||||
|
98FFA5D9B4FF58AA6BFF2C8134FF000000000000000000000000000000000000
|
||||||
|
000056A366FF6AB97DFFA8DBB2FF60BC77FF5CBA73FF59B870FF59B56FFF58B5
|
||||||
|
6FFF5BB774FFA5D9B3FF5AAA6CFF2C8234FF0000000000000000000000000000
|
||||||
|
000053AB68FFAADDB4FF64C179FF5FBE71FF60BC77FFFFFFFFFFFFFFFFFF59B8
|
||||||
|
70FF58B56EFF5CB774FFA6DAB4FF388F43FF00000000000000000000000061AC
|
||||||
|
75FF8ACC98FF89D396FF6BC67AFF63C170FF55AB65FFFFFFFFFFFFFFFFFF59B8
|
||||||
|
70FF59B870FF5BB972FF85CC97FF7BBE8DFF308539FF000000000000000065AF
|
||||||
|
7AFFA9DDB3FF7DCF8AFF75CC81FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
|
FFFFFFFFFFFF59B870FF67BE7DFF9CD4ABFF34883DFF000000000000000069B2
|
||||||
|
7EFFB6E2BEFF8BD597FF7AC986FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
|
FFFFFFFFFFFF59B870FF69C17EFF9DD4AAFF388B42FF00000000000000006DB5
|
||||||
|
83FFACDDB6FFA6DFAFFF81CB8CFF7CC986FF6EBD79FFFFFFFFFFFFFFFFFF5BAC
|
||||||
|
6AFF60BC77FF5CBA73FF8BD199FF80C592FF3C8E47FF00000000000000000000
|
||||||
|
000085C797FFD2EED7FF95D9A0FF8AD394FF7FC889FFFFFFFFFFFFFFFFFF79CD
|
||||||
|
85FF6BC37CFF6FC77EFFACDFB5FF459E57FF0000000000000000000000000000
|
||||||
|
000070B887FFAADAB7FFD8F1DCFF92D89DFF88CD93FF84CC8EFF8BD496FF8AD4
|
||||||
|
95FF83D28EFFAFE0B7FF6BB97DFF489856FF0000000000000000000000000000
|
||||||
|
00000000000070B887FFAFDCBBFFDCF2E0FFB6E4BDFF9BDBA5FF96D9A0FFA5DF
|
||||||
|
AFFFC0E8C5FF79C28AFF509E5FFF000000000000000000000000000000000000
|
||||||
|
0000000000000000000071B887FF94CEA4FFC3E6CBFFCFEBD4FFC9E9CEFFAFDD
|
||||||
|
B8FF6DB97FFF58A569FF00000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000006EB684FF6AB380FF67B17CFF63AE
|
||||||
|
77FF000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000
|
||||||
|
}
|
||||||
|
NumGlyphs = 0
|
||||||
|
OnClick = mnuAddRegionClick
|
||||||
|
ShowHint = True
|
||||||
|
ParentShowHint = False
|
||||||
|
end
|
||||||
|
object btnDeleteRegion: TSpeedButton
|
||||||
|
Left = 82
|
||||||
|
Height = 22
|
||||||
|
Hint = 'Delete region'
|
||||||
|
Top = 3
|
||||||
|
Width = 23
|
||||||
|
Color = clBtnFace
|
||||||
|
Enabled = False
|
||||||
|
Glyph.Data = {
|
||||||
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
|
2000000000000004000064000000640000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000003853BEFF3551BDFF304BBCFF2E4E
|
||||||
|
B8FF000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000004255C6FF3C52CCFF757AE8FF8F92EEFF8F92EEFF7178
|
||||||
|
E4FF334DC1FF2B4AB7FF00000000000000000000000000000000000000000000
|
||||||
|
0000000000004959CBFF5C65E0FFA1A6F5FF7E86EFFF5B63E9FF595DE7FF7D84
|
||||||
|
EEFF9EA0F4FF515DD7FF2B4AB7FF000000000000000000000000000000000000
|
||||||
|
00005361CFFF616BE3FFA1ACF5FF545FECFF505CEAFF4D59E9FF4E59E6FF4C56
|
||||||
|
E6FF5056E6FF9EA2F4FF5460D6FF2A4AB8FF0000000000000000000000000000
|
||||||
|
00004B56DBFFA2ABF6FF5664F0FF5266EEFF4D59E9FF4D59E9FF4D59E9FF4D59
|
||||||
|
E9FF4C58E6FF525AE6FF9FA3F5FF3450C4FF0000000000000000000000005C62
|
||||||
|
D7FF818CEEFF7E91F7FF5D73F3FF4D59E9FF4D59E9FF4D59E9FF4D59E9FF4D59
|
||||||
|
E9FF4D59E9FF4F5BE9FF7B83F0FF757BE2FF2E4BBAFF00000000000000005F63
|
||||||
|
DAFFA1ABF7FF7086F8FF6882F6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
|
FFFFFFFFFFFF4D59E9FF5C66EAFF969CF1FF3250BCFF00000000000000006469
|
||||||
|
DBFFAFB9F9FF7F93FAFF7085F0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
|
FFFFFFFFFFFF4D59E9FF5E6AEEFF969DF1FF364FBEFF0000000000000000676A
|
||||||
|
DEFFA5AFF5FF9DABFAFF778CF0FF545FECFF545FECFF545FECFF545FECFF545F
|
||||||
|
ECFF545FECFF6377F2FF818EF4FF787FE9FF3A53C0FF00000000000000000000
|
||||||
|
00007D83EAFFCDD4FCFF8B9DFAFF7E93F7FF758AEEFF6C84F6FF6C84F6FF6C84
|
||||||
|
F6FF6C84F6FF6379F3FFA4AFF8FF3E4FD0FF0000000000000000000000000000
|
||||||
|
00006A69E0FFA3A7F3FFD4DBFDFF879AFAFF7F91F0FF7A8EF1FF7F94F8FF7E92
|
||||||
|
F9FF768CF8FFA8B6F8FF636EE3FF4557C7FF0000000000000000000000000000
|
||||||
|
0000000000006A69E0FFAAADF2FFD8DCFDFFAEBAFAFF91A3FAFF8B9DFAFF9CA9
|
||||||
|
FBFFBAC7FCFF707BE9FF4C5BCCFF000000000000000000000000000000000000
|
||||||
|
000000000000000000006A6ADFFF8E93EDFFBEC3F8FFCCD3F9FFC4CBF9FFAAB4
|
||||||
|
F4FF6670E2FF535ED1FF00000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000686ADDFF6364DCFF6164DAFF5D63
|
||||||
|
D9FF000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000
|
||||||
|
}
|
||||||
|
NumGlyphs = 0
|
||||||
|
OnClick = mnuDeleteRegionClick
|
||||||
|
ShowHint = True
|
||||||
|
ParentShowHint = False
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 160
|
Left = 160
|
||||||
Height = 359
|
Height = 380
|
||||||
Width = 460
|
Width = 460
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'Panel2'
|
Caption = 'Panel2'
|
||||||
ClientHeight = 359
|
ClientHeight = 380
|
||||||
ClientWidth = 460
|
ClientWidth = 460
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object sbArea: TScrollBox
|
object sbArea: TScrollBox
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 357
|
Height = 378
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 458
|
Width = 458
|
||||||
Align = alClient
|
Align = alClient
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object pbArea: TPaintBox
|
object pbArea: TPaintBox
|
||||||
Height = 105
|
Height = 105
|
||||||
|
@ -327,14 +441,13 @@ object frmRegionControl: TfrmRegionControl
|
||||||
object Panel3: TPanel
|
object Panel3: TPanel
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 363
|
Top = 384
|
||||||
Width = 612
|
Width = 612
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 25
|
ClientHeight = 25
|
||||||
ClientWidth = 612
|
ClientWidth = 612
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object btnClose: TButton
|
object btnClose: TButton
|
||||||
Left = 548
|
Left = 548
|
||||||
|
@ -345,7 +458,6 @@ object frmRegionControl: TfrmRegionControl
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
Caption = 'Close'
|
Caption = 'Close'
|
||||||
OnClick = btnCloseClick
|
OnClick = btnCloseClick
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object btnSave: TButton
|
object btnSave: TButton
|
||||||
|
@ -358,7 +470,6 @@ object frmRegionControl: TfrmRegionControl
|
||||||
Caption = 'Save'
|
Caption = 'Save'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnClick = btnSaveClick
|
OnClick = btnSaveClick
|
||||||
ParentFont = True
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -369,10 +480,10 @@ object frmRegionControl: TfrmRegionControl
|
||||||
Caption = 'Add'
|
Caption = 'Add'
|
||||||
OnClick = mnuAddRegionClick
|
OnClick = mnuAddRegionClick
|
||||||
end
|
end
|
||||||
object mnuRemoveRegion: TMenuItem
|
object mnuDeleteRegion: TMenuItem
|
||||||
Caption = 'Remove'
|
Caption = 'Delete'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnClick = mnuRemoveRegionClick
|
OnClick = mnuDeleteRegionClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -52,18 +52,23 @@ type
|
||||||
|
|
||||||
TfrmRegionControl = class(TForm)
|
TfrmRegionControl = class(TForm)
|
||||||
btnAddArea: TSpeedButton;
|
btnAddArea: TSpeedButton;
|
||||||
|
btnAddRegion: TSpeedButton;
|
||||||
btnClearArea: TSpeedButton;
|
btnClearArea: TSpeedButton;
|
||||||
btnDeleteArea: TSpeedButton;
|
btnDeleteArea: TSpeedButton;
|
||||||
btnClose: TButton;
|
btnClose: TButton;
|
||||||
|
btnDeleteRegion: TSpeedButton;
|
||||||
|
|
||||||
btnSave: TButton;
|
btnSave: TButton;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
lblX: TLabel;
|
lblX: TLabel;
|
||||||
lblY: TLabel;
|
lblY: TLabel;
|
||||||
mnuAddRegion: TMenuItem;
|
mnuAddRegion: TMenuItem;
|
||||||
mnuRemoveRegion: TMenuItem;
|
mnuDeleteRegion: TMenuItem;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
Panel2: TPanel;
|
Panel2: TPanel;
|
||||||
Panel3: TPanel;
|
Panel3: TPanel;
|
||||||
|
Panel4: TPanel;
|
||||||
|
Panel5: TPanel;
|
||||||
pbArea: TPaintBox;
|
pbArea: TPaintBox;
|
||||||
pnlAreaControls: TPanel;
|
pnlAreaControls: TPanel;
|
||||||
pmRegions: TPopupMenu;
|
pmRegions: TPopupMenu;
|
||||||
|
@ -72,10 +77,12 @@ type
|
||||||
seX2: TSpinEdit;
|
seX2: TSpinEdit;
|
||||||
seY1: TSpinEdit;
|
seY1: TSpinEdit;
|
||||||
seY2: TSpinEdit;
|
seY2: TSpinEdit;
|
||||||
vstRegions: TVirtualStringTree;
|
spRegionsArea: TSplitter;
|
||||||
vstArea: TVirtualStringTree;
|
vstArea: TVirtualStringTree;
|
||||||
|
vstRegions: TVirtualStringTree;
|
||||||
|
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||||
procedure mnuAddRegionClick(Sender: TObject);
|
procedure mnuAddRegionClick(Sender: TObject);
|
||||||
procedure mnuRemoveRegionClick(Sender: TObject);
|
procedure mnuDeleteRegionClick(Sender: TObject);
|
||||||
procedure btnAddAreaClick(Sender: TObject);
|
procedure btnAddAreaClick(Sender: TObject);
|
||||||
procedure btnClearAreaClick(Sender: TObject);
|
procedure btnClearAreaClick(Sender: TObject);
|
||||||
procedure btnCloseClick(Sender: TObject);
|
procedure btnCloseClick(Sender: TObject);
|
||||||
|
@ -101,10 +108,12 @@ type
|
||||||
FLastX: Integer;
|
FLastX: Integer;
|
||||||
FLastY: Integer;
|
FLastY: Integer;
|
||||||
FAreaMove: TAreaMove;
|
FAreaMove: TAreaMove;
|
||||||
|
FTempRegionNode: PVirtualNode;
|
||||||
FOnRegionModified: TRegionModifiedEvent;
|
FOnRegionModified: TRegionModifiedEvent;
|
||||||
FOnRegionDeleted: TRegionDeletedEvent;
|
FOnRegionDeleted: TRegionDeletedEvent;
|
||||||
FOnRegionList: TRegionListEvent;
|
FOnRegionList: TRegionListEvent;
|
||||||
function FindRegion(AName: string): PVirtualNode;
|
function FindRegion(AName: string): PVirtualNode;
|
||||||
|
procedure CheckUnsaved;
|
||||||
procedure OnModifyRegionPacket(ABuffer: TEnhancedMemoryStream);
|
procedure OnModifyRegionPacket(ABuffer: TEnhancedMemoryStream);
|
||||||
procedure OnDeleteRegionPacket(ABuffer: TEnhancedMemoryStream);
|
procedure OnDeleteRegionPacket(ABuffer: TEnhancedMemoryStream);
|
||||||
procedure OnListRegionsPacket(ABuffer: TEnhancedMemoryStream);
|
procedure OnListRegionsPacket(ABuffer: TEnhancedMemoryStream);
|
||||||
|
@ -196,6 +205,8 @@ begin
|
||||||
|
|
||||||
vstArea.NodeDataSize := SizeOf(TRect);
|
vstArea.NodeDataSize := SizeOf(TRect);
|
||||||
vstRegions.NodeDataSize := SizeOf(TRegionInfo);
|
vstRegions.NodeDataSize := SizeOf(TRegionInfo);
|
||||||
|
|
||||||
|
FTempRegionNode := nil;
|
||||||
|
|
||||||
frmRadarMap.Dependencies.Add(pbArea);
|
frmRadarMap.Dependencies.Add(pbArea);
|
||||||
frmMain.RegisterAccessChangedListener(@OnAccessChanged);
|
frmMain.RegisterAccessChangedListener(@OnAccessChanged);
|
||||||
|
@ -231,7 +242,10 @@ begin
|
||||||
btnSave.Enabled := False;
|
btnSave.Enabled := False;
|
||||||
|
|
||||||
//Refresh the current region
|
//Refresh the current region
|
||||||
regionNode := vstRegions.GetFirstSelected;
|
if FTempRegionNode <> nil then
|
||||||
|
regionNode := FTempRegionNode
|
||||||
|
else
|
||||||
|
regionNode := vstRegions.GetFirstSelected;
|
||||||
if regionNode <> nil then
|
if regionNode <> nil then
|
||||||
begin
|
begin
|
||||||
regionInfo := vstRegions.GetNodeData(regionNode);
|
regionInfo := vstRegions.GetNodeData(regionNode);
|
||||||
|
@ -251,25 +265,28 @@ begin
|
||||||
|
|
||||||
//Clear the selection
|
//Clear the selection
|
||||||
vstRegions.ClearSelection;
|
vstRegions.ClearSelection;
|
||||||
|
|
||||||
|
FTempRegionNode := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmRegionControl.mnuAddRegionClick(Sender: TObject);
|
procedure TfrmRegionControl.mnuAddRegionClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
regionName: string;
|
regionName: string;
|
||||||
node: PVirtualNode;
|
|
||||||
regionInfo: PRegionInfo;
|
regionInfo: PRegionInfo;
|
||||||
begin
|
begin
|
||||||
regionName := '';
|
regionName := '';
|
||||||
if InputQuery('New Region', 'Enter the name for the new region:', regionName) then
|
if InputQuery('New Region', 'Enter the name for the new region:', regionName) then
|
||||||
begin
|
begin
|
||||||
|
CheckUnsaved;
|
||||||
|
|
||||||
if FindRegion(regionName) = nil then
|
if FindRegion(regionName) = nil then
|
||||||
begin
|
begin
|
||||||
node := vstRegions.AddChild(nil);
|
FTempRegionNode := vstRegions.AddChild(nil);
|
||||||
regionInfo := vstRegions.GetNodeData(node);
|
regionInfo := vstRegions.GetNodeData(FTempRegionNode);
|
||||||
regionInfo^.Name := regionName;
|
regionInfo^.Name := regionName;
|
||||||
regionInfo^.Areas := TRectList.Create;
|
regionInfo^.Areas := TRectList.Create;
|
||||||
vstRegions.ClearSelection;
|
vstRegions.ClearSelection;
|
||||||
vstRegions.Selected[node] := True;
|
vstRegions.Selected[FTempRegionNode] := True;
|
||||||
btnSave.Enabled := True;
|
btnSave.Enabled := True;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
|
@ -279,7 +296,13 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmRegionControl.mnuRemoveRegionClick(Sender: TObject);
|
procedure TfrmRegionControl.FormClose(Sender: TObject;
|
||||||
|
var CloseAction: TCloseAction);
|
||||||
|
begin
|
||||||
|
CheckUnsaved;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmRegionControl.mnuDeleteRegionClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
regionNode: PVirtualNode;
|
regionNode: PVirtualNode;
|
||||||
regionInfo: PRegionInfo;
|
regionInfo: PRegionInfo;
|
||||||
|
@ -320,13 +343,6 @@ end;
|
||||||
|
|
||||||
procedure TfrmRegionControl.btnCloseClick(Sender: TObject);
|
procedure TfrmRegionControl.btnCloseClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if btnSave.Enabled and (MessageDlg('Unsaved changes', 'There are unsaved ' +
|
|
||||||
'changes.' + #13#10+#13#10+ 'Do you want to save them now?',
|
|
||||||
mtConfirmation, [mbYes, mbNo], 0) = mrYes) then
|
|
||||||
begin
|
|
||||||
btnSaveClick(Sender);
|
|
||||||
end;
|
|
||||||
|
|
||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -495,12 +511,7 @@ var
|
||||||
regionInfo: PRegionInfo;
|
regionInfo: PRegionInfo;
|
||||||
areaInfo: PRect;
|
areaInfo: PRect;
|
||||||
begin
|
begin
|
||||||
if btnSave.Enabled and (MessageDlg('Unsaved changes', 'There are unsaved ' +
|
CheckUnsaved;
|
||||||
'changes.' + #13#10+#13#10+ 'Do you want to save them now?',
|
|
||||||
mtConfirmation, [mbYes, mbNo], 0) = mrYes) then
|
|
||||||
begin
|
|
||||||
btnSaveClick(Sender);
|
|
||||||
end;
|
|
||||||
|
|
||||||
vstArea.BeginUpdate;
|
vstArea.BeginUpdate;
|
||||||
vstArea.Clear;
|
vstArea.Clear;
|
||||||
|
@ -509,7 +520,8 @@ begin
|
||||||
begin
|
begin
|
||||||
btnAddArea.Enabled := True;
|
btnAddArea.Enabled := True;
|
||||||
btnClearArea.Enabled := True;
|
btnClearArea.Enabled := True;
|
||||||
mnuRemoveRegion.Enabled := True;
|
mnuDeleteRegion.Enabled := (selected <> FTempRegionNode);
|
||||||
|
btnDeleteRegion.Enabled := (selected <> FTempRegionNode);
|
||||||
|
|
||||||
regionInfo := Sender.GetNodeData(selected);
|
regionInfo := Sender.GetNodeData(selected);
|
||||||
for i := 0 to regionInfo^.Areas.Count - 1 do
|
for i := 0 to regionInfo^.Areas.Count - 1 do
|
||||||
|
@ -529,7 +541,8 @@ begin
|
||||||
btnAddArea.Enabled := False;
|
btnAddArea.Enabled := False;
|
||||||
btnDeleteArea.Enabled := False;
|
btnDeleteArea.Enabled := False;
|
||||||
btnClearArea.Enabled := False;
|
btnClearArea.Enabled := False;
|
||||||
mnuRemoveRegion.Enabled := False;
|
mnuDeleteRegion.Enabled := False;
|
||||||
|
btnDeleteRegion.Enabled := False;
|
||||||
end;
|
end;
|
||||||
vstArea.EndUpdate;
|
vstArea.EndUpdate;
|
||||||
pbArea.Repaint;
|
pbArea.Repaint;
|
||||||
|
@ -574,6 +587,24 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmRegionControl.CheckUnsaved;
|
||||||
|
begin
|
||||||
|
if btnSave.Enabled then
|
||||||
|
begin
|
||||||
|
if MessageDlg('Unsaved changes', 'There are unsaved ' +
|
||||||
|
'changes.' + #13#10+#13#10+ 'Do you want to save them now?',
|
||||||
|
mtConfirmation, [mbYes, mbNo], 0) = mrYes then
|
||||||
|
begin
|
||||||
|
btnSaveClick(nil);
|
||||||
|
end else if FTempRegionNode <> nil then
|
||||||
|
begin
|
||||||
|
btnSave.Enabled := False;
|
||||||
|
vstRegions.DeleteNode(FTempRegionNode);
|
||||||
|
FTempRegionNode := nil;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmRegionControl.OnModifyRegionPacket(ABuffer: TEnhancedMemoryStream);
|
procedure TfrmRegionControl.OnModifyRegionPacket(ABuffer: TEnhancedMemoryStream);
|
||||||
var
|
var
|
||||||
regionName: string;
|
regionName: string;
|
||||||
|
|
Loading…
Reference in New Issue