- Updated to a recent VirtualTrees revision

- Updated README accordingly
This commit is contained in:
Andreas Schneider 2009-01-27 10:45:01 +01:00
parent e727aadcf2
commit 45537315b5
11 changed files with 393 additions and 379 deletions

View File

@ -1,12 +1,13 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="/"/>
<Version Value="6"/>
<Version Value="7"/>
<General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
</General>
<VersionInfo>
@ -51,7 +52,6 @@
<ComponentName Value="frmMain"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="UfrmMain.lrs"/>
<UnitName Value="UfrmMain"/>
</Unit1>
<Unit2>
@ -59,7 +59,6 @@
<ComponentName Value="dmNetwork"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="DataModule"/>
<ResourceFilename Value="UdmNetwork.lrs"/>
<UnitName Value="UdmNetwork"/>
</Unit2>
<Unit3>
@ -67,7 +66,6 @@
<ComponentName Value="frmLogin"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="UfrmLogin.lrs"/>
<UnitName Value="UfrmLogin"/>
</Unit3>
<Unit4>
@ -75,7 +73,6 @@
<ComponentName Value="frmInitialize"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="UfrmInitialize.lrs"/>
<UnitName Value="UfrmInitialize"/>
</Unit4>
<Unit5>
@ -83,7 +80,6 @@
<ComponentName Value="frmAccountControl"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="UfrmAccountControl.lrs"/>
<UnitName Value="UfrmAccountControl"/>
</Unit5>
<Unit6>
@ -91,7 +87,6 @@
<ComponentName Value="frmEditAccount"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="UfrmEditAccount.lrs"/>
<UnitName Value="UfrmEditAccount"/>
</Unit6>
<Unit7>
@ -99,7 +94,6 @@
<ComponentName Value="frmDrawSettings"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="Tools/UfrmDrawSettings.lrs"/>
<UnitName Value="UfrmDrawSettings"/>
</Unit7>
<Unit8>
@ -107,7 +101,6 @@
<ComponentName Value="frmBoundaries"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="Tools/UfrmBoundaries.lrs"/>
<UnitName Value="UfrmBoundaries"/>
</Unit8>
<Unit9>
@ -115,7 +108,6 @@
<ComponentName Value="frmElevateSettings"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="Tools/UfrmElevateSettings.lrs"/>
<UnitName Value="UfrmElevateSettings"/>
</Unit9>
<Unit10>
@ -133,7 +125,6 @@
<ComponentName Value="frmConfirmation"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="Tools/UfrmConfirmation.lrs"/>
<UnitName Value="UfrmConfirmation"/>
</Unit12>
<Unit13>
@ -141,7 +132,6 @@
<ComponentName Value="frmMoveSettings"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="Tools/UfrmMoveSettings.lrs"/>
<UnitName Value="UfrmMoveSettings"/>
</Unit13>
<Unit14>
@ -149,7 +139,6 @@
<ComponentName Value="frmAbout"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="UfrmAbout.lrs"/>
<UnitName Value="UfrmAbout"/>
</Unit14>
<Unit15>
@ -157,7 +146,6 @@
<ComponentName Value="frmHueSettings"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="Tools/UfrmHueSettings.lrs"/>
<UnitName Value="UfrmHueSettings"/>
</Unit15>
<Unit16>
@ -165,7 +153,6 @@
<ComponentName Value="frmRadarMap"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="UfrmRadar.lrs"/>
<UnitName Value="UfrmRadar"/>
</Unit16>
<Unit17>
@ -173,7 +160,6 @@
<ComponentName Value="frmLargeScaleCommand"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="UfrmLargeScaleCommand.lrs"/>
<UnitName Value="UfrmLargeScaleCommand"/>
</Unit17>
<Unit18>
@ -181,7 +167,6 @@
<ComponentName Value="frmVirtualLayer"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="Tools/UfrmVirtualLayer.lrs"/>
<UnitName Value="UfrmVirtualLayer"/>
</Unit18>
<Unit19>
@ -189,7 +174,6 @@
<ComponentName Value="frmFilter"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="Tools/UfrmFilter.lrs"/>
<UnitName Value="UfrmFilter"/>
</Unit19>
<Unit20>
@ -197,7 +181,6 @@
<ComponentName Value="frmTileInfo"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="UfrmTileInfo.lrs"/>
<UnitName Value="UfrmTileInfo"/>
</Unit20>
<Unit21>
@ -216,7 +199,6 @@
<HasResources Value="True"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="UfrmRegionControl.lrs"/>
<UnitName Value="UfrmRegionControl"/>
</Unit23>
<Unit24>

View File

@ -81,6 +81,20 @@ object frmFilter: TfrmFilter
Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
Header.Columns = <
item
Text = 'ID'
end
item
Position = 1
Width = 44
Text = 'Tile'
end
item
Position = 2
Width = 100
Text = 'Name'
end>
ParentFont = True
TabOrder = 0
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
@ -88,20 +102,6 @@ object frmFilter: TfrmFilter
OnDragOver = vdtFilterDragOver
OnDragDrop = vdtFilterDragDrop
OnDrawNode = vdtFilterDrawNode
Columns = <
item
WideText = 'ID'
end
item
Position = 1
Width = 44
WideText = 'Tile'
end
item
Position = 2
Width = 100
WideText = 'Name'
end>
end
object pnlControls: TPanel
Left = 4
@ -262,6 +262,20 @@ object frmFilter: TfrmFilter
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
Header.Columns = <
item
Width = 20
end
item
Position = 1
Width = 38
Text = 'Hue'
end
item
Position = 2
Width = 158
Text = 'Name'
end>
ParentFont = True
PopupMenu = pmHues
TabOrder = 1
@ -270,20 +284,6 @@ object frmFilter: TfrmFilter
TreeOptions.SelectionOptions = [toFullRowSelect]
OnChecked = vdtHuesChecked
OnDrawNode = vdtHuesDrawNode
Columns = <
item
Width = 20
end
item
Position = 1
Width = 38
WideText = 'Hue'
end
item
Position = 2
Width = 158
WideText = 'Name'
end>
end
end
object Splitter1: TSplitter

View File

@ -15,12 +15,13 @@ object frmAccountControl: TfrmAccountControl
OnDestroy = FormDestroy
OnShow = FormShow
Position = poOwnerFormCenter
LCLVersion = '0.9.25'
LCLVersion = '0.9.27'
object tbMain: TToolBar
Left = 0
Height = 26
Top = 0
Width = 369
Caption = 'tbMain'
Flat = True
Images = ilToolbar
TabOrder = 0
object tbRefresh: TToolButton
@ -72,16 +73,32 @@ object frmAccountControl: TfrmAccountControl
end
end
object vstAccounts: TVirtualStringTree
Left = 0
Height = 352
Top = 26
Width = 369
Align = alClient
DefaultText = 'Node'
Header.AutoSizeIndex = 1
Header.Columns = <
item
Position = 0
Width = 30
end
item
Position = 1
Text = 'Username'
Width = 200
end
item
Position = 2
Text = 'Accesslevel'
Width = 100
end>
Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsPlates
Images = ilAccesslevel
ParentFont = True
TabOrder = 1
TreeOptions.AutoOptions = [toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
@ -91,22 +108,9 @@ object frmAccountControl: TfrmAccountControl
OnFreeNode = vstAccountsFreeNode
OnGetText = vstAccountsGetText
OnGetImageIndex = vstAccountsGetImageIndex
Columns = <
item
Width = 30
end
item
Position = 1
Width = 200
WideText = 'Username'
end
item
Position = 2
Width = 100
WideText = 'Accesslevel'
end>
end
object ilToolbar: TImageList
Masked = False
left = 144
Bitmap = {
4C69040000001000000010000000000000000000000000000000000000000000
@ -241,6 +245,7 @@ object frmAccountControl: TfrmAccountControl
}
end
object ilAccesslevel: TImageList
Masked = False
left = 176
Bitmap = {
4C69040000001000000010000000000000000000000000000000000000000000

View File

@ -61,7 +61,7 @@ type
Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex;
var Ghosted: Boolean; var ImageIndex: Integer);
procedure vstAccountsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String);
protected
procedure OnModifyUserResponse(ABuffer: TEnhancedMemoryStream);
procedure OnDeleteUserResponse(ABuffer: TEnhancedMemoryStream);
@ -279,14 +279,14 @@ end;
procedure TfrmAccountControl.vstAccountsGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: WideString);
var CellText: UTF8String);
var
accountInfo: PAccountInfo;
begin
accountInfo := Sender.GetNodeData(Node);
case Column of
1: CellText := accountInfo^.Username;
2: CellText := GetAccessLevelString(accountInfo^.AccessLevel);
1: CellText := UTF8Encode(accountInfo^.Username);
2: CellText := UTF8Encode(GetAccessLevelString(accountInfo^.AccessLevel));
else
CellText := '';
end;

View File

@ -15,28 +15,33 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
OnShow = FormShow
Position = poOwnerFormCenter
ShowInTaskBar = stAlways
LCLVersion = '0.9.25'
LCLVersion = '0.9.27'
object nbActions: TNotebook
Left = 152
Height = 364
Top = 0
Width = 468
Align = alClient
PageIndex = 4
ParentFont = True
ShowTabs = False
TabOrder = 0
object pgArea: TPage
Caption = 'pgArea'
ClientWidth = 464
ClientHeight = 335
ParentFont = True
ClientWidth = 462
ClientHeight = 331
object sbArea: TScrollBox
Height = 335
Width = 464
Left = 0
Height = 331
Top = 0
Width = 462
Align = alClient
ClientHeight = 327
ClientWidth = 458
TabOrder = 0
object pbArea: TPaintBox
Left = 0
Height = 105
Top = 0
Width = 105
OnMouseDown = pbAreaMouseDown
OnMouseMove = pbAreaMouseMove
@ -46,9 +51,8 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
end
object pgCopyMove: TPage
Caption = 'Copy/Move'
ClientWidth = 464
ClientHeight = 335
ParentFont = True
ClientWidth = 462
ClientHeight = 331
object rgCMAction: TRadioGroup
Left = 12
Height = 40
@ -64,15 +68,14 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
ClientHeight = 23
ClientWidth = 180
ClientHeight = 24
ClientWidth = 182
Columns = 2
ItemIndex = 0
Items.Strings = (
'Copy'
'Move'
)
ParentFont = True
TabOrder = 0
end
object gbCMOffset: TGroupBox
@ -81,9 +84,8 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 60
Width = 121
Caption = 'Offset'
ClientHeight = 64
ClientWidth = 117
ParentFont = True
ClientHeight = 65
ClientWidth = 119
TabOrder = 1
object Label9: TLabel
Left = 6
@ -92,7 +94,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 12
Caption = 'X:'
ParentColor = False
ParentFont = True
end
object Label10: TLabel
Left = 6
@ -101,14 +102,12 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 12
Caption = 'Y:'
ParentColor = False
ParentFont = True
end
object seCMOffsetX: TSpinEdit
Left = 30
Height = 23
Top = 8
Width = 74
ParentFont = True
TabOrder = 0
end
object seCMOffsetY: TSpinEdit
@ -116,7 +115,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Height = 23
Top = 34
Width = 74
ParentFont = True
TabOrder = 1
end
end
@ -126,15 +124,13 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 148
Width = 174
Caption = 'Erase target area (at offset)'
ParentFont = True
TabOrder = 2
end
end
object pgModifyAltitude: TPage
Caption = 'Modify altitude'
ClientWidth = 464
ClientHeight = 335
ParentFont = True
ClientWidth = 462
ClientHeight = 331
object Label2: TLabel
Left = 28
Height = 43
@ -143,7 +139,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Caption = 'The statics will be elevated according to the terrain change.'
Enabled = False
ParentColor = False
ParentFont = True
WordWrap = True
end
object Label3: TLabel
@ -153,7 +148,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 125
Caption = 'Set the altitude to a value from this range:'
ParentColor = False
ParentFont = True
WordWrap = True
end
object Label4: TLabel
@ -163,7 +157,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 12
Caption = 'to'
ParentColor = False
ParentFont = True
end
object rbSetTerrainAltitude: TRadioButton
Left = 12
@ -172,7 +165,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 124
Caption = 'Set terrain altitude'
Checked = True
ParentFont = True
State = cbChecked
TabOrder = 0
end
@ -182,8 +174,8 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 84
Width = 156
Caption = 'Relative altitude change'
ParentFont = True
TabOrder = 1
TabStop = False
end
object seTerrainAltitude1: TSpinEdit
Left = 228
@ -192,7 +184,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 50
MaxValue = 127
MinValue = -128
ParentFont = True
TabOrder = 2
end
object seTerrainAltitude2: TSpinEdit
@ -202,7 +193,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 50
MaxValue = 127
MinValue = -128
ParentFont = True
TabOrder = 3
end
object seRelativeAltitude: TSpinEdit
@ -212,47 +202,44 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 50
MaxValue = 127
MinValue = -128
ParentFont = True
TabOrder = 4
end
end
object pgDrawTerrain: TPage
Caption = 'Draw Terrain'
ClientWidth = 464
ClientHeight = 335
ParentFont = True
ClientWidth = 462
ClientHeight = 331
object gbDrawTerrainTiles: TGroupBox
Left = 8
Height = 319
Height = 315
Top = 8
Width = 225
Align = alLeft
BorderSpacing.Around = 8
Caption = 'Tiles'
ClientHeight = 315
ClientWidth = 221
ParentFont = True
ClientHeight = 299
ClientWidth = 223
TabOrder = 0
object lblDrawTerrainTilesDesc: TLabel
Left = 4
Height = 58
Width = 213
Top = 0
Width = 215
Align = alTop
BorderSpacing.Left = 4
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
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.'
ParentColor = False
ParentFont = True
WordWrap = True
end
object vdtTerrainTiles: TVirtualDrawTree
Tag = 1
Cursor = 63
Left = 4
Height = 223
Height = 207
Top = 62
Width = 213
Width = 215
Align = alClient
BorderSpacing.Left = 4
BorderSpacing.Right = 4
@ -260,10 +247,25 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
DefaultNodeHeight = 44
DragMode = dmAutomatic
DragType = dtVCL
Header.AutoSizeIndex = 0
Header.Columns = <
item
Position = 0
Text = 'ID'
end
item
Position = 1
Text = 'Tile'
Width = 44
end
item
Position = 2
Text = 'Name'
Width = 100
end>
Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
ParentFont = True
TabOrder = 0
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toFullRowDrag]
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
@ -271,35 +273,22 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
OnDragOver = vdtTerrainTilesDragOver
OnDragDrop = vdtTerrainTilesDragDrop
OnDrawNode = vdtTerrainTilesDrawNode
Columns = <
item
WideText = 'ID'
end
item
Position = 1
Width = 44
WideText = 'Tile'
end
item
Position = 2
Width = 100
WideText = 'Name'
end>
end
object pnlDrawTerrainTilesControls: TPanel
Left = 0
Height = 26
Top = 289
Width = 221
Top = 273
Width = 223
Align = alBottom
BevelOuter = bvNone
ClientHeight = 26
ClientWidth = 221
ParentFont = True
ClientWidth = 223
TabOrder = 1
object btnClearTerrain: TSpeedButton
Left = 33
Height = 22
Hint = 'Clear'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -341,13 +330,13 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
NumGlyphs = 0
OnClick = btnClearTerrainClick
ShowHint = True
ParentFont = True
ParentShowHint = False
end
object btnDeleteTerrain: TSpeedButton
Left = 6
Height = 22
Hint = 'Delete'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -389,7 +378,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
NumGlyphs = 0
OnClick = btnDeleteTerrainClick
ShowHint = True
ParentFont = True
ParentShowHint = False
end
end
@ -397,41 +385,39 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
end
object pgDeleteStatics: TPage
Caption = 'Delete statics'
ClientWidth = 464
ClientHeight = 360
ParentFont = True
ClientWidth = 462
ClientHeight = 358
object gbDeleteStaticsTiles: TGroupBox
Left = 8
Height = 344
Height = 342
Top = 8
Width = 225
Align = alLeft
BorderSpacing.Around = 8
Caption = 'Tiles'
ClientHeight = 329
ClientWidth = 221
ParentFont = True
ClientHeight = 328
ClientWidth = 223
TabOrder = 0
object lblDeleteStaticsTilesDesc: TLabel
Left = 4
Height = 78
Width = 213
Top = 0
Width = 215
Align = alTop
BorderSpacing.Left = 4
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
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.'
ParentColor = False
ParentFont = True
WordWrap = True
end
object vdtDeleteStaticsTiles: TVirtualDrawTree
Tag = 1
Cursor = 63
Left = 4
Height = 217
Height = 216
Top = 82
Width = 213
Width = 215
Align = alClient
BorderSpacing.Left = 4
BorderSpacing.Right = 4
@ -439,10 +425,25 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
DefaultNodeHeight = 44
DragMode = dmAutomatic
DragType = dtVCL
Header.AutoSizeIndex = 0
Header.Columns = <
item
Position = 0
Text = 'ID'
end
item
Position = 1
Text = 'Tile'
Width = 44
end
item
Position = 2
Text = 'Name'
Width = 100
end>
Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
ParentFont = True
TabOrder = 0
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toFullRowDrag]
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
@ -450,35 +451,22 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
OnDragOver = vdtTerrainTilesDragOver
OnDragDrop = vdtTerrainTilesDragDrop
OnDrawNode = vdtTerrainTilesDrawNode
Columns = <
item
WideText = 'ID'
end
item
Position = 1
Width = 44
WideText = 'Tile'
end
item
Position = 2
Width = 100
WideText = 'Name'
end>
end
object pnlDrawTerrainTilesControls2: TPanel
Left = 0
Height = 26
Top = 303
Width = 221
Top = 302
Width = 223
Align = alBottom
BevelOuter = bvNone
ClientHeight = 26
ClientWidth = 221
ParentFont = True
ClientWidth = 223
TabOrder = 1
object btnClearDStaticsTiles: TSpeedButton
Left = 33
Height = 22
Hint = 'Clear'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -520,13 +508,13 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
NumGlyphs = 0
OnClick = btnClearDStaticsTilesClick
ShowHint = True
ParentFont = True
ParentShowHint = False
end
object btnDeleteDStaticsTiles: TSpeedButton
Left = 6
Height = 22
Hint = 'Delete'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -568,7 +556,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
NumGlyphs = 0
OnClick = btnDeleteDStaticsTilesClick
ShowHint = True
ParentFont = True
ParentShowHint = False
end
end
@ -579,31 +566,29 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 8
Width = 185
Caption = 'Z Boundaries'
ClientHeight = 77
ClientWidth = 181
ParentFont = True
ClientHeight = 78
ClientWidth = 183
TabOrder = 1
object Label7: TLabel
Left = 4
Height = 30
Width = 173
Top = 0
Width = 175
Align = alTop
BorderSpacing.Left = 4
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
Caption = 'Only statics within this Z range will be deleted.'
ParentColor = False
ParentFont = True
WordWrap = True
end
object Label8: TLabel
Left = 64
Height = 14
Top = 42
Width = 12
Width = 11
Caption = 'to'
ParentColor = False
ParentFont = True
end
object seDeleteStaticsZ1: TSpinEdit
Left = 4
@ -612,7 +597,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 50
MaxValue = 127
MinValue = -128
ParentFont = True
TabOrder = 0
Value = -128
end
@ -623,7 +607,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 50
MaxValue = 127
MinValue = -128
ParentFont = True
TabOrder = 1
Value = 127
end
@ -631,40 +614,38 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
end
object pgInsertStatics: TPage
Caption = 'Insert statics'
ClientWidth = 464
ClientHeight = 335
ParentFont = True
ClientWidth = 462
ClientHeight = 331
object gbInserStaticsTiles: TGroupBox
Left = 8
Height = 319
Height = 315
Top = 8
Width = 225
Align = alLeft
BorderSpacing.Around = 8
Caption = 'Tiles'
ClientHeight = 315
ClientWidth = 221
ParentFont = True
ClientHeight = 299
ClientWidth = 223
TabOrder = 0
object lblInsertStaticsTiles: TLabel
Left = 4
Height = 58
Width = 213
Top = 0
Width = 215
Align = alTop
BorderSpacing.Left = 4
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
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.'
ParentColor = False
ParentFont = True
WordWrap = True
end
object vdtInsertStaticsTiles: TVirtualDrawTree
Tag = 1
Left = 4
Height = 223
Height = 207
Top = 62
Width = 213
Width = 215
Align = alClient
BorderSpacing.Left = 4
BorderSpacing.Right = 4
@ -672,10 +653,25 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
DefaultNodeHeight = 44
DragMode = dmAutomatic
DragType = dtVCL
Header.AutoSizeIndex = 0
Header.Columns = <
item
Position = 0
Text = 'ID'
end
item
Position = 1
Text = 'Tile'
Width = 44
end
item
Position = 2
Text = 'Name'
Width = 100
end>
Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
ParentFont = True
TabOrder = 0
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toFullRowDrag]
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
@ -683,35 +679,22 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
OnDragOver = vdtTerrainTilesDragOver
OnDragDrop = vdtTerrainTilesDragDrop
OnDrawNode = vdtTerrainTilesDrawNode
Columns = <
item
WideText = 'ID'
end
item
Position = 1
Width = 44
WideText = 'Tile'
end
item
Position = 2
Width = 100
WideText = 'Name'
end>
end
object pnlDrawTerrainTilesControls1: TPanel
Left = 0
Height = 26
Top = 289
Width = 221
Top = 273
Width = 223
Align = alBottom
BevelOuter = bvNone
ClientHeight = 26
ClientWidth = 221
ParentFont = True
ClientWidth = 223
TabOrder = 1
object btnClearIStaticsTiles: TSpeedButton
Left = 33
Height = 22
Hint = 'Clear'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -753,13 +736,13 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
NumGlyphs = 0
OnClick = btnClearIStaticsTilesClick
ShowHint = True
ParentFont = True
ParentShowHint = False
end
object btnDeleteIStaticsTiles: TSpeedButton
Left = 6
Height = 22
Hint = 'Delete'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -801,7 +784,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
NumGlyphs = 0
OnClick = btnDeleteIStaticsTilesClick
ShowHint = True
ParentFont = True
ParentShowHint = False
end
end
@ -812,21 +794,20 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 8
Width = 185
Caption = 'Probability'
ClientHeight = 67
ClientWidth = 181
ParentFont = True
ClientHeight = 68
ClientWidth = 183
TabOrder = 1
object Label5: TLabel
Left = 4
Height = 28
Width = 173
Top = 0
Width = 175
Align = alTop
BorderSpacing.Left = 4
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
Caption = 'A tile will only be placed with this probability:'
ParentColor = False
ParentFont = True
WordWrap = True
end
object Label6: TLabel
@ -836,14 +817,12 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 11
Caption = '%'
ParentColor = False
ParentFont = True
end
object seStaticsProbability: TSpinEdit
Left = 4
Height = 23
Top = 36
Width = 50
ParentFont = True
TabOrder = 0
Value = 100
end
@ -854,9 +833,8 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 100
Width = 185
Caption = 'Z Placement'
ClientHeight = 103
ClientWidth = 181
ParentFont = True
ClientHeight = 104
ClientWidth = 183
TabOrder = 2
object rbPlaceStaticsOnTerrain: TRadioButton
Left = 4
@ -865,7 +843,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 140
Caption = 'Place tiles on terrain'
Checked = True
ParentFont = True
State = cbChecked
TabOrder = 0
end
@ -875,8 +852,8 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 27
Width = 120
Caption = 'Place tiles on top'
ParentFont = True
TabOrder = 1
TabStop = False
end
object rbPlaceStaticsOnZ: TRadioButton
Left = 4
@ -884,28 +861,28 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 51
Width = 103
Caption = 'Place tiles on:'
ParentFont = True
TabOrder = 2
TabStop = False
end
object seInsertStaticsZ: TSpinEdit
Left = 24
Height = 23
Top = 75
Width = 50
ParentFont = True
TabOrder = 3
end
end
end
end
object pnlLeft: TPanel
Left = 0
Height = 364
Top = 0
Width = 152
Align = alLeft
BevelOuter = bvNone
ClientHeight = 364
ClientWidth = 152
ParentFont = True
TabOrder = 1
object Label1: TLabel
Left = 4
@ -917,16 +894,24 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
BorderSpacing.Right = 4
Caption = 'Area:'
ParentColor = False
ParentFont = True
end
object vstActions: TVirtualStringTree
Left = 0
Height = 136
Top = 0
Width = 152
Align = alTop
DefaultText = 'Node'
Header.AutoSizeIndex = 0
Header.Columns = <
item
Position = 0
Text = 'Actions'
Width = 152
end>
Header.Options = [hoAutoResize, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
ParentFont = True
TabOrder = 0
TreeOptions.MiscOptions = [toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
@ -934,11 +919,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
OnChange = vstActionsChange
OnGetText = vstActionsGetText
OnPaintText = vstActionsPaintText
Columns = <
item
Width = 152
WideText = 'Actions'
end>
end
object pnlAreaControls: TPanel
Left = 4
@ -950,7 +930,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
BevelOuter = bvNone
ClientHeight = 82
ClientWidth = 144
ParentFont = True
TabOrder = 1
object lblX: TLabel
Left = 4
@ -960,7 +939,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Caption = 'X'
Enabled = False
ParentColor = False
ParentFont = True
end
object lblY: TLabel
Left = 4
@ -970,12 +948,12 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Caption = 'Y'
Enabled = False
ParentColor = False
ParentFont = True
end
object btnAddArea: TSpeedButton
Left = 30
Height = 22
Hint = 'Add area'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -1017,13 +995,13 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
NumGlyphs = 0
OnClick = btnAddAreaClick
ShowHint = True
ParentFont = True
ParentShowHint = False
end
object btnDeleteArea: TSpeedButton
Left = 59
Height = 22
Hint = 'Delete area'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -1065,13 +1043,13 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
NumGlyphs = 0
OnClick = btnDeleteAreaClick
ShowHint = True
ParentFont = True
ParentShowHint = False
end
object btnClearArea: TSpeedButton
Left = 87
Height = 22
Hint = 'Delete all areas'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -1113,7 +1091,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
NumGlyphs = 0
OnClick = btnClearAreaClick
ShowHint = True
ParentFont = True
ParentShowHint = False
end
object seX1: TSpinEdit
@ -1123,7 +1100,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 50
Enabled = False
OnChange = seX1Change
ParentFont = True
TabOrder = 0
end
object seX2: TSpinEdit
@ -1133,7 +1109,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 50
Enabled = False
OnChange = seX1Change
ParentFont = True
TabOrder = 1
end
object seY1: TSpinEdit
@ -1143,7 +1118,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 50
Enabled = False
OnChange = seX1Change
ParentFont = True
TabOrder = 2
end
object seY2: TSpinEdit
@ -1153,7 +1127,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Width = 50
Enabled = False
OnChange = seX1Change
ParentFont = True
TabOrder = 3
end
end
@ -1167,6 +1140,9 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
BorderStyle = bsSingle
DefaultText = 'Node'
Header.AutoSizeIndex = 0
Header.Columns = <>
Header.MainColumn = -1
Header.Options = [hoColumnResize, hoDrag]
TabOrder = 2
@ -1174,7 +1150,6 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
TreeOptions.SelectionOptions = [toFullRowSelect]
OnChange = vstAreaChange
OnGetText = vstAreaGetText
Columns = <>
end
end
object pnlControls: TPanel
@ -1187,30 +1162,29 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
BevelOuter = bvNone
ClientHeight = 25
ClientWidth = 612
ParentFont = True
TabOrder = 2
object btnExecute: TButton
Left = 480
Height = 25
Top = 0
Width = 64
Align = alRight
BorderSpacing.Right = 4
BorderSpacing.InnerBorder = 4
Caption = 'Execute'
OnClick = btnExecuteClick
ParentFont = True
TabOrder = 0
end
object btnClose: TButton
Left = 548
Height = 25
Top = 0
Width = 64
Align = alRight
BorderSpacing.Left = 4
BorderSpacing.InnerBorder = 4
Caption = 'Close'
OnClick = btnCloseClick
ParentFont = True
TabOrder = 1
end
end

View File

@ -146,18 +146,18 @@ type
procedure vstActionsChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstActionsGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: WideString);
var CellText: UTF8String);
procedure vstActionsPaintText(Sender: TBaseVirtualTree;
const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
TextType: TVSTTextType);
procedure vstAreaChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstAreaGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String);
protected
FLastX: Integer;
FLastY: Integer;
FAreaMove: TAreaMove;
procedure AddNode(AActionID: Integer; ACaption: string);
procedure AddNode(AActionID: Integer; ACaption: UTF8String);
function FindNode(AActionID: Integer): PVirtualNode;
procedure SerializeTiles(ATileList: TVirtualDrawTree;
AStream: TEnhancedMemoryStream);
@ -178,7 +178,7 @@ type
PNodeInfo = ^TNodeInfo;
TNodeInfo = record
ActionID: Integer;
Caption: string;
Caption: UTF8String;
end;
PTileInfo = ^TTileInfo;
TTileInfo = record
@ -569,7 +569,7 @@ end;
procedure TfrmLargeScaleCommand.vstActionsGetText(
Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
TextType: TVSTTextType; var CellText: WideString);
TextType: TVSTTextType; var CellText: UTF8String);
var
nodeInfo: PNodeInfo;
begin
@ -612,7 +612,7 @@ end;
procedure TfrmLargeScaleCommand.vstAreaGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: WideString);
var CellText: UTF8String);
var
nodeInfo: ^TRect;
begin
@ -621,7 +621,7 @@ begin
nodeInfo^.Right, nodeInfo^.Bottom]);
end;
procedure TfrmLargeScaleCommand.AddNode(AActionID: Integer; ACaption: string);
procedure TfrmLargeScaleCommand.AddNode(AActionID: Integer; ACaption: UTF8String);
var
node: PVirtualNode;
nodeInfo: PNodeInfo;

View File

@ -1,7 +1,7 @@
object frmMain: TfrmMain
Left = 263
Left = 247
Height = 603
Top = 144
Top = 91
Width = 766
ActiveControl = pcLeft
Caption = 'UO CentrED'
@ -15,12 +15,12 @@ object frmMain: TfrmMain
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
ParentFont = False
Position = poScreenCenter
ShowInTaskBar = stAlways
LCLVersion = '0.9.27'
WindowState = wsMaximized
object pnlBottom: TPanel
Left = 0
Height = 31
Top = 549
Width = 766
@ -56,6 +56,7 @@ object frmMain: TfrmMain
object lblTip: TLabel
Left = 554
Height = 31
Top = 0
Width = 204
Align = alRight
Alignment = taRightJustify
@ -67,6 +68,7 @@ object frmMain: TfrmMain
object lblTipC: TLabel
Left = 530
Height = 31
Top = 0
Width = 24
Align = alRight
Caption = 'Tip: '
@ -104,6 +106,7 @@ object frmMain: TfrmMain
end
end
object pcLeft: TPageControl
Left = 0
Height = 525
Top = 24
Width = 224
@ -113,29 +116,31 @@ object frmMain: TfrmMain
TabOrder = 1
object tsTiles: TTabSheet
Caption = 'Tiles'
ClientHeight = 500
ClientWidth = 222
ClientHeight = 492
ClientWidth = 218
object pnlTileListSettings: TPanel
Left = 0
Height = 56
Width = 222
Top = 0
Width = 218
Align = alTop
BevelOuter = bvNone
ClientHeight = 56
ClientWidth = 222
ClientWidth = 218
TabOrder = 0
object lblFilter: TLabel
Left = 84
Height = 14
Top = 8
Width = 30
Width = 29
Caption = 'Filter:'
ParentColor = False
end
object cbTerrain: TCheckBox
Left = 4
Height = 18
Height = 22
Top = 8
Width = 57
Width = 60
Caption = 'Terrain'
Checked = True
OnChange = cbTerrainChange
@ -144,9 +149,9 @@ object frmMain: TfrmMain
end
object cbStatics: TCheckBox
Left = 4
Height = 18
Height = 22
Top = 32
Width = 56
Width = 60
Caption = 'Statics'
Checked = True
OnChange = cbStaticsChange
@ -164,14 +169,30 @@ object frmMain: TfrmMain
end
object vdtTiles: TVirtualDrawTree
Tag = 1
Height = 246
Left = 0
Height = 238
Top = 56
Width = 222
Width = 218
Align = alClient
DefaultNodeHeight = 44
DragMode = dmAutomatic
DragType = dtVCL
Header.AutoSizeIndex = 2
Header.Columns = <
item
Position = 0
Text = 'ID'
end
item
Position = 1
Text = 'Tile'
Width = 44
end
item
Position = 2
Text = 'Name'
Width = 100
end>
Header.MainColumn = 2
Header.Options = [hoVisible]
Header.ParentFont = True
@ -190,39 +211,43 @@ object frmMain: TfrmMain
OnKeyPress = vdtTilesKeyPress
OnMouseMove = vdtTilesMouseMove
OnScroll = vdtTilesScroll
Columns = <
item
WideText = 'ID'
end
item
Position = 1
Width = 44
WideText = 'Tile'
end
item
Position = 2
Width = 100
WideText = 'Name'
end>
end
object gbRandom: TGroupBox
Left = 0
Height = 193
Top = 307
Width = 222
Top = 299
Width = 218
Align = alBottom
Caption = 'Random pool'
ClientHeight = 179
ClientWidth = 220
ClientWidth = 216
TabOrder = 2
object vdtRandom: TVirtualDrawTree
Tag = 1
Cursor = 63
Left = 0
Height = 127
Top = 22
Width = 220
Width = 216
Align = alClient
DefaultNodeHeight = 44
DragType = dtVCL
Header.AutoSizeIndex = 0
Header.Columns = <
item
Position = 0
Text = 'ID'
end
item
Position = 1
Text = 'Tile'
Width = 44
end
item
Position = 2
Text = 'Name'
Width = 100
end>
Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
@ -235,33 +260,22 @@ object frmMain: TfrmMain
OnLoadNode = vdtRandomLoadNode
OnSaveNode = vdtRandomSaveNode
OnUpdating = vdtRandomUpdating
Columns = <
item
WideText = 'ID'
end
item
Position = 1
Width = 44
WideText = 'Tile'
end
item
Position = 2
Width = 100
WideText = 'Name'
end>
end
object pnlRandomControl: TPanel
Left = 0
Height = 22
Width = 220
Top = 0
Width = 216
Align = alTop
BevelOuter = bvNone
ClientHeight = 22
ClientWidth = 220
ClientWidth = 216
TabOrder = 1
object btnAddRandom: TSpeedButton
Left = 2
Height = 22
Hint = 'Add'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -309,6 +323,7 @@ object frmMain: TfrmMain
Left = 26
Height = 22
Hint = 'Delete'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -356,6 +371,7 @@ object frmMain: TfrmMain
Left = 50
Height = 22
Hint = 'Clear'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -404,17 +420,18 @@ object frmMain: TfrmMain
Left = 4
Height = 22
Top = 153
Width = 212
Width = 208
Align = alBottom
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 22
ClientWidth = 212
ClientWidth = 208
TabOrder = 2
object btnRandomPresetSave: TSpeedButton
Left = 158
Height = 22
Hint = 'Save Preset'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -463,6 +480,7 @@ object frmMain: TfrmMain
Left = 182
Height = 22
Hint = 'Delete Preset'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -508,9 +526,13 @@ object frmMain: TfrmMain
ParentShowHint = False
end
object cbRandomPreset: TComboBox
Height = 25
Left = 0
Height = 29
Top = 0
Width = 152
MaxLength = -1
AutoComplete = False
ItemHeight = 0
ItemWidth = 0
OnChange = cbRandomPresetChange
Style = csDropDownList
TabOrder = 0
@ -519,9 +541,10 @@ object frmMain: TfrmMain
end
object spTileList: TSplitter
Cursor = crVSplit
Left = 0
Height = 5
Top = 302
Width = 222
Top = 294
Width = 218
Align = alBottom
ResizeAnchor = akBottom
end
@ -542,12 +565,15 @@ object frmMain: TfrmMain
end
object tsClients: TTabSheet
Caption = 'Clients'
ClientHeight = 500
ClientWidth = 222
ClientHeight = 492
ClientWidth = 218
object lbClients: TListBox
Height = 500
Width = 222
Left = 0
Height = 492
Top = 0
Width = 218
Align = alClient
ItemHeight = 0
OnDblClick = mnuGoToClientClick
PopupMenu = pmClients
Sorted = True
@ -557,18 +583,30 @@ object frmMain: TfrmMain
end
object tsLocations: TTabSheet
Caption = 'Locations'
ClientHeight = 500
ClientWidth = 222
ClientHeight = 492
ClientWidth = 218
object vstLocations: TVirtualStringTree
Cursor = 63
Left = 4
Height = 464
Height = 456
Top = 4
Width = 214
Width = 210
Align = alClient
BorderSpacing.Around = 4
BorderStyle = bsSingle
DefaultText = 'Node'
Header.AutoSizeIndex = 1
Header.Columns = <
item
Position = 0
Text = 'Coords'
Width = 75
end
item
Position = 1
Text = 'Name'
Width = 135
end>
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
@ -582,32 +620,23 @@ object frmMain: TfrmMain
OnLoadNode = vstLocationsLoadNode
OnNewText = vstLocationsNewText
OnSaveNode = vstLocationsSaveNode
Columns = <
item
Width = 75
WideText = 'Coords'
end
item
Position = 1
Width = 139
WideText = 'Name'
end>
end
object pnlLocationControls: TPanel
Left = 4
Height = 24
Top = 472
Width = 214
Top = 464
Width = 210
Align = alBottom
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 24
ClientWidth = 214
ClientWidth = 210
TabOrder = 1
object btnClearLocations: TSpeedButton
Left = 112
Height = 22
Hint = 'Clear'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -655,6 +684,7 @@ object frmMain: TfrmMain
Left = 88
Height = 22
Hint = 'Delete'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -702,6 +732,7 @@ object frmMain: TfrmMain
Left = 64
Height = 22
Hint = 'Add'
Top = 0
Width = 23
Color = clBtnFace
Glyph.Data = {
@ -749,10 +780,11 @@ object frmMain: TfrmMain
end
end
object tbMain: TToolBar
Left = 0
Height = 24
Top = 0
Width = 766
Caption = 'tbMain'
Flat = True
Images = ImageList1
ParentShowHint = False
ShowHint = True
@ -775,7 +807,6 @@ object frmMain: TfrmMain
end
object tbSelect: TToolButton
Left = 40
Hint = 'Select'
Top = 2
Action = acSelect
Grouped = True
@ -785,7 +816,6 @@ object frmMain: TfrmMain
end
object tbDrawTile: TToolButton
Left = 63
Hint = 'Draw tiles'
Top = 2
Action = acDraw
Grouped = True
@ -795,7 +825,6 @@ object frmMain: TfrmMain
end
object tbMoveTile: TToolButton
Left = 86
Hint = 'Move tiles'
Top = 2
Action = acMove
Grouped = True
@ -805,7 +834,6 @@ object frmMain: TfrmMain
end
object tbElevateTile: TToolButton
Left = 109
Hint = 'Elevate tiles'
Top = 2
Action = acElevate
Grouped = True
@ -815,7 +843,6 @@ object frmMain: TfrmMain
end
object tbDeleteTile: TToolButton
Left = 132
Hint = 'Delete tiles'
Top = 2
Action = acDelete
Grouped = True
@ -825,7 +852,6 @@ object frmMain: TfrmMain
end
object tbSetHue: TToolButton
Left = 155
Hint = 'Hue tiles'
Top = 2
Action = acHue
Grouped = True
@ -842,7 +868,6 @@ object frmMain: TfrmMain
end
object tbBoundaries: TToolButton
Left = 193
Hint = 'Boundaries'
Top = 2
Action = acBoundaries
ParentShowHint = False
@ -896,13 +921,11 @@ object frmMain: TfrmMain
end
object tbVirtualLayer: TToolButton
Left = 216
Hint = 'Virtual Layer'
Top = 2
Action = acVirtualLayer
end
object tbFilter: TToolButton
Left = 239
Hint = 'Filter'
Top = 2
Action = acFilter
Style = tbsCheck
@ -910,14 +933,12 @@ object frmMain: TfrmMain
end
object tbFlat: TToolButton
Left = 346
Hint = 'Flat view'
Top = 2
Action = acFlat
Style = tbsCheck
end
object tbNoDraw: TToolButton
Left = 323
Hint = 'Display "No Draw" tiles'
Top = 2
Action = acNoDraw
Style = tbsCheck
@ -934,7 +955,9 @@ object frmMain: TfrmMain
ClientWidth = 542
TabOrder = 3
object oglGameWindow: TOpenGLControl
Left = 0
Height = 374
Top = 0
Width = 542
Align = alClient
OnDblClick = oglGameWindowDblClick
@ -947,6 +970,7 @@ object frmMain: TfrmMain
OnPaint = oglGameWindowPaint
end
object pnlChatHeader: TPanel
Left = 0
Height = 24
Top = 374
Width = 542
@ -973,6 +997,7 @@ object frmMain: TfrmMain
end
end
object pnlChat: TPanel
Left = 0
Height = 122
Top = 403
Width = 542
@ -984,10 +1009,29 @@ object frmMain: TfrmMain
Visible = False
object vstChat: TVirtualStringTree
Cursor = 63
Left = 0
Height = 99
Top = 0
Width = 542
Align = alClient
DefaultText = 'Node'
Header.AutoSizeIndex = 2
Header.Columns = <
item
Position = 0
Text = 'Time'
Width = 75
end
item
Position = 1
Text = 'Sender'
Width = 75
end
item
Position = 2
Text = 'Message'
Width = 392
end>
Header.MainColumn = 2
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
@ -1000,23 +1044,9 @@ object frmMain: TfrmMain
OnFreeNode = vstChatFreeNode
OnGetText = vstChatGetText
OnPaintText = vstChatPaintText
Columns = <
item
Width = 75
WideText = 'Time'
end
item
Position = 1
Width = 75
WideText = 'Sender'
end
item
Position = 2
Width = 392
WideText = 'Message'
end>
end
object edChat: TEdit
Left = 0
Height = 23
Top = 99
Width = 542
@ -1027,6 +1057,7 @@ object frmMain: TfrmMain
end
object spChat: TSplitter
Cursor = crVSplit
Left = 0
Height = 5
Top = 398
Width = 542
@ -1312,6 +1343,7 @@ object frmMain: TfrmMain
end
end
object ImageList1: TImageList
Masked = False
left = 264
top = 32
Bitmap = {
@ -1972,6 +2004,7 @@ object frmMain: TfrmMain
HintHidePause = 2500
HintPause = 500
HintShortCuts = True
HintShortPause = 0
ShowHint = True
OnIdle = ApplicationProperties1Idle
left = 295

View File

@ -249,7 +249,7 @@ type
procedure vstChatClick(Sender: TObject);
procedure vstChatFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstChatGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String);
procedure vstChatPaintText(Sender: TBaseVirtualTree;
const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
TextType: TVSTTextType);
@ -257,7 +257,7 @@ type
procedure vstLocationsFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode
);
procedure vstLocationsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String);
procedure vstLocationsLoadNode(Sender: TBaseVirtualTree;
Node: PVirtualNode; Stream: TStream);
procedure vstLocationsNewText(Sender: TBaseVirtualTree; Node: PVirtualNode;
@ -1391,15 +1391,15 @@ begin
end;
procedure TfrmMain.vstChatGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String);
var
chatInfo: PChatInfo;
begin
chatInfo := Sender.GetNodeData(Node);
case Column of
0: CellText := TimeToStr(chatInfo^.Time);
1: CellText := chatInfo^.Sender;
2: CellText := chatInfo^.Msg;
0: CellText := UTF8Encode(TimeToStr(chatInfo^.Time));
1: CellText := UTF8Encode(chatInfo^.Sender);
2: CellText := UTF8Encode(chatInfo^.Msg);
end;
end;
@ -1443,14 +1443,14 @@ end;
procedure TfrmMain.vstLocationsGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: WideString);
var CellText: UTF8String);
var
locationInfo: PLocationInfo;
begin
locationInfo := Sender.GetNodeData(Node);
case Column of
0: CellText := Format('%d, %d', [locationInfo^.X, locationInfo^.Y]);
1: CellText := locationInfo^.Name;
0: CellText := UTF8Encode(Format('%d, %d', [locationInfo^.X, locationInfo^.Y]));
1: CellText := UTF8Encode(locationInfo^.Name);
end;
end;

View File

@ -3,6 +3,7 @@ object frmRegionControl: TfrmRegionControl
Height = 413
Top = 139
Width = 620
ActiveControl = Panel1
Caption = 'Region Control'
ClientHeight = 413
ClientWidth = 620
@ -11,12 +12,13 @@ object frmRegionControl: TfrmRegionControl
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
ParentFont = False
Position = poOwnerFormCenter
ShowInTaskBar = stAlways
LCLVersion = '0.9.27'
object Panel1: TPanel
Left = 0
Height = 380
Top = 0
Width = 160
Align = alLeft
ClientHeight = 380
@ -66,6 +68,7 @@ object frmRegionControl: TfrmRegionControl
Left = 30
Height = 22
Hint = 'Add area'
Top = 0
Width = 23
Color = clBtnFace
Enabled = False
@ -114,6 +117,7 @@ object frmRegionControl: TfrmRegionControl
Left = 59
Height = 22
Hint = 'Delete area'
Top = 0
Width = 23
Color = clBtnFace
Enabled = False
@ -162,6 +166,7 @@ object frmRegionControl: TfrmRegionControl
Left = 87
Height = 22
Hint = 'Delete all areas'
Top = 0
Width = 23
Color = clBtnFace
Enabled = False
@ -253,6 +258,9 @@ object frmRegionControl: TfrmRegionControl
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
BorderStyle = bsSingle
DefaultText = 'Node'
Header.AutoSizeIndex = 0
Header.Columns = <>
Header.MainColumn = -1
Header.Options = [hoColumnResize, hoDrag]
TabOrder = 1
@ -260,7 +268,6 @@ object frmRegionControl: TfrmRegionControl
TreeOptions.SelectionOptions = [toFullRowSelect]
OnChange = vstAreaChange
OnGetText = vstAreaGetText
Columns = <>
end
object spRegionsArea: TSplitter
Cursor = crVSplit
@ -284,9 +291,19 @@ object frmRegionControl: TfrmRegionControl
ClientWidth = 158
TabOrder = 3
object vstRegions: TVirtualStringTree
Left = 0
Height = 144
Top = 0
Width = 158
Align = alClient
DefaultText = 'Node'
Header.AutoSizeIndex = 0
Header.Columns = <
item
Position = 0
Text = 'Regions'
Width = 158
end>
Header.Options = [hoAutoResize, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
@ -298,13 +315,9 @@ object frmRegionControl: TfrmRegionControl
OnChange = vstRegionsChange
OnFreeNode = vstRegionsFreeNode
OnGetText = vstRegionsGetText
Columns = <
item
Width = 158
WideText = 'Regions'
end>
end
object Panel5: TPanel
Left = 0
Height = 26
Top = 144
Width = 158
@ -416,6 +429,7 @@ object frmRegionControl: TfrmRegionControl
object Panel2: TPanel
Left = 160
Height = 380
Top = 0
Width = 460
Align = alClient
Caption = 'Panel2'
@ -428,9 +442,13 @@ object frmRegionControl: TfrmRegionControl
Top = 1
Width = 458
Align = alClient
ClientHeight = 378
ClientWidth = 458
TabOrder = 0
object pbArea: TPaintBox
Left = 0
Height = 105
Top = 0
Width = 105
OnMouseDown = pbAreaMouseDown
OnMouseMove = pbAreaMouseMove
@ -452,6 +470,7 @@ object frmRegionControl: TfrmRegionControl
object btnClose: TButton
Left = 548
Height = 25
Top = 0
Width = 64
Align = alRight
Anchors = [akTop, akRight]
@ -463,6 +482,7 @@ object frmRegionControl: TfrmRegionControl
object btnSave: TButton
Left = 480
Height = 25
Top = 0
Width = 64
Align = alRight
Anchors = [akTop, akRight]

View File

@ -99,11 +99,11 @@ type
procedure seX1Change(Sender: TObject);
procedure vstAreaChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstAreaGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String);
procedure vstRegionsChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstRegionsFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstRegionsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String);
protected
FLastX: Integer;
FLastY: Integer;
@ -494,7 +494,7 @@ end;
procedure TfrmRegionControl.vstAreaGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: WideString);
var CellText: UTF8String);
var
areaInfo: PRect;
begin
@ -562,12 +562,12 @@ end;
procedure TfrmRegionControl.vstRegionsGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: WideString);
var CellText: UTF8String);
var
regionInfo: PRegionInfo;
begin
regionInfo := Sender.GetNodeData(Node);
CellText := regionInfo^.Name;
CellText := UTF8Encode(regionInfo^.Name);
end;
function TfrmRegionControl.FindRegion(AName: string): PVirtualNode;

10
README
View File

@ -1,4 +1,4 @@
CentrED (c) 2007 Andreas Schneider
CentrED (c) 2009 Andreas Schneider
==================================
License
@ -10,10 +10,10 @@ at http://www.opensource.org/licenses/cddl1.php.
Compiling
=========
To build CentrED you need at least FreePascal 2.2.0 and a
recent Lazarus (at least 0.9.24).
To build CentrED you need at least FreePascal 2.2.2 and a
recent Lazarus (at least 0.9.26).
You also have to have the following packages installed:
- VirtualTrees from https://luipack.bountysource.com/wiki/virtualtreeview
- VirtualTrees from http://code.google.com/p/luipack/wiki/VirtualTreeview
- LazOpenGLContext (included with Lazarus)
- lNet by Almindor: http://wiki.lazarus.freepascal.org/lNet
@ -42,5 +42,5 @@ Thanks
Almindor for lNet and his support on how to use it efficently.
Marek Mauder for the great Vampyre Imaging Library and also his support and extensions.
Luiz Américo Pereira Câmara for his nice port of VirtualTrees.
And last bot not least the whole FPC and Lazarus team for developing, maintaining
And last but not least the whole FPC and Lazarus team for developing, maintaining
and supporting such great development tools, which make life a lot easier.