* Added CentrED+ code (thanks to StaticZ for his awesome work!)
This commit is contained in:
@@ -1,47 +1,313 @@
|
||||
inherited frmBoundaries: TfrmBoundaries
|
||||
Left = 290
|
||||
Height = 164
|
||||
Top = 171
|
||||
Width = 205
|
||||
Caption = 'Boundaries'
|
||||
ClientHeight = 164
|
||||
ClientWidth = 205
|
||||
object lblMaxZ: TLabel[0]
|
||||
Left = 1259
|
||||
Height = 141
|
||||
Top = 502
|
||||
Width = 403
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
Caption = 'Границы видимости'
|
||||
ClientHeight = 141
|
||||
ClientWidth = 403
|
||||
OnCreate = FormCreate
|
||||
object tbMaxZ: TTrackBar[0]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = seMaxZ
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 8
|
||||
Height = 16
|
||||
Top = 89
|
||||
Width = 68
|
||||
BorderSpacing.Left = 8
|
||||
Caption = 'Maximum Z:'
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object lblMinZ: TLabel[1]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = seMinZ
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 8
|
||||
Height = 16
|
||||
Top = 12
|
||||
Width = 67
|
||||
BorderSpacing.Left = 8
|
||||
Caption = 'Minimum Z:'
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object tbMinZ: TTrackBar[2]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = seMinZ
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideTop.Control = tbMinZ
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 36
|
||||
Top = 41
|
||||
Width = 189
|
||||
Height = 30
|
||||
Top = 28
|
||||
Width = 387
|
||||
Frequency = 10
|
||||
Max = 127
|
||||
Min = -128
|
||||
OnChange = tbMaxZChange
|
||||
PageSize = 1
|
||||
Position = 127
|
||||
TickMarks = tmTopLeft
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 20
|
||||
BorderSpacing.Right = 8
|
||||
TabOrder = 1
|
||||
end
|
||||
object GroupBox1: TGroupBox[1]
|
||||
AnchorSideLeft.Control = tbMaxZ
|
||||
AnchorSideTop.Control = tbMaxZ
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = tbMaxZ
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 216
|
||||
Height = 72
|
||||
Top = 60
|
||||
Width = 179
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Bottom = 4
|
||||
Caption = 'Границы высоты'
|
||||
ClientHeight = 54
|
||||
ClientWidth = 175
|
||||
TabOrder = 2
|
||||
object seMinZ: TSpinEdit
|
||||
AnchorSideTop.Control = GroupBox1
|
||||
AnchorSideRight.Control = GroupBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 119
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 48
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
OnChange = seMinZChange
|
||||
TabOrder = 0
|
||||
Value = -128
|
||||
end
|
||||
object seMaxZ: TSpinEdit
|
||||
AnchorSideTop.Control = seMinZ
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = GroupBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 119
|
||||
Height = 23
|
||||
Top = 28
|
||||
Width = 48
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 5
|
||||
BorderSpacing.Right = 8
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
OnChange = seMaxZChange
|
||||
TabOrder = 1
|
||||
Value = 127
|
||||
end
|
||||
object lblMinZ: TLabel
|
||||
AnchorSideLeft.Control = GroupBox1
|
||||
AnchorSideTop.Control = seMinZ
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 8
|
||||
Height = 16
|
||||
Top = 3
|
||||
Width = 93
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Z Минимальная:'
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object lblMaxZ: TLabel
|
||||
AnchorSideLeft.Control = lblMinZ
|
||||
AnchorSideTop.Control = seMaxZ
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 8
|
||||
Height = 16
|
||||
Top = 31
|
||||
Width = 97
|
||||
Caption = 'Z Максимальная:'
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object GroupBox2: TGroupBox[2]
|
||||
AnchorSideLeft.Control = tbMaxZ
|
||||
AnchorSideTop.Control = GroupBox1
|
||||
AnchorSideRight.Control = GroupBox1
|
||||
AnchorSideBottom.Control = GroupBox1
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 72
|
||||
Top = 60
|
||||
Width = 201
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Right = 7
|
||||
Caption = 'Границы дальности обзора'
|
||||
ClientHeight = 54
|
||||
ClientWidth = 197
|
||||
TabOrder = 3
|
||||
object seMaxX: TSpinEdit
|
||||
AnchorSideTop.Control = GroupBox2
|
||||
AnchorSideRight.Control = GroupBox2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 137
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 54
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 6
|
||||
MaxValue = 12288
|
||||
OnChange = seMaxXChange
|
||||
TabOrder = 0
|
||||
Value = 12288
|
||||
end
|
||||
object seMaxY: TSpinEdit
|
||||
AnchorSideTop.Control = seMaxX
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = GroupBox2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 137
|
||||
Height = 23
|
||||
Top = 28
|
||||
Width = 54
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 5
|
||||
BorderSpacing.Right = 6
|
||||
MaxValue = 8192
|
||||
OnChange = seMaxYChange
|
||||
TabOrder = 1
|
||||
Value = 8192
|
||||
end
|
||||
object seMinY: TSpinEdit
|
||||
AnchorSideTop.Control = seMaxY
|
||||
AnchorSideRight.Control = seMaxY
|
||||
Left = 64
|
||||
Height = 23
|
||||
Top = 28
|
||||
Width = 54
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 19
|
||||
MaxValue = 8192
|
||||
OnChange = seMinYChange
|
||||
TabOrder = 2
|
||||
end
|
||||
object seMinX: TSpinEdit
|
||||
AnchorSideTop.Control = seMaxX
|
||||
AnchorSideRight.Control = seMaxX
|
||||
Left = 64
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 54
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 19
|
||||
MaxValue = 12288
|
||||
OnChange = seMinXChange
|
||||
TabOrder = 3
|
||||
end
|
||||
object lblAxeX: TLabel
|
||||
AnchorSideLeft.Control = sbClearXbnd
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = seMinZ
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 23
|
||||
Height = 16
|
||||
Top = 3
|
||||
Width = 35
|
||||
BorderSpacing.Left = 3
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Ось X:'
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object lblAxeY: TLabel
|
||||
AnchorSideLeft.Control = sbClearYbnd
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = seMinZ
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 23
|
||||
Height = 16
|
||||
Top = 31
|
||||
Width = 35
|
||||
BorderSpacing.Left = 3
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Ось Y:'
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object lblAxeX1: TLabel
|
||||
AnchorSideLeft.Control = seMinX
|
||||
AnchorSideTop.Control = seMaxX
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = seMaxX
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 112
|
||||
Height = 16
|
||||
Top = 3
|
||||
Width = 31
|
||||
Alignment = taCenter
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 48
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 48
|
||||
Caption = '—'
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object lblAxeY1: TLabel
|
||||
AnchorSideLeft.Control = seMinY
|
||||
AnchorSideTop.Control = seMaxY
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = seMaxY
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 112
|
||||
Height = 16
|
||||
Top = 31
|
||||
Width = 31
|
||||
Alignment = taCenter
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 48
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 48
|
||||
Caption = '—'
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object sbClearXbnd: TSpeedButton
|
||||
AnchorSideLeft.Control = GroupBox2
|
||||
AnchorSideTop.Control = seMaxX
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = lblAxeX
|
||||
Left = 4
|
||||
Height = 16
|
||||
Top = 3
|
||||
Width = 16
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Right = 2
|
||||
Caption = '✇'
|
||||
Font.CharSet = RUSSIAN_CHARSET
|
||||
Font.Height = -8
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Pitch = fpVariable
|
||||
Font.Quality = fqDraft
|
||||
NumGlyphs = 0
|
||||
OnClick = sbClearXbndClick
|
||||
ShowHint = True
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
end
|
||||
object sbClearYbnd: TSpeedButton
|
||||
AnchorSideLeft.Control = GroupBox2
|
||||
AnchorSideTop.Control = seMaxY
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = lblAxeX
|
||||
Left = 4
|
||||
Height = 16
|
||||
Top = 31
|
||||
Width = 16
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Right = 2
|
||||
Caption = '✇'
|
||||
Font.CharSet = RUSSIAN_CHARSET
|
||||
Font.Height = -8
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Pitch = fpVariable
|
||||
Font.Quality = fqDraft
|
||||
NumGlyphs = 0
|
||||
OnClick = sbClearYbndClick
|
||||
ShowHint = True
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
end
|
||||
end
|
||||
object tbMinZ: TTrackBar[3]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 30
|
||||
Top = 8
|
||||
Width = 387
|
||||
Frequency = 10
|
||||
Max = 127
|
||||
Min = -128
|
||||
@@ -52,58 +318,7 @@ inherited frmBoundaries: TfrmBoundaries
|
||||
BorderSpacing.Around = 8
|
||||
TabOrder = 0
|
||||
end
|
||||
object tbMaxZ: TTrackBar[3]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = seMaxZ
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 36
|
||||
Top = 118
|
||||
Width = 189
|
||||
Frequency = 10
|
||||
Max = 127
|
||||
Min = -128
|
||||
OnChange = tbMaxZChange
|
||||
PageSize = 1
|
||||
Position = 127
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 8
|
||||
TabOrder = 1
|
||||
end
|
||||
object seMaxZ: TSpinEdit[4]
|
||||
AnchorSideTop.Control = tbMinZ
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 149
|
||||
Height = 25
|
||||
Top = 85
|
||||
Width = 48
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
OnChange = seMaxZChange
|
||||
TabOrder = 2
|
||||
Value = 127
|
||||
end
|
||||
object seMinZ: TSpinEdit[5]
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 149
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 48
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 8
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
OnChange = seMinZChange
|
||||
TabOrder = 3
|
||||
Value = -128
|
||||
inherited tmClose: TTimer[4]
|
||||
left = 312
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,20 +31,39 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
ComCtrls, Spin, ExtCtrls, UfrmToolWindow;
|
||||
ComCtrls, Spin, ExtCtrls, Buttons, UfrmToolWindow;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmBoundaries }
|
||||
|
||||
TfrmBoundaries = class(TfrmToolWindow)
|
||||
GroupBox1: TGroupBox;
|
||||
GroupBox2: TGroupBox;
|
||||
lblAxeX1: TLabel;
|
||||
lblAxeY1: TLabel;
|
||||
lblMaxZ: TLabel;
|
||||
lblMinZ: TLabel;
|
||||
lblAxeX: TLabel;
|
||||
lblAxeY: TLabel;
|
||||
seMaxZ: TSpinEdit;
|
||||
seMinZ: TSpinEdit;
|
||||
seMaxX: TSpinEdit;
|
||||
seMaxY: TSpinEdit;
|
||||
seMinY: TSpinEdit;
|
||||
seMinX: TSpinEdit;
|
||||
sbClearXbnd: TSpeedButton;
|
||||
sbClearYbnd: TSpeedButton;
|
||||
tbMinZ: TTrackBar;
|
||||
tbMaxZ: TTrackBar;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure sbClearXbndClick(Sender: TObject);
|
||||
procedure sbClearYbndClick(Sender: TObject);
|
||||
procedure seMaxXChange(Sender: TObject);
|
||||
procedure seMaxYChange(Sender: TObject);
|
||||
procedure seMaxZChange(Sender: TObject);
|
||||
procedure seMinXChange(Sender: TObject);
|
||||
procedure seMinYChange(Sender: TObject);
|
||||
procedure seMinZChange(Sender: TObject);
|
||||
procedure tbMaxZChange(Sender: TObject);
|
||||
procedure tbMinZChange(Sender: TObject);
|
||||
@@ -58,30 +77,101 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
UfrmMain;
|
||||
UfrmMain, Language;
|
||||
|
||||
{ TfrmBoundaries }
|
||||
|
||||
procedure TfrmBoundaries.seMaxZChange(Sender: TObject);
|
||||
procedure TfrmBoundaries.FormCreate(Sender: TObject);
|
||||
begin
|
||||
tbMaxZ.Position := seMaxZ.Value;
|
||||
LanguageTranslate(Self);
|
||||
seMaxX.MaxValue := 8*frmMain.Landscape.Width-1;
|
||||
seMinX.MaxValue := seMaxX.MaxValue; seMaxX.Value := seMaxX.MaxValue;
|
||||
seMaxY.MaxValue := 8*frmMain.Landscape.Height-1;
|
||||
seMinY.MaxValue := seMaxY.MaxValue; seMaxY.Value := seMaxY.MaxValue;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.sbClearXbndClick(Sender: TObject);
|
||||
begin
|
||||
seMinX.Value := seMinX.MinValue;
|
||||
seMaxX.Value := seMaxX.MaxValue;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.sbClearYbndClick(Sender: TObject);
|
||||
begin
|
||||
seMinY.Value := seMinY.MinValue;
|
||||
seMaxY.Value := seMaxY.MaxValue;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.seMinXChange(Sender: TObject);
|
||||
begin
|
||||
if (seMaxX.Value <= seMinX.Value) then if (seMinX.Value < seMaxX.MaxValue)
|
||||
then seMaxX.Value := seMinX.Value+1
|
||||
else seMaxX.Value := seMaxX.MaxValue;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.seMaxXChange(Sender: TObject);
|
||||
begin
|
||||
if (seMinX.Value >= seMaxX.Value) then if (seMaxX.Value > seMinX.MinValue)
|
||||
then seMinX.Value := seMaxX.Value-1
|
||||
else seMinX.Value := seMinX.MinValue;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.seMinYChange(Sender: TObject);
|
||||
begin
|
||||
if (seMaxY.Value <= seMinY.Value) then if (seMinY.Value < seMaxY.MaxValue)
|
||||
then seMaxY.Value := seMinY.Value+1
|
||||
else seMaxY.Value := seMaxY.MaxValue;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.seMaxYChange(Sender: TObject);
|
||||
begin
|
||||
if (seMinY.Value >= seMaxY.Value) then if (seMaxY.Value > seMinY.MinValue)
|
||||
then seMinY.Value := seMaxY.Value-1
|
||||
else seMinY.Value := seMinY.MinValue;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.seMinZChange(Sender: TObject);
|
||||
begin
|
||||
if (seMaxZ.Value <= seMinZ.Value) then if (seMinZ.Value < seMaxZ.MaxValue)
|
||||
then seMaxZ.Value := seMinZ.Value+1
|
||||
else seMaxZ.Value := seMaxZ.MaxValue;
|
||||
tbMinZ.Position := seMinZ.Value;
|
||||
tbMaxZ.Position := seMaxZ.Value;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.tbMaxZChange(Sender: TObject);
|
||||
procedure TfrmBoundaries.seMaxZChange(Sender: TObject);
|
||||
begin
|
||||
seMaxZ.Value := tbMaxZ.Position;
|
||||
if (seMinZ.Value >= seMaxZ.Value) then if (seMaxZ.Value > seMinZ.MinValue)
|
||||
then seMinZ.Value := seMaxZ.Value-1
|
||||
else seMinZ.Value := seMinZ.MinValue;
|
||||
tbMaxZ.Position := seMaxZ.Value;
|
||||
tbMinZ.Position := seMinZ.Value;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.tbMinZChange(Sender: TObject);
|
||||
begin
|
||||
if (tbMaxZ.Position <= tbMinZ.Position) then if (tbMinZ.Position < tbMaxZ.Max)
|
||||
then tbMaxZ.Position := tbMinZ.Position+1
|
||||
else tbMaxZ.Position := tbMaxZ.Max;
|
||||
seMinZ.Value := tbMinZ.Position;
|
||||
seMaxZ.Value := tbMaxZ.Position;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.tbMaxZChange(Sender: TObject);
|
||||
begin
|
||||
if (tbMinZ.Position >= tbMaxZ.Position) then if (tbMaxZ.Position > tbMinZ.Min)
|
||||
then tbMinZ.Position := tbMaxZ.Position-1
|
||||
else tbMinZ.Position := tbMinZ.Min;
|
||||
seMaxZ.Value := tbMaxZ.Position;
|
||||
seMinZ.Value := tbMinZ.Position;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
object frmConfirmation: TfrmConfirmation
|
||||
Left = 290
|
||||
Left = 1559
|
||||
Height = 43
|
||||
Top = 171
|
||||
Width = 108
|
||||
Top = 261
|
||||
Width = 116
|
||||
BorderIcons = []
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Apply?'
|
||||
Caption = 'Подтвердить?'
|
||||
ClientHeight = 43
|
||||
ClientWidth = 108
|
||||
ClientWidth = 116
|
||||
Font.Height = -11
|
||||
LCLVersion = '0.9.25'
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '0.9.30.2'
|
||||
object btnYes: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 40
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Caption = 'Yes'
|
||||
Caption = 'Да'
|
||||
Default = True
|
||||
ModalResult = 6
|
||||
ParentFont = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object btnNo: TButton
|
||||
@@ -29,9 +29,8 @@ object frmConfirmation: TfrmConfirmation
|
||||
Width = 40
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Cancel = True
|
||||
Caption = 'No'
|
||||
Caption = 'Нет'
|
||||
ModalResult = 7
|
||||
ParentFont = True
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -39,6 +39,7 @@ type
|
||||
TfrmConfirmation = class(TForm)
|
||||
btnYes: TButton;
|
||||
btnNo: TButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
@@ -50,6 +51,15 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
uses Language;
|
||||
|
||||
{ TfrmConfirmation }
|
||||
|
||||
procedure TfrmConfirmation.FormCreate(Sender: TObject);
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmConfirmation.lrs}
|
||||
|
||||
|
||||
@@ -1,42 +1,54 @@
|
||||
inherited frmDrawSettings: TfrmDrawSettings
|
||||
Left = 268
|
||||
Height = 180
|
||||
Top = 165
|
||||
Left = 1224
|
||||
Height = 240
|
||||
Top = 636
|
||||
Width = 242
|
||||
ActiveControl = rbTileList
|
||||
Caption = 'Draw settings'
|
||||
ClientHeight = 180
|
||||
Caption = 'Опции рисования'
|
||||
ClientHeight = 240
|
||||
ClientWidth = 242
|
||||
OnCreate = FormCreate
|
||||
object rbTileList: TRadioButton[0]
|
||||
OnShow = FormShow
|
||||
object cbProbability: TCheckBox[0]
|
||||
AnchorSideLeft.Control = rbRandom
|
||||
AnchorSideTop.Control = rbRandom
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 56
|
||||
Width = 170
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Размещать тайл с шансом:'
|
||||
TabOrder = 9
|
||||
end
|
||||
object rbTileList: TRadioButton[1]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 8
|
||||
Height = 22
|
||||
Height = 19
|
||||
Top = 8
|
||||
Width = 146
|
||||
Width = 170
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Bottom = 4
|
||||
Caption = 'Use tile from the list'
|
||||
Caption = 'Выбранный тайл из списка'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
end
|
||||
object rbRandom: TRadioButton[1]
|
||||
object rbRandom: TRadioButton[2]
|
||||
AnchorSideLeft.Control = rbTileList
|
||||
AnchorSideTop.Control = rbTileList
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 22
|
||||
Top = 34
|
||||
Width = 213
|
||||
Height = 19
|
||||
Top = 31
|
||||
Width = 170
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'Use tiles from the random pool'
|
||||
Caption = 'Случайный тайл из набора'
|
||||
OnChange = rbRandomChange
|
||||
TabOrder = 1
|
||||
TabStop = False
|
||||
end
|
||||
object gbHue: TGroupBox[2]
|
||||
object gbHue: TGroupBox[3]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = seRandomHeight
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@@ -44,18 +56,18 @@ inherited frmDrawSettings: TfrmDrawSettings
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 49
|
||||
Top = 132
|
||||
Top = 185
|
||||
Width = 226
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 8
|
||||
Caption = 'Hue (Statics only)'
|
||||
ClientHeight = 45
|
||||
Caption = 'Цвет (Только для Статики)'
|
||||
ClientHeight = 31
|
||||
ClientWidth = 222
|
||||
TabOrder = 2
|
||||
object pbHue: TPaintBox
|
||||
Cursor = crHandPoint
|
||||
Left = 4
|
||||
Height = 41
|
||||
Height = 27
|
||||
Top = 0
|
||||
Width = 214
|
||||
Align = alClient
|
||||
@@ -66,58 +78,104 @@ inherited frmDrawSettings: TfrmDrawSettings
|
||||
OnPaint = pbHuePaint
|
||||
end
|
||||
end
|
||||
object cbRandomHeight: TCheckBox[3]
|
||||
object cbRandomHeight: TCheckBox[4]
|
||||
AnchorSideLeft.Control = cbForceAltitude
|
||||
AnchorSideTop.Control = cbForceAltitude
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 22
|
||||
Top = 102
|
||||
Width = 149
|
||||
BorderSpacing.Top = 12
|
||||
Caption = 'Add Random Altitude'
|
||||
Height = 19
|
||||
Top = 156
|
||||
Width = 163
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'Добавить к высоте (случ):'
|
||||
TabOrder = 3
|
||||
end
|
||||
object seRandomHeight: TSpinEdit[4]
|
||||
object seRandomHeight: TSpinEdit[5]
|
||||
AnchorSideTop.Control = cbRandomHeight
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 184
|
||||
Height = 21
|
||||
Top = 103
|
||||
Height = 23
|
||||
Top = 154
|
||||
Width = 50
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
OnChange = seRandomHeightChange
|
||||
TabOrder = 4
|
||||
end
|
||||
object cbForceAltitude: TCheckBox[5]
|
||||
object cbForceAltitude: TCheckBox[6]
|
||||
AnchorSideLeft.Control = rbRandom
|
||||
AnchorSideTop.Control = rbRandom
|
||||
AnchorSideTop.Control = cbUseSurfaceAltitude
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 22
|
||||
Top = 68
|
||||
Width = 111
|
||||
BorderSpacing.Top = 12
|
||||
Caption = 'Force altitude:'
|
||||
Height = 19
|
||||
Top = 129
|
||||
Width = 135
|
||||
BorderSpacing.Top = 2
|
||||
Caption = 'Задать фикс. высоту:'
|
||||
TabOrder = 5
|
||||
end
|
||||
object seForceAltitude: TSpinEdit[6]
|
||||
object seForceAltitude: TSpinEdit[7]
|
||||
AnchorSideTop.Control = cbForceAltitude
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 184
|
||||
Height = 21
|
||||
Top = 69
|
||||
Height = 23
|
||||
Top = 127
|
||||
Width = 50
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
OnChange = seForceAltitudeChange
|
||||
TabOrder = 6
|
||||
end
|
||||
inherited tmClose: TTimer[7]
|
||||
object cbUseSurfaceAltitude: TCheckBox[8]
|
||||
AnchorSideLeft.Control = rbRandom
|
||||
AnchorSideTop.Control = cbUseFreeTilesOnly
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 108
|
||||
Width = 213
|
||||
BorderSpacing.Top = 12
|
||||
Caption = 'Брать высоту верхней поверхности'
|
||||
OnChange = cbUseSurfaceAltitudeChange
|
||||
TabOrder = 7
|
||||
end
|
||||
object seProbability: TFloatSpinEdit[9]
|
||||
AnchorSideTop.Control = cbProbability
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 176
|
||||
Height = 23
|
||||
Top = 54
|
||||
Width = 58
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
Increment = 0.01
|
||||
MaxValue = 100
|
||||
MinValue = 0.01
|
||||
OnChange = seProbabilityChange
|
||||
TabOrder = 8
|
||||
Value = 100
|
||||
end
|
||||
object cbUseFreeTilesOnly: TCheckBox[10]
|
||||
AnchorSideLeft.Control = rbRandom
|
||||
AnchorSideTop.Control = cbProbability
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 77
|
||||
Width = 218
|
||||
BorderSpacing.Top = 2
|
||||
Caption = 'Размещать только на пустых тайлах'
|
||||
TabOrder = 10
|
||||
end
|
||||
inherited tmClose: TTimer[11]
|
||||
left = 200
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,7 +31,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
Spin, ExtCtrls, LMessages, UfrmToolWindow;
|
||||
Spin, ExtCtrls, LMessages, VirtualTrees, VirtualList, UfrmToolWindow, UfrmMain;
|
||||
|
||||
type
|
||||
|
||||
@@ -39,17 +39,25 @@ type
|
||||
|
||||
TfrmDrawSettings = class(TfrmToolWindow)
|
||||
cbForceAltitude: TCheckBox;
|
||||
cbProbability: TCheckBox;
|
||||
cbUseSurfaceAltitude: TCheckBox;
|
||||
cbRandomHeight: TCheckBox;
|
||||
cbUseFreeTilesOnly: TCheckBox;
|
||||
seProbability: TFloatSpinEdit;
|
||||
gbHue: TGroupBox;
|
||||
pbHue: TPaintBox;
|
||||
rbRandom: TRadioButton;
|
||||
rbTileList: TRadioButton;
|
||||
seForceAltitude: TSpinEdit;
|
||||
seRandomHeight: TSpinEdit;
|
||||
procedure cbUseSurfaceAltitudeChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure pbHueClick(Sender: TObject);
|
||||
procedure pbHuePaint(Sender: TObject);
|
||||
procedure rbRandomChange(Sender: TObject);
|
||||
procedure seForceAltitudeChange(Sender: TObject);
|
||||
procedure seProbabilityChange(Sender: TObject);
|
||||
procedure seRandomHeightChange(Sender: TObject);
|
||||
private
|
||||
FCanClose: Boolean;
|
||||
@@ -63,7 +71,14 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UHue, UfrmHueSettings;
|
||||
UGameResources, UHue, UfrmHueSettings, Language;
|
||||
|
||||
type
|
||||
PTileInfo = ^TTileInfo;
|
||||
TTileInfo = record
|
||||
ID: LongWord;
|
||||
ptr: Pointer;
|
||||
end;
|
||||
|
||||
{ TfrmDrawSettings }
|
||||
|
||||
@@ -79,6 +94,34 @@ end;
|
||||
procedure TfrmDrawSettings.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FCanClose := True;
|
||||
cbUseSurfaceAltitudeChange(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.FormShow(Sender: TObject);
|
||||
var
|
||||
item: PVirtualItem;
|
||||
tileInfo: PTileInfo;
|
||||
selectedID: LongWord;
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
item := frmMain.vdtTiles.GetFirstSelected;
|
||||
if item <> nil then
|
||||
begin
|
||||
tileInfo := frmMain.vdtTiles.GetNodeData(item);
|
||||
selectedID := tileInfo^.ID;
|
||||
end;
|
||||
if (selectedID < $4000) or (selectedID >= $2F000000)
|
||||
then begin
|
||||
cbUseFreeTilesOnly.Checked:= False;
|
||||
cbUseFreeTilesOnly.Enabled:= False;
|
||||
if (selectedID >= $2F000000) then
|
||||
cbProbability.Enabled:= False;
|
||||
end else begin
|
||||
cbUseFreeTilesOnly.Enabled:= True;
|
||||
cbProbability.Enabled:= True;
|
||||
end;
|
||||
|
||||
(frmDrawSettings as TfrmToolWindow).FormShow(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.pbHuePaint(Sender: TObject);
|
||||
@@ -96,6 +139,23 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.rbRandomChange(Sender: TObject);
|
||||
begin
|
||||
if frmMain.mnuAutoHideRandomList.Checked then
|
||||
frmMain.mnuAutoHideRandomListClick(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.seProbabilityChange(Sender: TObject);
|
||||
begin
|
||||
cbProbability.Checked := (seProbability.Value < seProbability.MaxValue);
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.cbUseSurfaceAltitudeChange(Sender: TObject);
|
||||
begin
|
||||
cbForceAltitude.Enabled := not cbUseSurfaceAltitude.Checked;
|
||||
seForceAltitude.Enabled := not cbUseSurfaceAltitude.Checked;
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.seForceAltitudeChange(Sender: TObject);
|
||||
begin
|
||||
cbForceAltitude.Checked := True;
|
||||
@@ -103,7 +163,7 @@ end;
|
||||
|
||||
procedure TfrmDrawSettings.seRandomHeightChange(Sender: TObject);
|
||||
begin
|
||||
cbRandomHeight.Checked := True;
|
||||
cbRandomHeight.Checked := (seRandomHeight.Value <> 0);
|
||||
end;
|
||||
|
||||
function TfrmDrawSettings.CanClose: Boolean;
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
inherited frmElevateSettings: TfrmElevateSettings
|
||||
Left = 290
|
||||
Left = 1502
|
||||
Height = 114
|
||||
Top = 171
|
||||
Top = 189
|
||||
Width = 250
|
||||
Caption = 'Elevate'
|
||||
Caption = 'Изменение высоты'
|
||||
ClientHeight = 114
|
||||
ClientWidth = 250
|
||||
OnCreate = FormCreate
|
||||
object rbRaise: TRadioButton[0]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 8
|
||||
Width = 47
|
||||
Width = 66
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'Raise'
|
||||
Caption = 'Поднять'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 2
|
||||
TabStop = True
|
||||
end
|
||||
object rbLower: TRadioButton[1]
|
||||
AnchorSideLeft.Control = rbRaise
|
||||
@@ -27,10 +28,9 @@ inherited frmElevateSettings: TfrmElevateSettings
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 27
|
||||
Width = 52
|
||||
Caption = 'Lower'
|
||||
Width = 71
|
||||
Caption = 'Опустить'
|
||||
TabOrder = 0
|
||||
TabStop = False
|
||||
end
|
||||
object rbSet: TRadioButton[2]
|
||||
AnchorSideLeft.Control = rbLower
|
||||
@@ -39,10 +39,9 @@ inherited frmElevateSettings: TfrmElevateSettings
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 46
|
||||
Width = 36
|
||||
Caption = 'Set'
|
||||
Width = 56
|
||||
Caption = 'Задать'
|
||||
TabOrder = 1
|
||||
TabStop = False
|
||||
end
|
||||
object cbRandomHeight: TCheckBox[3]
|
||||
AnchorSideLeft.Control = rbSet
|
||||
@@ -51,9 +50,9 @@ inherited frmElevateSettings: TfrmElevateSettings
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 81
|
||||
Width = 135
|
||||
Width = 163
|
||||
BorderSpacing.Top = 16
|
||||
Caption = 'Add Random Altitude'
|
||||
Caption = 'Добавить к высоте (случ.)'
|
||||
TabOrder = 3
|
||||
end
|
||||
object seRandomHeight: TSpinEdit[4]
|
||||
@@ -63,8 +62,8 @@ inherited frmElevateSettings: TfrmElevateSettings
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 197
|
||||
Height = 25
|
||||
Top = 78
|
||||
Height = 23
|
||||
Top = 79
|
||||
Width = 45
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
@@ -79,8 +78,8 @@ inherited frmElevateSettings: TfrmElevateSettings
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 197
|
||||
Height = 25
|
||||
Top = 24
|
||||
Height = 23
|
||||
Top = 25
|
||||
Width = 45
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
@@ -89,4 +88,6 @@ inherited frmElevateSettings: TfrmElevateSettings
|
||||
TabOrder = 5
|
||||
Value = 1
|
||||
end
|
||||
inherited tmClose: TTimer[6]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -44,6 +44,7 @@ type
|
||||
rbSet: TRadioButton;
|
||||
seRandomHeight: TSpinEdit;
|
||||
seZ: TSpinEdit;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure seRandomHeightChange(Sender: TObject);
|
||||
public
|
||||
{ public declarations }
|
||||
@@ -54,6 +55,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
uses Language;
|
||||
|
||||
{ TfrmElevateSettings }
|
||||
|
||||
procedure TfrmElevateSettings.seRandomHeightChange(Sender: TObject);
|
||||
@@ -61,6 +64,11 @@ begin
|
||||
cbRandomHeight.Checked := True;
|
||||
end;
|
||||
|
||||
procedure TfrmElevateSettings.FormCreate(Sender: TObject);
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmElevateSettings.lrs}
|
||||
|
||||
|
||||
206
Client/Tools/UfrmFillSettings.lfm
Normal file
206
Client/Tools/UfrmFillSettings.lfm
Normal file
@@ -0,0 +1,206 @@
|
||||
inherited frmFillSettings: TfrmFillSettings
|
||||
Left = 1248
|
||||
Height = 377
|
||||
Top = 177
|
||||
Width = 469
|
||||
Caption = 'Опции заливки'
|
||||
ClientHeight = 377
|
||||
ClientWidth = 469
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
object vdtLastPreview: TVirtualDrawTree[0]
|
||||
Tag = -1
|
||||
AnchorSideLeft.Control = cbCategory
|
||||
AnchorSideTop.Control = gbHue
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = gbHue
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Cursor = crHandPoint
|
||||
Left = 4
|
||||
Height = 320
|
||||
Hint = '-'
|
||||
Top = 53
|
||||
Width = 64
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Bottom = 4
|
||||
BorderStyle = bsNone
|
||||
Color = clBlack
|
||||
Colors.DropMarkColor = 16762250
|
||||
Colors.DropTargetColor = 16762250
|
||||
Colors.DropTargetBorderColor = 16762250
|
||||
Colors.FocusedSelectionColor = 16762250
|
||||
Colors.FocusedSelectionBorderColor = 16762250
|
||||
Colors.HotColor = clYellow
|
||||
Colors.SelectionRectangleBlendColor = 16762250
|
||||
Colors.SelectionRectangleBorderColor = 16762250
|
||||
Colors.UnfocusedSelectionColor = 16769734
|
||||
Colors.UnfocusedSelectionBorderColor = 16769734
|
||||
Constraints.MinHeight = 64
|
||||
DefaultNodeHeight = 44
|
||||
DragMode = dmAutomatic
|
||||
DragOperations = []
|
||||
DragType = dtVCL
|
||||
Header.AutoSizeIndex = -1
|
||||
Header.Columns = <>
|
||||
Header.DefaultHeight = 17
|
||||
Header.MainColumn = -1
|
||||
Header.Options = [hoShowHint]
|
||||
Header.ParentFont = True
|
||||
Header.Style = hsFlatButtons
|
||||
HintMode = hmHint
|
||||
ParentShowHint = False
|
||||
ScrollBarOptions.ScrollBars = ssNone
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
TreeOptions.AutoOptions = [toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toFullRowDrag]
|
||||
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages, toStaticBackground]
|
||||
TreeOptions.SelectionOptions = [toMultiSelect]
|
||||
Visible = False
|
||||
OnDrawNode = vdtPreviewDrawNode
|
||||
end
|
||||
object vdtEntryPreview: TVirtualDrawTree[1]
|
||||
Tag = -1
|
||||
AnchorSideLeft.Control = vdtLastPreview
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = vdtLastPreview
|
||||
AnchorSideRight.Control = gbHue
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = vdtLastPreview
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Cursor = crHandPoint
|
||||
Left = 72
|
||||
Height = 320
|
||||
Hint = '-'
|
||||
Top = 53
|
||||
Width = 393
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 4
|
||||
BorderStyle = bsNone
|
||||
Color = clBlack
|
||||
Colors.DropMarkColor = 16762250
|
||||
Colors.DropTargetColor = 16762250
|
||||
Colors.DropTargetBorderColor = 16762250
|
||||
Colors.FocusedSelectionColor = 16762250
|
||||
Colors.FocusedSelectionBorderColor = 16762250
|
||||
Colors.HotColor = clYellow
|
||||
Colors.SelectionRectangleBlendColor = 16762250
|
||||
Colors.SelectionRectangleBorderColor = 16762250
|
||||
Colors.UnfocusedSelectionColor = 16769734
|
||||
Colors.UnfocusedSelectionBorderColor = 16769734
|
||||
Constraints.MinHeight = 64
|
||||
DefaultNodeHeight = 44
|
||||
DragMode = dmAutomatic
|
||||
DragOperations = []
|
||||
DragType = dtVCL
|
||||
Header.AutoSizeIndex = -1
|
||||
Header.Columns = <>
|
||||
Header.DefaultHeight = 17
|
||||
Header.MainColumn = -1
|
||||
Header.Options = [hoShowHint]
|
||||
Header.ParentFont = True
|
||||
Header.Style = hsFlatButtons
|
||||
HintMode = hmHint
|
||||
ParentShowHint = False
|
||||
ScrollBarOptions.AlwaysVisible = True
|
||||
ScrollBarOptions.ScrollBars = ssVertical
|
||||
ShowHint = True
|
||||
TabOrder = 5
|
||||
TreeOptions.AutoOptions = [toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toFullRowDrag]
|
||||
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages, toStaticBackground]
|
||||
TreeOptions.SelectionOptions = [toMultiSelect]
|
||||
Visible = False
|
||||
OnDrawNode = vdtPreviewDrawNode
|
||||
end
|
||||
object gbHue: TGroupBox[2]
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 239
|
||||
Height = 49
|
||||
Top = 2
|
||||
Width = 226
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Right = 4
|
||||
Caption = 'Цвет (Только для Статики)'
|
||||
ClientHeight = 31
|
||||
ClientWidth = 222
|
||||
TabOrder = 0
|
||||
object pbHue: TPaintBox
|
||||
Cursor = crHandPoint
|
||||
Left = 4
|
||||
Height = 27
|
||||
Top = 0
|
||||
Width = 214
|
||||
Align = alClient
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Right = 4
|
||||
BorderSpacing.Bottom = 4
|
||||
OnClick = pbHueClick
|
||||
OnPaint = pbHuePaint
|
||||
end
|
||||
end
|
||||
object cbCategory: TComboBox[3]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = lblFillType
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 4
|
||||
Height = 23
|
||||
Top = 20
|
||||
Width = 120
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Top = 1
|
||||
ItemHeight = 15
|
||||
Sorted = True
|
||||
Style = csDropDownList
|
||||
TabOrder = 2
|
||||
end
|
||||
object cbFillReview: TCheckBox[4]
|
||||
AnchorSideLeft.Control = cbFillConfirm
|
||||
AnchorSideBottom.Control = cbFillConfirm
|
||||
Left = 132
|
||||
Height = 19
|
||||
Top = 7
|
||||
Width = 103
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'Предпросмотр'
|
||||
TabOrder = 3
|
||||
end
|
||||
object cbFillConfirm: TCheckBox[5]
|
||||
AnchorSideLeft.Control = cbCategory
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = gbHue
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 132
|
||||
Height = 19
|
||||
Top = 26
|
||||
Width = 107
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Подтверждение'
|
||||
TabOrder = 4
|
||||
end
|
||||
object lblFillType: TLabel[6]
|
||||
AnchorSideLeft.Control = cbCategory
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 4
|
||||
Height = 16
|
||||
Top = 3
|
||||
Width = 72
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'Тип заливки:'
|
||||
ParentColor = False
|
||||
end
|
||||
inherited tmClose: TTimer[7]
|
||||
left = 80
|
||||
end
|
||||
end
|
||||
187
Client/Tools/UfrmFillSettings.pas
Normal file
187
Client/Tools/UfrmFillSettings.pas
Normal file
@@ -0,0 +1,187 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2009 Andreas Schneider
|
||||
*)
|
||||
unit UfrmFillSettings;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
Spin, ExtCtrls, LMessages, VirtualTrees, VirtualList, UfrmToolWindow, UfrmMain;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmFillSettings }
|
||||
|
||||
TfrmFillSettings = class(TfrmToolWindow)
|
||||
cbFillReview: TCheckBox;
|
||||
cbFillConfirm: TCheckBox;
|
||||
cbCategory: TComboBox;
|
||||
gbHue: TGroupBox;
|
||||
lblFillType: TLabel;
|
||||
pbHue: TPaintBox;
|
||||
vdtLastPreview: TVirtualDrawTree;
|
||||
vdtEntryPreview: TVirtualDrawTree;
|
||||
procedure cbUseSurfaceAltitudeChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure pbHueClick(Sender: TObject);
|
||||
procedure pbHuePaint(Sender: TObject);
|
||||
procedure rbRandomChange(Sender: TObject);
|
||||
procedure seForceAltitudeChange(Sender: TObject);
|
||||
procedure seProbabilityChange(Sender: TObject);
|
||||
procedure seRandomHeightChange(Sender: TObject);
|
||||
procedure vdtPreviewDrawNode(Sender: TBaseVirtualTree;
|
||||
const PaintInfo: TVTPaintInfo);
|
||||
private
|
||||
FCanClose: Boolean;
|
||||
function CanClose: Boolean; override;
|
||||
procedure OnHueClose(Sender: TObject; var ACloseAction: TCloseAction);
|
||||
end;
|
||||
|
||||
const
|
||||
vdtPreviewNodeWidth = 44;
|
||||
vdtPreviewColumnsMax = 1920 div vdtPreviewNodeWidth;
|
||||
|
||||
var
|
||||
frmFillSettings: TfrmFillSettings;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UHue, UfrmHueSettings, Language;
|
||||
|
||||
type
|
||||
PTileInfo = ^TTileInfo;
|
||||
TTileInfo = record
|
||||
ID: LongWord;
|
||||
ptr: Pointer;
|
||||
end;
|
||||
|
||||
{ TfrmFillSettings }
|
||||
|
||||
procedure TfrmFillSettings.pbHueClick(Sender: TObject);
|
||||
begin
|
||||
frmHueSettings.Left := Mouse.CursorPos.x - 8;
|
||||
frmHueSettings.Top := Mouse.CursorPos.y - 8;
|
||||
frmHueSettings.OnClose := @OnHueClose;
|
||||
frmHueSettings.Show;
|
||||
FCanClose := False;
|
||||
end;
|
||||
|
||||
procedure TfrmFillSettings.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FCanClose := True;
|
||||
cbUseSurfaceAltitudeChange(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmFillSettings.FormShow(Sender: TObject);
|
||||
var
|
||||
item: PVirtualItem;
|
||||
tileInfo: PTileInfo;
|
||||
selectedID: LongWord;
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
item := frmMain.vdtTiles.GetFirstSelected;
|
||||
if item <> nil then
|
||||
begin
|
||||
tileInfo := frmMain.vdtTiles.GetNodeData(item);
|
||||
selectedID := tileInfo^.ID;
|
||||
end;
|
||||
|
||||
(frmFillSettings as TfrmToolWindow).FormShow(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmFillSettings.pbHuePaint(Sender: TObject);
|
||||
var
|
||||
hue: THue;
|
||||
begin
|
||||
if frmHueSettings <> nil then
|
||||
begin
|
||||
if frmHueSettings.lbHue.ItemIndex > 0 then
|
||||
hue := ResMan.Hue.Hues[frmHueSettings.lbHue.ItemIndex - 1]
|
||||
else
|
||||
hue := nil;
|
||||
TfrmHueSettings.DrawHue(hue, pbHue.Canvas, pbHue.Canvas.ClipRect,
|
||||
frmHueSettings.lbHue.Items.Strings[frmHueSettings.lbHue.ItemIndex]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFillSettings.rbRandomChange(Sender: TObject);
|
||||
begin
|
||||
if frmMain.mnuAutoHideRandomList.Checked then
|
||||
frmMain.mnuAutoHideRandomListClick(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmFillSettings.seProbabilityChange(Sender: TObject);
|
||||
begin
|
||||
// cbProbability.Checked := (seProbability.Value < seProbability.MaxValue);
|
||||
end;
|
||||
|
||||
procedure TfrmFillSettings.cbUseSurfaceAltitudeChange(Sender: TObject);
|
||||
begin
|
||||
// cbForceAltitude.Enabled := not cbUseSurfaceAltitude.Checked;
|
||||
// seForceAltitude.Enabled := not cbUseSurfaceAltitude.Checked;
|
||||
end;
|
||||
|
||||
procedure TfrmFillSettings.seForceAltitudeChange(Sender: TObject);
|
||||
begin
|
||||
// cbForceAltitude.Checked := True;
|
||||
end;
|
||||
|
||||
procedure TfrmFillSettings.seRandomHeightChange(Sender: TObject);
|
||||
begin
|
||||
// cbRandomHeight.Checked := (seRandomHeight.Value <> 0);
|
||||
end;
|
||||
|
||||
procedure TfrmFillSettings.vdtPreviewDrawNode(Sender: TBaseVirtualTree;
|
||||
const PaintInfo: TVTPaintInfo);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
function TfrmFillSettings.CanClose: Boolean;
|
||||
begin
|
||||
Result := FCanClose and inherited CanClose;
|
||||
end;
|
||||
|
||||
procedure TfrmFillSettings.OnHueClose(Sender: TObject;
|
||||
var ACloseAction: TCloseAction);
|
||||
var
|
||||
msg: TLMessage;
|
||||
begin
|
||||
FCanClose := True;
|
||||
frmHueSettings.OnClose := nil;
|
||||
pbHue.Repaint;
|
||||
MouseLeave(msg);
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmFillSettings.lrs}
|
||||
|
||||
end.
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
object frmFilter: TfrmFilter
|
||||
Left = 290
|
||||
Left = 1498
|
||||
Height = 492
|
||||
Top = 171
|
||||
Top = 0
|
||||
Width = 232
|
||||
ActiveControl = rgFilterType.RadioButton0
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Filter'
|
||||
Caption = 'Фильтр'
|
||||
ClientHeight = 492
|
||||
ClientWidth = 232
|
||||
Font.Height = -11
|
||||
KeyPreview = True
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnKeyDown = FormKeyDown
|
||||
OnMouseDown = FormMouseDown
|
||||
OnMouseUp = FormMouseUp
|
||||
OnShow = FormShow
|
||||
LCLVersion = '0.9.29'
|
||||
ShowInTaskBar = stNever
|
||||
LCLVersion = '0.9.30.2'
|
||||
object rgFilterType: TRadioGroup
|
||||
Left = 4
|
||||
Height = 40
|
||||
@@ -22,7 +26,7 @@ object frmFilter: TfrmFilter
|
||||
Align = alTop
|
||||
AutoFill = True
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Filter rule'
|
||||
Caption = 'Правило фильтра'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
@@ -31,15 +35,18 @@ object frmFilter: TfrmFilter
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
ClientHeight = 26
|
||||
ClientWidth = 222
|
||||
ClientHeight = 22
|
||||
ClientWidth = 220
|
||||
Columns = 2
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Exclusive'
|
||||
'Inclusive'
|
||||
'Исключающий'
|
||||
'Включающий'
|
||||
)
|
||||
OnClick = rgFilterTypeClick
|
||||
OnKeyDown = FormKeyDown
|
||||
OnMouseDown = FormMouseDown
|
||||
OnMouseUp = FormMouseUp
|
||||
TabOrder = 0
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
@@ -49,25 +56,31 @@ object frmFilter: TfrmFilter
|
||||
Width = 224
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Tile filter'
|
||||
ClientHeight = 245
|
||||
ClientWidth = 222
|
||||
Caption = 'Фильтрация тайлов'
|
||||
ClientHeight = 241
|
||||
ClientWidth = 220
|
||||
TabOrder = 1
|
||||
OnMouseDown = FormMouseDown
|
||||
OnMouseUp = FormMouseUp
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = GroupBox1
|
||||
AnchorSideTop.Control = cbTileFilter
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideLeft.Control = btnClear
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = btnClear
|
||||
AnchorSideRight.Control = GroupBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 4
|
||||
Height = 30
|
||||
Top = 30
|
||||
Width = 214
|
||||
Left = 56
|
||||
Height = 25
|
||||
Top = 215
|
||||
Width = 164
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Drag and Drop static tiles from the tile list on this list to add them to the filter.'
|
||||
BorderSpacing.Left = 4
|
||||
Caption = 'Чтобы добавить тайлы - перетащите предметы в список из списка тайлов.'
|
||||
Font.Height = -9
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
WordWrap = True
|
||||
OnMouseDown = FormMouseDown
|
||||
OnMouseUp = FormMouseUp
|
||||
end
|
||||
object btnClear: TSpeedButton
|
||||
AnchorSideLeft.Control = btnDelete
|
||||
@@ -78,46 +91,45 @@ object frmFilter: TfrmFilter
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 30
|
||||
Height = 22
|
||||
Hint = 'Clear'
|
||||
Top = 219
|
||||
Hint = 'Очистить список'
|
||||
Top = 215
|
||||
Width = 22
|
||||
Anchors = [akLeft, akBottom]
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
20000000000000040000640000006400000000000000000000003ADCFE004800
|
||||
3A00FEFF4800FCFF1C00FCFF1C0080FF9C00003BD700AF9AFF00002CC600FDEB
|
||||
9B000000000000000000000000000000000000000000000000000EECFF00B2FC
|
||||
FF000046C00078D0FF000000F1FF0000F1FF0000F1FF0000F1FF0000EFFF0000
|
||||
EFFF0000EDFF0000EDFFCBF3FC008905000024AEEF00E4A81C000000DB00B29E
|
||||
FF0088000D000000F5FF1A20F5FF3C4CF9FF3A49F8FF3847F8FF3545F8FF3443
|
||||
F7FF3242F7FF141BF1FF0000EDFFFCFF1C00FCFF1C0080FF9C0004000000FFBC
|
||||
00000000F7FF1D23F9FF4453FAFF2429F9FF1212F7FF0F0FF6FF0C0CF5FF0909
|
||||
F5FF161BF5FF3343F7FF141BF1FF0000EDFFE4FF5C000050FF004C0000000000
|
||||
F9FF1F25FAFF4A58FBFF4247FBFFC9C9FDFF3B3BF9FF1313F7FF1010F6FF3333
|
||||
F7FFC5C5FDFF3035F7FF3444F7FF141BF2FF0000EDFF000008000052FF000000
|
||||
FBFF4F5DFDFF3237FBFFCBCBFEFFF2F2FFFFEBEBFEFF3B3BF9FF3939F8FFEAEA
|
||||
FEFFF1F1FEFFC5C5FDFF181DF6FF3343F7FF0000EFFF0000CC0088005B000000
|
||||
FDFF525FFDFF2828FCFF4747FCFFECECFFFFF2F2FFFFECECFFFFECECFEFFF1F1
|
||||
FFFFEAEAFEFF3434F7FF0B0BF5FF3545F8FF0000EFFF00B8FF00E3FFA8000000
|
||||
FDFF5562FEFF2C2CFDFF2929FCFF4848FCFFEDEDFFFFF2F2FFFFF2F2FFFFECEC
|
||||
FEFF3A3AF9FF1212F7FF0F0FF6FF3848F8FF0000F1FF08009000FCFF72000000
|
||||
FDFF5764FEFF3030FDFF2D2DFDFF4B4BFCFFEDEDFFFFF2F2FFFFF2F2FFFFECEC
|
||||
FFFF3D3DF9FF1616F8FF1313F7FF3C4BF8FF0000F1FF02000000E4FF5C000000
|
||||
FFFF5A67FEFF3333FEFF5050FDFFEDEDFFFFF3F3FFFFEDEDFFFFEDEDFFFFF2F2
|
||||
FFFFECECFEFF3E3EFAFF1717F8FF3F4EF9FF0000F1FFFCFF1C00000000000000
|
||||
FFFF5B68FFFF4347FEFFCFCFFFFFF3F3FFFFEDEDFFFF4C4CFCFF4A4AFCFFECEC
|
||||
FFFFF2F2FFFFCACAFEFF2A2FFAFF4251FAFF0000F3FF00000000CCFF4C000000
|
||||
FFFF262BFFFF5D6AFFFF585BFFFFCFCFFFFF5252FEFF2F2FFDFF2C2CFDFF4B4B
|
||||
FCFFCCCCFEFF484CFBFF4957FBFF1D23F9FF0000F5FF00000000000000000000
|
||||
00000000FFFF262BFFFF5D6AFFFF4347FFFF3434FEFF3232FEFF3030FDFF2D2D
|
||||
FDFF383CFCFF4F5DFCFF1F25FAFF0000F7FF0000000000000000000000000000
|
||||
0000000000000000FFFF262BFFFF5C69FFFF5B68FFFF5A67FEFF5865FEFF5663
|
||||
FEFF5461FEFF2227FCFF0000FBFFFCFF1C00000000000000000008000000EFEF
|
||||
EF00EFEFEF00EFEFEF000000FFFF0000FFFF0000FFFF0000FFFF0000FDFF0000
|
||||
FDFF0000FDFF0000FDFF000000000000000000000000000000009034DE009034
|
||||
DE00D86FDF00D86FDF00E0A223004AC6080000000000580000005870DF000C70
|
||||
DF000000000000000000000000002070DF000000000000000000
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
|
||||
640C00005D7300005DBA00005DCC00005DCC00005DCC00005DCC00005DCC0000
|
||||
5DCC00005DCC00005DCC00005DBA00005D730000640CFFFFFF00FFFFFF000000
|
||||
6D73080893DD1010CCF91111D9FF1111D9FF1111D9FF1111D9FF1111D9FF1111
|
||||
D9FF1111D9FF1111D9FF0F0FCCF9070792DD00006D73FFFFFF00FFFFFF000000
|
||||
7DBA1616CBF91111D1FF1111D1FF1111B6FF1111D1FF1111D1FF1111D1FF1111
|
||||
D1FF1111B6FF1111D1FF1111D1FF0F0FC8F900007DBAFFFFFF00FFFFFF000000
|
||||
84CC1C1CCEFF1111C8FF1111B2FFDCDCDCFF1111B2FF1111C8FF1111C8FF1111
|
||||
B2FFEEEEEEFF1111B2FF1111C8FF1111C8FF000084CCFFFFFF00FFFFFF000000
|
||||
89CC2222C8FF1111BEFFD1D1D1FFD6D6D6FFDCDCDCFF1111ADFF1111ADFFEAEA
|
||||
EAFFEEEEEEFFEEEEEEFF1111BEFF1212BEFF000089CCFFFFFF00FFFFFF000000
|
||||
8DCC3434C7FF1212B4FF1111B4FFD1D1D1FFD6D6D6FFDCDCDCFFE2E2E2FFE6E6
|
||||
E6FFEAEAEAFF1111B4FF1111B4FF1414B6FF00008DCCFFFFFF00FFFFFF000000
|
||||
92CC4646CEFF2626B5FF1414ABFF1111AAFFD1D1D1FFD6D6D6FFDCDCDCFFE2E2
|
||||
E2FF1111AAFF1111AAFF1111AAFF1818B0FF000092CCFFFFFF00FFFFFF000000
|
||||
96CC4A4AD2FF3333BBFF2E2EB8FF13139FFFCECECEFFD1D1D1FFD6D6D6FFDCDC
|
||||
DCFF11119EFF1111A1FF1111A1FF1D1DACFF000096CCFFFFFF00FFFFFF000000
|
||||
9ACC5050D8FF3737BFFF2323ABFFFFFFFFFFF7F7F7FFE8E8E8FFDEDEDEFFDBDB
|
||||
DBFFDDDDDDFF11119BFF1616A0FF2B2BB5FF00009ACCFFFFFF00FFFFFF000000
|
||||
9ECC5A5AE2FF4242CAFFFFFFFFFFFFFFFFFFFFFFFFFF4242CAFF4242CAFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFF4242CAFF4E4ED6FF00009ECCFFFFFF00FFFFFF000000
|
||||
A2CC6262EAFF4F4FD7FF4F4FD7FFFFFFFFFF4F4FD7FF4F4FD7FF4F4FD7FF4F4F
|
||||
D7FFFFFFFFFF4F4FD7FF4F4FD7FF5A5AE2FF0000A2CCFFFFFF00FFFFFF000000
|
||||
A5BA6060ECF95B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5B
|
||||
E3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE7F90000A5BAFFFFFF00FFFFFF000000
|
||||
A8732A2AC7DD6363EFF96D6DF5FF6D6DF5FF6D6DF5FF6D6DF5FF6D6DF5FF6D6D
|
||||
F5FF6D6DF5FF6C6CF4FF6262EEF92929C5DD0000A873FFFFFF00FFFFFF000000
|
||||
A90C0000AA730000AABA0000AACC0000AACC0000AACC0000AACC0000AACC0000
|
||||
AACC0000AACC0000AACC0000AABA0000AA730000A90CFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnClearClick
|
||||
@@ -130,47 +142,46 @@ object frmFilter: TfrmFilter
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 4
|
||||
Height = 22
|
||||
Hint = 'Delete'
|
||||
Top = 219
|
||||
Hint = 'Удалить выделенные'
|
||||
Top = 215
|
||||
Width = 22
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Around = 4
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
20000000000000040000640000006400000000000000000000004F91AB005588
|
||||
9C0043718A004E6974003E4B4C00457796003E6A950037556C005C7E8800548B
|
||||
A00031464100FFFFFF002B3238002D3B430074B9C8007FC4D5004788A7004A92
|
||||
B500435E6F002E3040002E3538003D5E7B003853BEFF3551BDFF304BBCFF2E4E
|
||||
B8FF303B3600FFFFFF00313637002C2D2B00588997007BC3D400365F8400396E
|
||||
9A003B6282003A5564004255C6FF3C52CCFF757AE8FF8F92EEFF8F92EEFF7178
|
||||
E4FF334DC1FF2B4AB7FFFFFFFF0036423900486B710061B4CE00396F9600375C
|
||||
83004085B1004959CBFF5C65E0FFA1A6F5FF7E86EFFF5B63E9FF595DE7FF7D84
|
||||
EEFF9EA0F4FF515DD7FF2B4AB7FFFFFFFF00354C4C004D94AF00375D7F003348
|
||||
5C005361CFFF616BE3FFA1ACF5FF545FECFF505CEAFF4D59E9FF4E59E6FF4C56
|
||||
E6FF5056E6FF9EA2F4FF5460D6FF2A4AB8FFFFFFFF004A90A6003B5864003D5B
|
||||
6A004B56DBFFA2ABF6FF5664F0FF5266EEFF4D59E9FF4D59E9FF4D59E9FF4D59
|
||||
E9FF4C58E6FF525AE6FF9FA3F5FF3450C4FF57929C00498BA40047676D005C62
|
||||
D7FF818CEEFF7E91F7FF5D73F3FF4D59E9FF4D59E9FF4D59E9FF4D59E9FF4D59
|
||||
E9FF4D59E9FF4F5BE9FF7B83F0FF757BE2FF2E4BBAFF54839500FFFFFF005F63
|
||||
DAFFA1ABF7FF7086F8FF6882F6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF4D59E9FF5C66EAFF969CF1FF3250BCFF6FA2AF00000000006469
|
||||
DBFFAFB9F9FF7F93FAFF7085F0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF4D59E9FF5E6AEEFF969DF1FF364FBEFF58B2E00000000000676A
|
||||
DEFFA5AFF5FF9DABFAFF778CF0FF545FECFF545FECFF545FECFF545FECFF545F
|
||||
ECFF545FECFF6377F2FF818EF4FF787FE9FF3A53C0FF000000000800000000E8
|
||||
1D007D83EAFFCDD4FCFF8B9DFAFF7E93F7FF758AEEFF6C84F6FF6C84F6FF6C84
|
||||
F6FF6C84F6FF6379F3FFA4AFF8FF3E4FD0FF000000000000000001000100DB12
|
||||
C0006A69E0FFA3A7F3FFD4DBFDFF879AFAFF7F91F0FF7A8EF1FF7F94F8FF7E92
|
||||
F9FF768CF8FFA8B6F8FF636EE3FF4557C7FF00000000000000002401AD00BA02
|
||||
AE002301AE006A69E0FFAAADF2FFD8DCFDFFAEBAFAFF91A3FAFF8B9DFAFF9CA9
|
||||
FBFFBAC7FCFF707BE9FF4C5BCCFFBB02F00000010000D8000000000000000000
|
||||
000008000000010008006A6ADFFF8E93EDFFBEC3F8FFCCD3F9FFC4CBF9FFAAB4
|
||||
F4FF6670E2FF535ED1FF5031DE005031DE002501AC00B902AD000D040400F804
|
||||
0500F20005000A0106000C040500F8040600686ADDFF6364DCFF6164DAFF5D63
|
||||
D9FFF2000700F804610000000000710900005031DE005031DE004034DE004034
|
||||
DE0068B0E00068B0E0000E049300F8049500F2009500070102000F049500F804
|
||||
0200F2000200080104000E040200F8040400F200040009010500
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
|
||||
640C00005D7300005DBA00005DCC00005DCC00005DCC00005DCC00005DCC0000
|
||||
5DCC00005DCC00005DCC00005DBA00005D730000640CFFFFFF00FFFFFF000000
|
||||
6D73080893DD1010CCF91111D9FF1111D9FF1111D9FF1111D9FF1111D9FF1111
|
||||
D9FF1111D9FF1111D9FF0F0FCCF9070792DD00006D73FFFFFF00FFFFFF000000
|
||||
7DBA1616CBF91111D1FF1111D1FF1111D1FF1111D1FF1111D1FF1111D1FF1111
|
||||
D1FF1111D1FF1111D1FF1111D1FF0F0FC8F900007DBAFFFFFF00FFFFFF000000
|
||||
84CC1C1CCEFF1111C8FF1111C8FF1111C8FF1111C8FF1111C8FF1111C8FF1111
|
||||
C8FF1111C8FF1111C8FF1111C8FF1111C8FF000084CCFFFFFF00FFFFFF000000
|
||||
89CC2222C8FF1111BEFF1111BEFF1111BEFF1111BEFF1111BEFF1111BEFF1111
|
||||
BEFF1111BEFF1111BEFF1111BEFF1212BEFF000089CCFFFFFF00FFFFFF000000
|
||||
8DCC3434C7FF1212B4FF1111A8FF1111A8FF1111A8FF1111A8FF1111A8FF1111
|
||||
A8FF1111A8FF1111A8FF1111B4FF1414B6FF00008DCCFFFFFF00FFFFFF000000
|
||||
92CC4646CEFF2626B5FFD0D0D0FFCCCCCCFFD1D1D1FFDCDCDCFFE8E8E8FFEEEE
|
||||
EEFFEEEEEEFFEEEEEEFF1111AAFF1818B0FF000092CCFFFFFF00FFFFFF000000
|
||||
96CC4A4AD2FF3333BBFFF8F8F8FFDEDEDEFFCECECEFFD1D1D1FFDCDCDCFFE8E8
|
||||
E8FFEEEEEEFFEEEEEEFF1111A1FF1D1DACFF000096CCFFFFFF00FFFFFF000000
|
||||
9ACC5050D8FF3737BFFF3737BFFF3737BFFF3232BAFF2727B0FF1C1CA6FF1616
|
||||
A0FF12129CFF12129CFF1616A0FF2B2BB5FF00009ACCFFFFFF00FFFFFF000000
|
||||
9ECC5A5AE2FF4242CAFF4242CAFF4242CAFF4242CAFF4242CAFF4242CAFF4242
|
||||
CAFF4242CAFF4242CAFF4242CAFF4E4ED6FF00009ECCFFFFFF00FFFFFF000000
|
||||
A2CC6262EAFF4F4FD7FF4F4FD7FF4F4FD7FF4F4FD7FF4F4FD7FF4F4FD7FF4F4F
|
||||
D7FF4F4FD7FF4F4FD7FF4F4FD7FF5A5AE2FF0000A2CCFFFFFF00FFFFFF000000
|
||||
A5BA6060ECF95B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5B
|
||||
E3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE7F90000A5BAFFFFFF00FFFFFF000000
|
||||
A8732A2AC7DD6363EFF96D6DF5FF6D6DF5FF6D6DF5FF6D6DF5FF6D6DF5FF6D6D
|
||||
F5FF6D6DF5FF6C6CF4FF6262EEF92929C5DD0000A873FFFFFF00FFFFFF000000
|
||||
A90C0000AA730000AABA0000AACC0000AACC0000AACC0000AACC0000AACC0000
|
||||
AACC0000AACC0000AACC0000AABA0000AA730000A90CFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnDeleteClick
|
||||
@@ -178,20 +189,21 @@ object frmFilter: TfrmFilter
|
||||
ParentShowHint = False
|
||||
end
|
||||
object vdtFilter: TVirtualDrawTree
|
||||
Tag = 1
|
||||
Tag = -1
|
||||
AnchorSideLeft.Control = GroupBox1
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Control = cbTileFilter
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = GroupBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = btnDelete
|
||||
Cursor = 63
|
||||
Left = 4
|
||||
Height = 151
|
||||
Top = 64
|
||||
Width = 214
|
||||
Height = 184
|
||||
Top = 27
|
||||
Width = 212
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Around = 4
|
||||
Color = 16052980
|
||||
DefaultNodeHeight = 44
|
||||
DragType = dtVCL
|
||||
Header.AutoSizeIndex = 0
|
||||
@@ -199,38 +211,115 @@ object frmFilter: TfrmFilter
|
||||
item
|
||||
Position = 0
|
||||
Text = 'ID'
|
||||
Width = 40
|
||||
end
|
||||
item
|
||||
Position = 1
|
||||
Text = 'Tile'
|
||||
Text = 'Тайл'
|
||||
Width = 44
|
||||
end
|
||||
item
|
||||
Position = 2
|
||||
Text = 'Name'
|
||||
Width = 100
|
||||
Text = 'Название'
|
||||
Width = 108
|
||||
end
|
||||
item
|
||||
MaxWidth = 10
|
||||
MinWidth = 0
|
||||
Position = 3
|
||||
Text = 'tile_separator'
|
||||
Width = 8
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
|
||||
Position = 4
|
||||
Text = 'tile_S1'
|
||||
Width = 46
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
|
||||
Position = 5
|
||||
Text = 'tile_S2'
|
||||
Width = 46
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
|
||||
Position = 6
|
||||
Text = 'tile_S3'
|
||||
Width = 46
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
|
||||
Position = 7
|
||||
Text = 'tile_S4'
|
||||
Width = 46
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
|
||||
Position = 8
|
||||
Text = 'tile_M1'
|
||||
Width = 62
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
|
||||
Position = 9
|
||||
Text = 'tile_M2'
|
||||
Width = 62
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
|
||||
Position = 10
|
||||
Text = 'tile_M3'
|
||||
Width = 62
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
|
||||
Position = 11
|
||||
Text = 'tile_L1'
|
||||
Width = 93
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
|
||||
Position = 12
|
||||
Text = 'tile_L2'
|
||||
Width = 93
|
||||
end
|
||||
item
|
||||
MaxWidth = 10
|
||||
MinWidth = 0
|
||||
Position = 13
|
||||
Text = 'tile_separator'
|
||||
Width = 2
|
||||
end>
|
||||
Header.DefaultHeight = 17
|
||||
Header.Options = [hoColumnResize, hoDrag, hoVisible]
|
||||
Header.Options = [hoVisible]
|
||||
Header.ParentFont = True
|
||||
Header.Style = hsFlatButtons
|
||||
ScrollBarOptions.AlwaysVisible = True
|
||||
ScrollBarOptions.ScrollBars = ssVertical
|
||||
TabOrder = 0
|
||||
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect]
|
||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages, toStaticBackground]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect]
|
||||
OnDragOver = vdtFilterDragOver
|
||||
OnDragDrop = vdtFilterDragDrop
|
||||
OnDrawNode = vdtFilterDrawNode
|
||||
OnKeyDown = FormKeyDown
|
||||
end
|
||||
object cbTileFilter: TCheckBox
|
||||
AnchorSideLeft.Control = GroupBox1
|
||||
AnchorSideTop.Control = GroupBox1
|
||||
Left = 4
|
||||
Height = 22
|
||||
Height = 19
|
||||
Top = 4
|
||||
Width = 85
|
||||
Width = 166
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Filter active'
|
||||
Caption = 'Использовать фильтрацию'
|
||||
OnChange = cbTileFilterChange
|
||||
OnKeyDown = FormKeyDown
|
||||
OnMouseDown = FormMouseDown
|
||||
OnMouseUp = FormMouseUp
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
@@ -241,29 +330,35 @@ object frmFilter: TfrmFilter
|
||||
Width = 224
|
||||
Align = alBottom
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Hue filter'
|
||||
ClientHeight = 154
|
||||
ClientWidth = 222
|
||||
Caption = 'Фильтрация цветов'
|
||||
ClientHeight = 150
|
||||
ClientWidth = 220
|
||||
TabOrder = 2
|
||||
OnMouseDown = FormMouseDown
|
||||
OnMouseUp = FormMouseUp
|
||||
object cbHueFilter: TCheckBox
|
||||
Left = 4
|
||||
Height = 22
|
||||
Height = 19
|
||||
Top = 4
|
||||
Width = 214
|
||||
Width = 212
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Filter active'
|
||||
Caption = 'Использовать фильтрацию'
|
||||
OnChange = cbHueFilterChange
|
||||
OnKeyDown = FormKeyDown
|
||||
OnMouseDown = FormMouseDown
|
||||
OnMouseUp = FormMouseUp
|
||||
TabOrder = 0
|
||||
end
|
||||
object vdtHues: TVirtualDrawTree
|
||||
Cursor = 63
|
||||
Left = 4
|
||||
Height = 120
|
||||
Top = 30
|
||||
Width = 214
|
||||
Height = 119
|
||||
Top = 27
|
||||
Width = 212
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 4
|
||||
Color = 16052980
|
||||
Header.AutoSizeIndex = 2
|
||||
Header.Columns = <
|
||||
item
|
||||
@@ -272,25 +367,28 @@ object frmFilter: TfrmFilter
|
||||
end
|
||||
item
|
||||
Position = 1
|
||||
Text = 'Hue'
|
||||
Text = 'Цвет'
|
||||
Width = 38
|
||||
end
|
||||
item
|
||||
Position = 2
|
||||
Text = 'Name'
|
||||
Width = 154
|
||||
Text = 'Название'
|
||||
Width = 133
|
||||
end>
|
||||
Header.DefaultHeight = 17
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
|
||||
Header.ParentFont = True
|
||||
Header.Style = hsFlatButtons
|
||||
PopupMenu = pmHues
|
||||
ScrollBarOptions.AlwaysVisible = True
|
||||
ScrollBarOptions.ScrollBars = ssVertical
|
||||
TabOrder = 1
|
||||
TreeOptions.MiscOptions = [toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect]
|
||||
OnChecked = vdtHuesChecked
|
||||
OnDrawNode = vdtHuesDrawNode
|
||||
OnKeyDown = FormKeyDown
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
@@ -306,12 +404,18 @@ object frmFilter: TfrmFilter
|
||||
left = 148
|
||||
top = 404
|
||||
object mnuCheckHues: TMenuItem
|
||||
Caption = 'Check all hues'
|
||||
Caption = 'Отметить все цвета'
|
||||
OnClick = mnuCheckHuesClick
|
||||
end
|
||||
object mnuUncheckHues: TMenuItem
|
||||
Caption = 'Uncheck all hues'
|
||||
Caption = 'Удалить все цвета'
|
||||
OnClick = mnuUncheckHuesClick
|
||||
end
|
||||
end
|
||||
object tFormClose: TTimer
|
||||
Interval = 10
|
||||
OnTimer = tFormCloseTimer
|
||||
left = 192
|
||||
top = 56
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,8 +31,8 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
ExtCtrls, VirtualTrees, LCLIntf, LMessages, Buttons, UPlatformTypes, UStatics,
|
||||
Menus;
|
||||
ExtCtrls, VirtualTrees, VirtualList, LCLIntf, LMessages, Buttons, UPlatformTypes,
|
||||
UStatics, Menus, Windows, Logging;
|
||||
|
||||
type
|
||||
|
||||
@@ -55,7 +55,8 @@ type
|
||||
pmHues: TPopupMenu;
|
||||
rgFilterType: TRadioGroup;
|
||||
Splitter1: TSplitter;
|
||||
vdtFilter: TVirtualDrawTree;
|
||||
tFormClose: TTimer;
|
||||
vdtFilter: TVirtualList;
|
||||
vdtHues: TVirtualDrawTree;
|
||||
procedure btnClearClick(Sender: TObject);
|
||||
procedure btnDeleteClick(Sender: TObject);
|
||||
@@ -63,10 +64,18 @@ type
|
||||
procedure cbTileFilterChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure GroupBox1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure mnuUncheckHuesClick(Sender: TObject);
|
||||
procedure mnuCheckHuesClick(Sender: TObject);
|
||||
procedure rgFilterTypeClick(Sender: TObject);
|
||||
procedure tFormCloseTimer(Sender: TObject);
|
||||
procedure vdtFilterDragDrop(Sender: TBaseVirtualTree; Source: TObject;
|
||||
DataObject: IDataObject; Formats: TFormatArray; Shift: TShiftState;
|
||||
Pt: TPoint; var Effect: Integer; Mode: TDropMode);
|
||||
@@ -78,6 +87,8 @@ type
|
||||
procedure vdtHuesChecked(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
procedure vdtHuesDrawNode(Sender: TBaseVirtualTree;
|
||||
const PaintInfo: TVTPaintInfo);
|
||||
private
|
||||
FLastRMouseDown: DWORD;
|
||||
protected
|
||||
FLocked: Boolean;
|
||||
FCheckedHues: TBits;
|
||||
@@ -86,6 +97,8 @@ type
|
||||
property Locked: Boolean read FLocked write FLocked;
|
||||
function Filter(AStatic: TStaticItem): Boolean;
|
||||
procedure JumpToHue(AHueID: Word);
|
||||
procedure AddTile(ATileID: LongWord);
|
||||
procedure AddHue(AHueID: Word);
|
||||
end;
|
||||
|
||||
var
|
||||
@@ -94,16 +107,17 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
UfrmMain, UGameResources, UHue, UGraphicHelper, UGUIPlatformUtils;
|
||||
UfrmMain, UGameResources, UHue, UGraphicHelper, UGUIPlatformUtils, Language;
|
||||
|
||||
type
|
||||
PTileInfo = ^TTileInfo;
|
||||
TTileInfo = record
|
||||
ID: Word;
|
||||
ID: LongWord;
|
||||
ptr: Pointer;
|
||||
end;
|
||||
PHueInfo = ^THueInfo;
|
||||
THueInfo = record
|
||||
ID: Word;
|
||||
ID: LongWord;
|
||||
Hue: THue;
|
||||
end;
|
||||
|
||||
@@ -111,16 +125,21 @@ type
|
||||
|
||||
procedure TfrmFilter.FormShow(Sender: TObject);
|
||||
var
|
||||
upperLeft, lowerLeft: TPoint;
|
||||
wspos : TPoint;
|
||||
wrect : TRect;
|
||||
begin
|
||||
upperLeft := frmMain.pcLeft.ClientToScreen(Point(frmMain.pcLeft.Width, 0));
|
||||
lowerLeft := frmMain.pcLeft.ClientToScreen(Point(frmMain.pcLeft.Width,
|
||||
frmMain.pcLeft.Height));
|
||||
Left := upperLeft.x - 8;
|
||||
Top := upperLeft.y - 8;
|
||||
Height := lowerLeft.y - upperLeft.y;
|
||||
|
||||
SetWindowParent(Handle, frmMain.Handle);
|
||||
GetWindowRect(frmFilter.Handle, wrect);
|
||||
wspos := frmMain.oglGameWindow.ClientToScreen(Classes.Point(0, 0));
|
||||
Left := wspos.X - 1;
|
||||
Top := wspos.Y - 1;
|
||||
Height:= frmMain.oglGameWindow.ClientHeight - (wrect.Bottom - wrect.Top - ClientHeight);
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.GroupBox1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.mnuUncheckHuesClick(Sender: TObject);
|
||||
@@ -149,24 +168,27 @@ procedure TfrmFilter.vdtFilterDragDrop(Sender: TBaseVirtualTree;
|
||||
Source: TObject; DataObject: IDataObject; Formats: TFormatArray;
|
||||
Shift: TShiftState; Pt: TPoint; var Effect: Integer; Mode: TDropMode);
|
||||
var
|
||||
sourceTree: TVirtualDrawTree;
|
||||
selected, node: PVirtualNode;
|
||||
sourceTree: TVirtualList;
|
||||
selected: PVirtualItem;
|
||||
node: PVirtualNode;
|
||||
sourceTileInfo, targetTileInfo: PTileInfo;
|
||||
begin
|
||||
sourceTree := Source as TVirtualDrawTree;
|
||||
if (sourceTree <> Sender) and (sourceTree <> nil) and
|
||||
(sourceTree.Tag = 1) then
|
||||
sourceTree := Source as TVirtualList;
|
||||
if (sourceTree <> Sender) and (sourceTree <> nil) then
|
||||
begin
|
||||
Sender.BeginUpdate;
|
||||
selected := sourceTree.GetFirstSelected;
|
||||
while selected <> nil do
|
||||
begin
|
||||
sourceTileInfo := sourceTree.GetNodeData(selected);
|
||||
if sourceTileInfo^.ID > $3FFF then
|
||||
if (sourceTileInfo^.ID > $3FFF) and (sourceTileInfo^.ID < $0F000000) then
|
||||
begin
|
||||
node := Sender.AddChild(nil);
|
||||
targetTileInfo := Sender.GetNodeData(node);
|
||||
targetTileInfo^.ID := sourceTileInfo^.ID;
|
||||
//node := Sender.AddChild(nil);
|
||||
//targetTileInfo := Sender.GetNodeData(node);
|
||||
//targetTileInfo^.ID := sourceTileInfo^.ID;
|
||||
Logger.Send([lcClient, lcDebug], 'TfrmFilter.vdtFilterDragDrop TileID', Format('0x%.8x', [sourceTileInfo^.ID]));
|
||||
AddTile(sourceTileInfo^.ID);
|
||||
|
||||
cbTileFilter.Checked := True;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
@@ -180,8 +202,7 @@ procedure TfrmFilter.vdtFilterDragOver(Sender: TBaseVirtualTree;
|
||||
Source: TObject; Shift: TShiftState; State: TDragState; Pt: TPoint;
|
||||
Mode: TDropMode; var Effect: Integer; var Accept: Boolean);
|
||||
begin
|
||||
if (Source <> Sender) and (Source is TVirtualDrawTree) and
|
||||
(TVirtualDrawTree(Source).Tag = 1) then
|
||||
if (Source <> Sender) and (Source is TVirtualDrawTree) then
|
||||
begin
|
||||
Accept := True;
|
||||
end;
|
||||
@@ -244,8 +265,8 @@ function TfrmFilter.Filter(AStatic: TStaticItem): Boolean;
|
||||
var
|
||||
found: Boolean;
|
||||
tileInfo: PTileInfo;
|
||||
node: PVirtualNode;
|
||||
id: Word;
|
||||
node: PVirtualItem;
|
||||
id: LongWord;
|
||||
begin
|
||||
if cbTileFilter.Checked then
|
||||
begin
|
||||
@@ -296,12 +317,70 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.AddTile(ATileID: LongWord);
|
||||
var
|
||||
selected, node: PVirtualItem;
|
||||
sourceTileInfo, targetTileInfo: PTileInfo;
|
||||
exists: Boolean;
|
||||
begin
|
||||
if (ATileID > $3FFF) and (ATileID < $0F000000) then
|
||||
begin
|
||||
exists := False;
|
||||
vdtFilter.BeginUpdate;
|
||||
|
||||
selected := vdtFilter.GetFirst();
|
||||
while selected <> nil do
|
||||
begin
|
||||
sourceTileInfo := vdtFilter.GetNodeData(selected);
|
||||
if sourceTileInfo^.ID = ATileID then
|
||||
begin
|
||||
exists := True;
|
||||
break;
|
||||
end;
|
||||
selected := vdtFilter.GetNext(selected);
|
||||
end;
|
||||
if not exists then
|
||||
begin
|
||||
node := vdtFilter.AddItem(nil);
|
||||
targetTileInfo := vdtFilter.GetNodeData(node);
|
||||
targetTileInfo^.ID := ATileID;
|
||||
end;
|
||||
|
||||
vdtFilter.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.AddHue(AHueID: Word);
|
||||
var
|
||||
hueInfo: PHueInfo;
|
||||
node: PVirtualNode;
|
||||
begin
|
||||
node := vdtHues.GetFirst;
|
||||
while node <> nil do
|
||||
begin
|
||||
hueInfo := vdtHues.GetNodeData(node);
|
||||
if hueInfo^.ID = AHueID then
|
||||
begin
|
||||
//FCheckedHues.Bits[AHueID] := True;
|
||||
vdtHues.CheckState[node] := csCheckedNormal;
|
||||
vdtHues.ClearSelection;
|
||||
vdtHues.Selected[node] := True;
|
||||
vdtHues.FocusedNode := node;
|
||||
node := nil;
|
||||
end else
|
||||
node := vdtHues.GetNext(node);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
hueInfo: PHueInfo;
|
||||
node: PVirtualNode;
|
||||
begin
|
||||
vdtFilter := TVirtualList.Create(vdtFilter);
|
||||
LanguageTranslate(Self);
|
||||
|
||||
FLocked := False;
|
||||
vdtFilter.NodeDataSize := SizeOf(TTileInfo);
|
||||
vdtHues.NodeDataSize := SizeOf(THueInfo);
|
||||
@@ -326,9 +405,56 @@ begin
|
||||
if FCheckedHues <> nil then FreeAndNil(FCheckedHues);
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if (Key = VK_SPACE) and Visible then begin
|
||||
frmFilter.Locked := True;
|
||||
frmFilter.Hide;
|
||||
frmFilter.Locked := False;
|
||||
// Говно код для задержки чтобы дать время обработать события что возвращают фокус
|
||||
tFormClose.Interval := 10;
|
||||
tFormClose.Tag := PtrInt(False);
|
||||
tFormClose.Enabled := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.tFormCloseTimer(Sender: TObject);
|
||||
begin
|
||||
if (Boolean(tFormClose.Tag)) then begin
|
||||
frmFilter.Locked := True;
|
||||
frmFilter.Hide;
|
||||
frmFilter.Locked := False;
|
||||
end;
|
||||
frmMain.SetFocus;
|
||||
tFormClose.Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.FormMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
If Button = mbRight then
|
||||
FLastRMouseDown := GetTickCount;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.FormMouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
if (Visible and not frmMain.mnuAutoShowFilterWindow.Checked and (GetTickCount - FLastRMouseDown < 1000)) then
|
||||
begin
|
||||
frmFilter.Locked := True;
|
||||
frmFilter.Hide;
|
||||
frmFilter.Locked := False;
|
||||
frmMain.SetFocus;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.btnDeleteClick(Sender: TObject);
|
||||
begin
|
||||
vdtFilter.BeginUpdate;
|
||||
vdtFilter.DeleteSelectedNodes;
|
||||
vdtFilter.EndUpdate;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.cbHueFilterChange(Sender: TObject);
|
||||
@@ -344,6 +470,7 @@ end;
|
||||
procedure TfrmFilter.btnClearClick(Sender: TObject);
|
||||
begin
|
||||
vdtFilter.Clear;
|
||||
frmMain.InvalidateFilter;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
@@ -1,59 +1,588 @@
|
||||
inherited frmHueSettings: TfrmHueSettings
|
||||
Left = 290
|
||||
Height = 209
|
||||
Top = 171
|
||||
Width = 217
|
||||
Caption = 'Hue Settings'
|
||||
ClientHeight = 209
|
||||
ClientWidth = 217
|
||||
Left = 1300
|
||||
Height = 496
|
||||
Top = 33
|
||||
Width = 516
|
||||
Caption = 'Выбор цвета'
|
||||
ClientHeight = 496
|
||||
ClientWidth = 516
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnHide = FormHide
|
||||
OnShow = FormShow
|
||||
object lblHue: TLabel[0]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideLeft.Control = cbRandom
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = edHue
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 8
|
||||
AnchorSideRight.Control = edHue
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 410
|
||||
Height = 16
|
||||
Top = 12
|
||||
Width = 26
|
||||
BorderSpacing.Left = 8
|
||||
Caption = 'Hue:'
|
||||
Top = 9
|
||||
Width = 30
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Left = 2
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Right = 65
|
||||
Caption = 'Цвет:'
|
||||
ParentColor = False
|
||||
end
|
||||
object edHue: TEdit[1]
|
||||
AnchorSideLeft.Control = lblHue
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 42
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 80
|
||||
AnchorSideTop.Control = lbHue
|
||||
AnchorSideRight.Control = gbPreview
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 444
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 61
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 7
|
||||
OnEditingDone = edHueEditingDone
|
||||
TabOrder = 0
|
||||
TabOrder = 1
|
||||
end
|
||||
object lbHue: TListBox[2]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = gbPreview
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 484
|
||||
Top = 6
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 4
|
||||
BorderSpacing.Bottom = 6
|
||||
DragMode = dmAutomatic
|
||||
ItemHeight = 16
|
||||
OnClick = lbHueDblClick
|
||||
OnDblClick = lbHueDblClick
|
||||
OnDrawItem = lbHueDrawItem
|
||||
OnSelectionChange = lbHueSelectionChange
|
||||
Style = lbOwnerDrawFixed
|
||||
TabOrder = 2
|
||||
end
|
||||
object gbRandom: TGroupBox[3]
|
||||
AnchorSideLeft.Control = gbPreview
|
||||
AnchorSideTop.Control = lbHue
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = gbPreview
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 325
|
||||
Height = 250
|
||||
Top = 240
|
||||
Width = 187
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Набор случайных цветов'
|
||||
ClientHeight = 232
|
||||
ClientWidth = 183
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
object btnAddRandom: TSpeedButton
|
||||
AnchorSideLeft.Control = gbRandom
|
||||
AnchorSideTop.Control = gbRandom
|
||||
Left = 4
|
||||
Height = 22
|
||||
Hint = 'Add'
|
||||
Top = 0
|
||||
Width = 23
|
||||
BorderSpacing.Left = 4
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000464
|
||||
000C025D0073025D00BA025D00CC025D00CC025D00CC025D00CC025D00CC025D
|
||||
00CC025D00CC025D00CC025D00BA025D00730464000CFFFFFF00FFFFFF00066D
|
||||
0073129208DD20CC10F922D911FF22D911FF22D911FF22D911FF22D911FF22D9
|
||||
11FF22D911FF22D911FF1FCC0FF9109207DD066D0073FFFFFF00FFFFFF000A7D
|
||||
00BA25CA15F922D111FF22D111FF22D111FF22D111FF22B611FF22B611FF22D1
|
||||
11FF22D111FF22D111FF22D111FF20C80FF90A7D00BAFFFFFF00FFFFFF000C84
|
||||
00CC2BCC1AFF22C811FF22C811FF22C811FF22BC11FFE8E8E8FFECECECFF22BC
|
||||
11FF22C811FF22C811FF22C811FF22C811FF0C8400CCFFFFFF00FFFFFF000D89
|
||||
00CC31C620FF22BE11FF22BE11FF22BE11FF22B511FFE4E4E4FFE8E8E8FF22B5
|
||||
11FF22BE11FF22BE11FF22BE11FF23BE12FF0D8900CCFFFFFF00FFFFFF000E8D
|
||||
00CC41C330FF23B412FF22A811FF22A811FF22A411FFE0E0E0FFE4E4E4FF22A4
|
||||
11FF22A811FF22A811FF22B411FF25B514FF0E8D00CCFFFFFF00FFFFFF000F92
|
||||
00CC52C941FF33AF22FFD4D4D4FFD3D3D3FFD7D7D7FFDCDCDCFFE0E0E0FFE4E4
|
||||
E4FFE8E8E8FFECECECFF22A611FF28AF17FF0F9200CCFFFFFF00FFFFFF001096
|
||||
00CC55CC44FF3CB32BFFF8F8F8FFE1E1E1FFD5D5D5FFD7D7D7FFDCDCDCFFE0E0
|
||||
E0FFE4E4E4FFE8E8E8FF22A011FF2CAA1BFF109600CCFFFFFF00FFFFFF00119A
|
||||
00CC5AD149FF47BE36FF3EB52DFF3EB52DFF37AE26FFEBEBEBFFE2E2E2FF259D
|
||||
14FF239B12FF239B12FF279F16FF39B128FF119A00CCFFFFFF00FFFFFF00129E
|
||||
00CC60D74FFF4EC53DFF4EC53DFF4EC53DFF44BB33FFFFFFFFFFFFFFFFFF44BB
|
||||
33FF4EC53DFF4EC53DFF4EC53DFF58CF47FF129E00CCFFFFFF00FFFFFF0013A2
|
||||
00CC67DE56FF57CE46FF57CE46FF57CE46FF4AC139FFFFFFFFFFFFFFFFFF4AC1
|
||||
39FF57CE46FF57CE46FF57CE46FF60D74FFF13A200CCFFFFFF00FFFFFF0014A5
|
||||
00BA64DE53F95FD64EFF5FD64EFF5FD64EFF5FD64EFF50C73FFF50C73FFF5FD6
|
||||
4EFF5FD64EFF5FD64EFF5FD64EFF60DA4FF914A500BAFFFFFF00FFFFFF0014A8
|
||||
007337C124DD66E054F96EE55DFF6EE55DFF6EE55DFF6EE55DFF6DE45CFF6DE4
|
||||
5CFF6DE45CFF6DE45CFF64DF53F936BF23DD14A80073FFFFFF00FFFFFF0015A9
|
||||
000C15AA007315AA00BA15AA00CC15AA00CC15AA00CC15AA00CC15AA00CC15AA
|
||||
00CC15AA00CC15AA00CC15AA00BA15AA007315A9000CFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnAddRandomClick
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object btnDeleteRandom: TSpeedButton
|
||||
AnchorSideLeft.Control = btnAddRandom
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = btnAddRandom
|
||||
Left = 31
|
||||
Height = 22
|
||||
Hint = 'Delete'
|
||||
Top = 0
|
||||
Width = 23
|
||||
BorderSpacing.Left = 4
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
|
||||
640C00005D7300005DBA00005DCC00005DCC00005DCC00005DCC00005DCC0000
|
||||
5DCC00005DCC00005DCC00005DBA00005D730000640CFFFFFF00FFFFFF000000
|
||||
6D73080893DD1010CCF91111D9FF1111D9FF1111D9FF1111D9FF1111D9FF1111
|
||||
D9FF1111D9FF1111D9FF0F0FCCF9070792DD00006D73FFFFFF00FFFFFF000000
|
||||
7DBA1616CBF91111D1FF1111D1FF1111D1FF1111D1FF1111D1FF1111D1FF1111
|
||||
D1FF1111D1FF1111D1FF1111D1FF0F0FC8F900007DBAFFFFFF00FFFFFF000000
|
||||
84CC1C1CCEFF1111C8FF1111C8FF1111C8FF1111C8FF1111C8FF1111C8FF1111
|
||||
C8FF1111C8FF1111C8FF1111C8FF1111C8FF000084CCFFFFFF00FFFFFF000000
|
||||
89CC2222C8FF1111BEFF1111BEFF1111BEFF1111BEFF1111BEFF1111BEFF1111
|
||||
BEFF1111BEFF1111BEFF1111BEFF1212BEFF000089CCFFFFFF00FFFFFF000000
|
||||
8DCC3434C7FF1212B4FF1111A8FF1111A8FF1111A8FF1111A8FF1111A8FF1111
|
||||
A8FF1111A8FF1111A8FF1111B4FF1414B6FF00008DCCFFFFFF00FFFFFF000000
|
||||
92CC4646CEFF2626B5FFD0D0D0FFCCCCCCFFD1D1D1FFDCDCDCFFE8E8E8FFEEEE
|
||||
EEFFEEEEEEFFEEEEEEFF1111AAFF1818B0FF000092CCFFFFFF00FFFFFF000000
|
||||
96CC4A4AD2FF3333BBFFF8F8F8FFDEDEDEFFCECECEFFD1D1D1FFDCDCDCFFE8E8
|
||||
E8FFEEEEEEFFEEEEEEFF1111A1FF1D1DACFF000096CCFFFFFF00FFFFFF000000
|
||||
9ACC5050D8FF3737BFFF3737BFFF3737BFFF3232BAFF2727B0FF1C1CA6FF1616
|
||||
A0FF12129CFF12129CFF1616A0FF2B2BB5FF00009ACCFFFFFF00FFFFFF000000
|
||||
9ECC5A5AE2FF4242CAFF4242CAFF4242CAFF4242CAFF4242CAFF4242CAFF4242
|
||||
CAFF4242CAFF4242CAFF4242CAFF4E4ED6FF00009ECCFFFFFF00FFFFFF000000
|
||||
A2CC6262EAFF4F4FD7FF4F4FD7FF4F4FD7FF4F4FD7FF4F4FD7FF4F4FD7FF4F4F
|
||||
D7FF4F4FD7FF4F4FD7FF4F4FD7FF5A5AE2FF0000A2CCFFFFFF00FFFFFF000000
|
||||
A5BA6060ECF95B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5B
|
||||
E3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE7F90000A5BAFFFFFF00FFFFFF000000
|
||||
A8732A2AC7DD6363EFF96D6DF5FF6D6DF5FF6D6DF5FF6D6DF5FF6D6DF5FF6D6D
|
||||
F5FF6D6DF5FF6C6CF4FF6262EEF92929C5DD0000A873FFFFFF00FFFFFF000000
|
||||
A90C0000AA730000AABA0000AACC0000AACC0000AACC0000AACC0000AACC0000
|
||||
AACC0000AACC0000AACC0000AABA0000AA730000A90CFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnDeleteRandomClick
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object btnClearRandom: TSpeedButton
|
||||
AnchorSideLeft.Control = btnDeleteRandom
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = btnDeleteRandom
|
||||
Left = 58
|
||||
Height = 22
|
||||
Hint = 'Clear'
|
||||
Top = 0
|
||||
Width = 23
|
||||
BorderSpacing.Left = 4
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
|
||||
640C00005D7300005DBA00005DCC00005DCC00005DCC00005DCC00005DCC0000
|
||||
5DCC00005DCC00005DCC00005DBA00005D730000640CFFFFFF00FFFFFF000000
|
||||
6D73080893DD1010CCF91111D9FF1111D9FF1111D9FF1111D9FF1111D9FF1111
|
||||
D9FF1111D9FF1111D9FF0F0FCCF9070792DD00006D73FFFFFF00FFFFFF000000
|
||||
7DBA1616CBF91111D1FF1111D1FF1111B6FF1111D1FF1111D1FF1111D1FF1111
|
||||
D1FF1111B6FF1111D1FF1111D1FF0F0FC8F900007DBAFFFFFF00FFFFFF000000
|
||||
84CC1C1CCEFF1111C8FF1111B2FFDCDCDCFF1111B2FF1111C8FF1111C8FF1111
|
||||
B2FFEEEEEEFF1111B2FF1111C8FF1111C8FF000084CCFFFFFF00FFFFFF000000
|
||||
89CC2222C8FF1111BEFFD1D1D1FFD6D6D6FFDCDCDCFF1111ADFF1111ADFFEAEA
|
||||
EAFFEEEEEEFFEEEEEEFF1111BEFF1212BEFF000089CCFFFFFF00FFFFFF000000
|
||||
8DCC3434C7FF1212B4FF1111B4FFD1D1D1FFD6D6D6FFDCDCDCFFE2E2E2FFE6E6
|
||||
E6FFEAEAEAFF1111B4FF1111B4FF1414B6FF00008DCCFFFFFF00FFFFFF000000
|
||||
92CC4646CEFF2626B5FF1414ABFF1111AAFFD1D1D1FFD6D6D6FFDCDCDCFFE2E2
|
||||
E2FF1111AAFF1111AAFF1111AAFF1818B0FF000092CCFFFFFF00FFFFFF000000
|
||||
96CC4A4AD2FF3333BBFF2E2EB8FF13139FFFCECECEFFD1D1D1FFD6D6D6FFDCDC
|
||||
DCFF11119EFF1111A1FF1111A1FF1D1DACFF000096CCFFFFFF00FFFFFF000000
|
||||
9ACC5050D8FF3737BFFF2323ABFFFFFFFFFFF7F7F7FFE8E8E8FFDEDEDEFFDBDB
|
||||
DBFFDDDDDDFF11119BFF1616A0FF2B2BB5FF00009ACCFFFFFF00FFFFFF000000
|
||||
9ECC5A5AE2FF4242CAFFFFFFFFFFFFFFFFFFFFFFFFFF4242CAFF4242CAFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFF4242CAFF4E4ED6FF00009ECCFFFFFF00FFFFFF000000
|
||||
A2CC6262EAFF4F4FD7FF4F4FD7FFFFFFFFFF4F4FD7FF4F4FD7FF4F4FD7FF4F4F
|
||||
D7FFFFFFFFFF4F4FD7FF4F4FD7FF5A5AE2FF0000A2CCFFFFFF00FFFFFF000000
|
||||
A5BA6060ECF95B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5B
|
||||
E3FF5B5BE3FF5B5BE3FF5B5BE3FF5B5BE7F90000A5BAFFFFFF00FFFFFF000000
|
||||
A8732A2AC7DD6363EFF96D6DF5FF6D6DF5FF6D6DF5FF6D6DF5FF6D6DF5FF6D6D
|
||||
F5FF6D6DF5FF6C6CF4FF6262EEF92929C5DD0000A873FFFFFF00FFFFFF000000
|
||||
A90C0000AA730000AABA0000AACC0000AACC0000AACC0000AACC0000AACC0000
|
||||
AACC0000AACC0000AACC0000AABA0000AA730000A90CFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnClearRandomClick
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object btnRandomPresetSave: TSpeedButton
|
||||
AnchorSideTop.Control = cbRandomPreset
|
||||
AnchorSideRight.Control = btnRandomPresetDelete
|
||||
Left = 131
|
||||
Height = 22
|
||||
Hint = 'Save Preset'
|
||||
Top = 205
|
||||
Width = 22
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 4
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
000000000000000000000000000000000000BA6833FFC38458FFD38B68FFE18F
|
||||
70FFDC8D6CFFDA8B6DFFD78A6EFFCD8B6CFFAB6D44FFA65F2EFF00000000BA65
|
||||
30FFBB6631FFBA6630FFBA6630FFBA6530FFC68355FFEFCEBAFFDDFFFFFF87EE
|
||||
C7FFA2F4D7FFA2F6D7FF8CEEC7FFE0FFFFFFDDA285FFAB6A3EFFBC6933FFF8F1
|
||||
EAFFF7ECDFFFF6EADEFFF6EADCFFF6EADCFFC37F51FFEFB69AFFEAF3E8FF51BF
|
||||
84FF6FC998FF71C999FF54BF84FFE4F4E9FFDD9C7BFFAA693AFFBF7138FFF5EB
|
||||
DFFFFDBF68FFFBBE65FFFCBE64FFFCBE64FFC48154FFEAB697FFF3F3EAFFEDF1
|
||||
E6FFEFF1E6FFEFF0E6FFEDF1E5FFF3F5EDFFD59C79FFB07044FFC1783CFFF7ED
|
||||
E3FFFDC26EFFFFD79EFFFFD69BFFFFD798FFC98B61FFE6B592FFE2A781FFE1A7
|
||||
81FFDEA37DFFDCA17BFFDB9F79FFD99E77FFD49A73FFBB7E57FFC47C40FFF7F0
|
||||
E6FFF8B455FFF7B554FFF8B453FFF8B253FFCA8D65FFEAB899FFDDA57EFFDDA6
|
||||
80FFDBA37CFFD9A07AFFD9A079FFD89F78FFD89E78FFBF845DFFC58245FFF8F2
|
||||
EBFFFEE7D6FFFDE7D6FFFDE7D6FFFDE6D5FFC8885DFFEFBFA1FFFDFCFAFFFEFC
|
||||
FBFFFEFDFDFFFEFDFCFFFDFBFAFFFDFCFBFFDDA885FFC17F53FFC68447FFF9F3
|
||||
ECFFFEE8D6FFFDE7D6FFFDE7D6FFFDE7D5FFC7865BFFEFC09EFFFFFFFFFFCC93
|
||||
6EFFFFFFFFFFFFFFFFFFFFFBF7FFFFF8F1FFE4AF8CFFC78A61FFC68849FFF9F4
|
||||
EDFFFEE8D8FFFEE8D7FFFEE7D6FFFDE5D3FFCC8D65FFF3CDB0FFFFFFFFFFE3C7
|
||||
B3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEABFA1FFC98960FFC6884AFFF9F4
|
||||
EFFFFEE7D7FFFDE7D5FFFDE6D4FFFCE6D2FFD4976EFFD49E7BFFD09871FFD6A4
|
||||
82FFCD8E68FFCD9069FFD09A75FFD19973FFC88B62FF00000000C6894BFFF9F4
|
||||
F0FFFCE6D3FFFDE7D3FFFCE4D1FFFBE3CDFFFAE0C8FFF8DCC2FFF5D6BBFFF3D4
|
||||
B5FFF1D2B3FFF8F4F0FFC48246FF000000000000000000000000C6894BFFF9F5
|
||||
F1FFFCE3CFFFFCE4CFFFFCE3CDFFFAE1CAFFF9DDC4FFF6D9BCFFF4E9DFFFF7F2
|
||||
ECFFFBF7F3FFF5EFE9FFC27E45FF000000000000000000000000C6894CFFF9F5
|
||||
F1FFFCE3CDFFFBE3CDFFFBE2CBFFF9E0C8FFF8DCC2FFF5D6BAFFFDFBF8FFFCE6
|
||||
CDFFFAE5C9FFE2B684FFBF7942FF000000000000000000000000C5884BFFFAF6
|
||||
F2FFFAE0C7FFFBE2C9FFFBE0C8FFF9DFC5FFF8DBC1FFF4D6B8FFFFFBF8FFF6D8
|
||||
B4FFE1B07DFFDB9264FF00000000000000000000000000000000C48549FFF7F2
|
||||
ECFFF8F4EEFFF8F3EDFFF8F3EDFFF8F3EDFFF8F2ECFFF7F2ECFFF2E6D7FFE2B2
|
||||
7DFFDB9465FF000000000000000000000000000000000000000000000000C88B
|
||||
4DFFC88C4FFFC88C4FFFC88C4FFFC88D4FFFC98C4FFFC78B4FFFC5894BFFC476
|
||||
3BFF000000000000000000000000000000000000000000000000
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnRandomPresetSaveClick
|
||||
ShowCaption = False
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object btnRandomPresetDelete: TSpeedButton
|
||||
AnchorSideTop.Control = btnRandomPresetSave
|
||||
AnchorSideRight.Control = gbRandom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 157
|
||||
Height = 22
|
||||
Hint = 'Delete Preset'
|
||||
Top = 205
|
||||
Width = 22
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 4
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
0000BA6530FFBB6631FFBA6630FFBA6630FFBA6630FFBA6530FFBA652FFFB965
|
||||
2EFF6E5E76FF1949A8FF0542BBFF1348ADFF394E8FFF0000000000000000BC69
|
||||
33FFF8F1EAFFF7ECDFFFF6EBDEFFF6EADEFFF6EADCFFF6EADCFFFAF3EBFF8AA5
|
||||
D7FF2866CAFF2177E6FF0579EAFF0164DDFF064DBBFF0000000000000000BF71
|
||||
38FFF5EBDFFFFDBF68FFFCBD67FFFBBE65FFFCBE64FFFCBE64FFFCBD62FF1E52
|
||||
B0FF639DF4FF187FFFFF0076F8FF0076EEFF0368E1FF0345B9FF00000000C178
|
||||
3CFFF7EDE3FFFDC26EFFFFD8A0FFFFD79EFFFFD69BFFFFD798FFFFD696FF0543
|
||||
BCFFAECDFEFFFFFFFFFFFFFFFFFFFFFFFFFF187FEFFF0442BCFF00000000C47C
|
||||
40FFF7F0E6FFF8B455FFF7B456FFF7B554FFF8B453FFF8B253FFF7B352FF2453
|
||||
ABFF8DB5F6FF4D92FFFF1177FFFF2186FFFF408AEBFF0344B9FF00000000C580
|
||||
42FFF8F1E8FFFEE5D5FFFDE5D3FFFDE5D3FFFCE5D3FFFCE5D3FFFCE4D1FF94A1
|
||||
C9FF3D76D1FF8DB5F7FFB8D6FEFF72A8F5FF2F6BC9FF0000000000000000C582
|
||||
45FFF8F2EBFFFEE7D6FFFDE7D6FFFDE7D6FFFDE7D6FFFDE6D5FFFDE5D3FFFCE4
|
||||
D1FF94A1C9FF2A5EC1FF0543BCFF1F59BFFF686279FF0000000000000000C684
|
||||
47FFF9F3ECFFFEE8D6FFFEE8D7FFFDE7D6FFFDE7D6FFFDE7D5FFFDE5D3FFFBE4
|
||||
D0FFFBE3CCFFFADFC7FFFADFC6FFFAF2EAFFC68042FF0000000000000000C688
|
||||
49FFF9F4EDFFFEE8D8FFFEE8D8FFFEE8D7FFFEE7D6FFFDE5D3FFFCE4D1FFFBE1
|
||||
CCFFFAE0C7FFF9DDC3FFF8DCC2FFFAF4EDFFC68245FF0000000000000000C688
|
||||
4AFFF9F4EFFFFEE7D7FFFDE7D6FFFDE7D5FFFDE6D4FFFCE6D2FFFBE1CCFFFADF
|
||||
C7FFF8DCC2FFF6DABDFFF6D8BBFFFAF4EFFFC68346FF0000000000000000C689
|
||||
4BFFF9F4F0FFFCE6D3FFFCE6D4FFFDE7D3FFFCE4D1FFFBE3CDFFFAE0C8FFF8DC
|
||||
C2FFF5D6BBFFF3D4B5FFF1D2B3FFF8F4F0FFC48246FF0000000000000000C689
|
||||
4BFFF9F5F1FFFCE3CFFFFBE4D0FFFCE4CFFFFCE3CDFFFAE1CAFFF9DDC4FFF6D9
|
||||
BCFFF4E9DFFFF7F2ECFFFBF7F3FFF5EFE9FFC27E45FF0000000000000000C689
|
||||
4CFFF9F5F1FFFCE3CDFFFBE3CEFFFBE3CDFFFBE2CBFFF9E0C8FFF8DCC2FFF5D6
|
||||
BAFFFDFBF8FFFCE6CDFFFAE5C9FFE2B684FFBF7942FF0000000000000000C588
|
||||
4BFFFAF6F2FFFAE0C7FFFBE1C9FFFBE2C9FFFBE0C8FFF9DFC5FFF8DBC1FFF4D6
|
||||
B8FFFFFBF8FFF6D8B4FFE1B07DFFDB9264FF000000000000000000000000C485
|
||||
49FFF7F2ECFFF8F4EEFFF8F4EDFFF8F3EDFFF8F3EDFFF8F3EDFFF8F2ECFFF7F2
|
||||
ECFFF2E6D7FFE2B27DFFDB9465FF000000000000000000000000000000000000
|
||||
0000C88B4DFFC88C4FFFC88C4FFFC88C4FFFC88C4FFFC88D4FFFC98C4FFFC78B
|
||||
4FFFC5894BFFC4763BFF00000000000000000000000000000000
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnRandomPresetDeleteClick
|
||||
ShowCaption = False
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object cbRandomPreset: TComboBox
|
||||
AnchorSideLeft.Control = gbRandom
|
||||
AnchorSideRight.Control = btnRandomPresetSave
|
||||
AnchorSideBottom.Control = gbRandom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 4
|
||||
Height = 23
|
||||
Top = 205
|
||||
Width = 123
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Right = 4
|
||||
BorderSpacing.Bottom = 4
|
||||
ItemHeight = 15
|
||||
OnChange = cbRandomPresetChange
|
||||
Sorted = True
|
||||
Style = csDropDownList
|
||||
TabOrder = 0
|
||||
end
|
||||
object lbRandom: TListBox
|
||||
AnchorSideLeft.Control = gbRandom
|
||||
AnchorSideTop.Control = btnAddRandom
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = gbRandom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = cbRandomPreset
|
||||
Left = 4
|
||||
Height = 177
|
||||
Top = 24
|
||||
Width = 175
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Right = 4
|
||||
BorderSpacing.Bottom = 4
|
||||
ItemHeight = 0
|
||||
MultiSelect = True
|
||||
OnDragDrop = lbRandomDragDrop
|
||||
OnDragOver = lbRandomDragOver
|
||||
OnDrawItem = lbHueDrawItem
|
||||
Style = lbOwnerDrawVariable
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object gbPreview: TGroupBox[4]
|
||||
AnchorSideLeft.Control = lbHue
|
||||
AnchorSideTop.Control = edHue
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 160
|
||||
Top = 41
|
||||
Width = 201
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Around = 8
|
||||
ItemHeight = 16
|
||||
OnDrawItem = lbHueDrawItem
|
||||
OnSelectionChange = lbHueSelectionChange
|
||||
Style = lbOwnerDrawFixed
|
||||
TabOrder = 1
|
||||
AnchorSideBottom.Control = gbLastUsed
|
||||
Left = 325
|
||||
Height = 93
|
||||
Top = 37
|
||||
Width = 187
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 4
|
||||
BorderSpacing.Bottom = 4
|
||||
Caption = 'Предпросмотр цвета на тайле'
|
||||
ClientHeight = 75
|
||||
ClientWidth = 183
|
||||
TabOrder = 4
|
||||
object ImagePreviewItem: TImage
|
||||
AnchorSideLeft.Control = gbPreview
|
||||
AnchorSideTop.Control = edTileId
|
||||
AnchorSideRight.Control = gbPreview
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = gbPreview
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 4
|
||||
Height = 209
|
||||
Top = 6
|
||||
Width = 175
|
||||
Align = alCustom
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Around = 4
|
||||
end
|
||||
object edTileId: TEdit
|
||||
AnchorSideLeft.Control = lblTileId
|
||||
AnchorSideTop.Control = gbPreview
|
||||
AnchorSideRight.Control = ImagePreviewItem
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 118
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 61
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Left = 36
|
||||
OnEditingDone = edTileIdEditingDone
|
||||
TabOrder = 0
|
||||
end
|
||||
object lblTileId: TLabel
|
||||
AnchorSideLeft.Control = gbPreview
|
||||
AnchorSideTop.Control = edTileId
|
||||
AnchorSideRight.Control = edTileId
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 84
|
||||
Height = 16
|
||||
Top = 4
|
||||
Width = 31
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Right = 64
|
||||
Caption = 'Тайл:'
|
||||
ParentColor = False
|
||||
end
|
||||
object ShowAll: TButton
|
||||
AnchorSideLeft.Control = ImagePreviewItem
|
||||
AnchorSideTop.Control = edTileId
|
||||
AnchorSideRight.Control = edTileId
|
||||
AnchorSideBottom.Control = edTileId
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 4
|
||||
Height = 20
|
||||
Top = 2
|
||||
Width = 78
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Right = 4
|
||||
BorderSpacing.Bottom = 1
|
||||
Caption = 'Показать все'
|
||||
OnClick = ShowAllClick
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
inherited tmClose: TTimer[3]
|
||||
left = 152
|
||||
top = 112
|
||||
object cbRandom: TCheckBox[5]
|
||||
AnchorSideLeft.Control = gbPreview
|
||||
AnchorSideTop.Control = edHue
|
||||
AnchorSideRight.Control = gbRandom
|
||||
Left = 325
|
||||
Height = 19
|
||||
Top = 7
|
||||
Width = 84
|
||||
Align = alCustom
|
||||
BorderSpacing.Top = 1
|
||||
Caption = 'Случайный'
|
||||
OnChange = cbRandomChange
|
||||
TabOrder = 5
|
||||
end
|
||||
object vdtHuePreview: TVirtualDrawTree[6]
|
||||
Tag = -1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Cursor = crHandPoint
|
||||
Left = 6
|
||||
Height = 240
|
||||
Hint = '-'
|
||||
Top = 259
|
||||
Width = 314
|
||||
Anchors = []
|
||||
BorderSpacing.Top = 1
|
||||
BorderSpacing.Right = 3
|
||||
BorderStyle = bsNone
|
||||
Color = clBlack
|
||||
Colors.DropMarkColor = 16762250
|
||||
Colors.DropTargetColor = 16762250
|
||||
Colors.DropTargetBorderColor = 16762250
|
||||
Colors.FocusedSelectionColor = 16762250
|
||||
Colors.FocusedSelectionBorderColor = 16762250
|
||||
Colors.HotColor = clYellow
|
||||
Colors.SelectionRectangleBlendColor = 16762250
|
||||
Colors.SelectionRectangleBorderColor = 16762250
|
||||
Colors.UnfocusedSelectionColor = 16769734
|
||||
Colors.UnfocusedSelectionBorderColor = 16769734
|
||||
Constraints.MinHeight = 64
|
||||
DefaultNodeHeight = 44
|
||||
DragMode = dmAutomatic
|
||||
DragOperations = []
|
||||
DragType = dtVCL
|
||||
Header.AutoSizeIndex = -1
|
||||
Header.Columns = <>
|
||||
Header.DefaultHeight = 17
|
||||
Header.MainColumn = -1
|
||||
Header.Options = [hoShowHint]
|
||||
Header.ParentFont = True
|
||||
Header.Style = hsFlatButtons
|
||||
HintMode = hmHint
|
||||
ParentShowHint = False
|
||||
ScrollBarOptions.AlwaysVisible = True
|
||||
ScrollBarOptions.ScrollBars = ssVertical
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
TreeOptions.AutoOptions = [toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toFullRowDrag]
|
||||
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages, toStaticBackground]
|
||||
TreeOptions.SelectionOptions = [toMultiSelect]
|
||||
Visible = False
|
||||
OnClick = vdtHuePreviewClick
|
||||
OnDblClick = vdtHuePreviewClick
|
||||
OnDrawNode = vdtHuePreviewDrawNode
|
||||
OnMouseMove = vdtHuePreviewMouseMove
|
||||
end
|
||||
object gbLastUsed: TGroupBox[7]
|
||||
AnchorSideLeft.Control = gbPreview
|
||||
AnchorSideTop.Control = lbHue
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = gbPreview
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = gbRandom
|
||||
Left = 325
|
||||
Height = 100
|
||||
Top = 134
|
||||
Width = 187
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Последние выбранные цвета'
|
||||
ClientHeight = 82
|
||||
ClientWidth = 183
|
||||
TabOrder = 6
|
||||
Visible = False
|
||||
object lbLastUsed: TListBox
|
||||
AnchorSideLeft.Control = gbLastUsed
|
||||
AnchorSideTop.Control = gbLastUsed
|
||||
AnchorSideRight.Control = gbLastUsed
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = gbLastUsed
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 4
|
||||
Height = 78
|
||||
Top = 0
|
||||
Width = 175
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Right = 4
|
||||
BorderSpacing.Bottom = 4
|
||||
ItemHeight = 0
|
||||
OnClick = lbLastUsedDblClick
|
||||
OnDblClick = lbLastUsedDblClick
|
||||
OnDrawItem = lbHueDrawItem
|
||||
Style = lbOwnerDrawVariable
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
inherited tmClose: TTimer[8]
|
||||
left = 24
|
||||
top = 16
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,33 +31,118 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
UfrmToolWindow, UHue;
|
||||
ExtCtrls, Buttons, UfrmToolWindow, XMLRead, XMLWrite, DOM, VirtualTrees, VirtualList,
|
||||
Math, UHue, UArt, UTiledata, UfrmMain, ImagingComponents, LConvEncoding, ComCtrls,
|
||||
Windows, ShellAPI, Logging,
|
||||
ULandscape;//ImagingClasses, UPlatformTypes;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmHueSettings }
|
||||
|
||||
TfrmHueSettings = class(TfrmToolWindow)
|
||||
btnAddRandom: TSpeedButton;
|
||||
btnClearRandom: TSpeedButton;
|
||||
btnDeleteRandom: TSpeedButton;
|
||||
btnRandomPresetDelete: TSpeedButton;
|
||||
btnRandomPresetSave: TSpeedButton;
|
||||
gbLastUsed: TGroupBox;
|
||||
lbLastUsed: TListBox;
|
||||
ShowAll: TButton;
|
||||
cbRandom: TCheckBox;
|
||||
cbRandomPreset: TComboBox;
|
||||
edHue: TEdit;
|
||||
edTileId: TEdit;
|
||||
gbRandom: TGroupBox;
|
||||
gbPreview: TGroupBox;
|
||||
ImagePreviewItem: TImage;
|
||||
lblHue: TLabel;
|
||||
lbHue: TListBox;
|
||||
lblTileId: TLabel;
|
||||
lbRandom: TListBox;
|
||||
vdtHuePreview: TVirtualDrawTree;
|
||||
procedure btnAddRandomClick(Sender: TObject);
|
||||
procedure btnClearRandomClick(Sender: TObject);
|
||||
procedure btnDeleteRandomClick(Sender: TObject);
|
||||
procedure btnRandomPresetDeleteClick(Sender: TObject);
|
||||
procedure btnRandomPresetSaveClick(Sender: TObject);
|
||||
procedure cbRandomChange(Sender: TObject);
|
||||
procedure cbRandomPresetChange(Sender: TObject);
|
||||
procedure edHueEditingDone(Sender: TObject);
|
||||
procedure edTileIdEditingDone(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormHide(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure lbHueDblClick(Sender: TObject);
|
||||
procedure lbHueDrawItem(Control: TWinControl; Index: Integer; ARect: TRect;
|
||||
State: TOwnerDrawState);
|
||||
procedure lbHueSelectionChange(Sender: TObject; User: boolean);
|
||||
procedure lbLastUsedDblClick(Sender: TObject);
|
||||
procedure lbRandomDragDrop(Sender, Source: TObject; X, Y: Integer);
|
||||
procedure lbRandomDragOver(Sender, Source: TObject; X, Y: Integer;
|
||||
State: TDragState; var Accept: Boolean);
|
||||
procedure lvHueCustomDrawItem(Sender: TCustomListView; Item: TListItem;
|
||||
State: TCustomDrawState; var DefaultDraw: Boolean);
|
||||
procedure ShowAllClick(Sender: TObject);
|
||||
procedure UpdateItemPreview(ID : Integer; Hue: Integer);
|
||||
procedure vdtHuePreviewClick(Sender: TObject);
|
||||
procedure vdtHuePreviewDrawNode(Sender: TBaseVirtualTree;
|
||||
const PaintInfo: TVTPaintInfo);
|
||||
procedure vdtHuePreviewMouseMove(Sender: TObject; Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
private
|
||||
FConfigDir: String;
|
||||
FRandomHuePresetsFile: String;
|
||||
FRandomHuePresetsDoc: TXMLDocument;
|
||||
LastSelectedNode: PVirtualNode;
|
||||
LastSelectedColm: Integer;
|
||||
LastFormPosition: TPoint;
|
||||
function FindRandomPreset(AName: String): TDOMElement;
|
||||
procedure LoadRandomPresets;
|
||||
procedure SaveRandomPresets;
|
||||
procedure HuePreviewRebuild(ItemID, ItemWidth, ItemHeight: Integer);
|
||||
procedure HuePreviewFree();
|
||||
public
|
||||
function GetHue: Word;
|
||||
procedure AddLastUsed(hue: Word);
|
||||
public
|
||||
class procedure DrawHue(AHue: THue; ACanvas: TCanvas; ARect: TRect;
|
||||
ACaption: string);
|
||||
ACaption: string; lineWidth: Integer = 2);
|
||||
public
|
||||
lbDlgBadColrCaption: string;
|
||||
lbDlgBadColr: string;
|
||||
lbDlgBadTileCaption: string;
|
||||
lbDlgBadTile: string;
|
||||
lbDlgSavePrsCaption: string;
|
||||
lbDlgSavePrs: string;
|
||||
lbNoHuesName: string;
|
||||
end;
|
||||
|
||||
const
|
||||
vdtHuesPreviewColumnsMax = 1920 div 44;
|
||||
vdtHuesLastUsedLength = 14;
|
||||
|
||||
var
|
||||
frmHueSettings: TfrmHueSettings;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UGraphicHelper;
|
||||
UGameResources, UGraphicHelper, UfrmLogin, Language;
|
||||
|
||||
type
|
||||
PHuesInfo = ^THuesInfo;
|
||||
THuesInfo = record
|
||||
ID : array[0..vdtHuesPreviewColumnsMax] of Integer;
|
||||
Art: array[0..vdtHuesPreviewColumnsMax] of TArt;
|
||||
end;
|
||||
|
||||
PTileInfo = ^TTileInfo;
|
||||
TTileInfo = record
|
||||
ID: LongWord;
|
||||
ptr: Pointer;
|
||||
end;
|
||||
|
||||
{ TfrmHueSettings }
|
||||
|
||||
@@ -68,48 +153,385 @@ begin
|
||||
if (not TryStrToInt(edHue.Text, hueID)) or (hueID >= lbHue.Items.Count) then
|
||||
begin
|
||||
edHue.Text := Format('$%x', [lbHue.ItemIndex]);
|
||||
MessageDlg('Invalid Hue', 'The hue you''ve entered is invalid.', mtWarning, [mbOK], 0);
|
||||
MessageDlg(lbDlgBadColrCaption, lbDlgBadColr, mtWarning, [mbOK], 0);
|
||||
end else
|
||||
lbHue.ItemIndex := hueID;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.edTileIdEditingDone(Sender: TObject);
|
||||
var
|
||||
tileID: Integer;
|
||||
begin
|
||||
tileID := 0;
|
||||
if (not TryStrToInt(edTileId.Text, tileID)) or (tileID >= ResMan.Landscape.MaxStaticID) or (tileID <= 0) then
|
||||
begin
|
||||
edTileId.Text := Format('$%x', [edTileId.Tag - $4000]);
|
||||
MessageDlg(lbDlgBadTileCaption, lbDlgBadTile, mtWarning, [mbOK], 0);
|
||||
end else
|
||||
begin
|
||||
edTileId.Tag := $4000 + tileID;
|
||||
UpdateItemPreview(edTileId.Tag, lbHue.ItemIndex);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.AddLastUsed(hue: Word);
|
||||
var
|
||||
index: Integer;
|
||||
begin
|
||||
lbLastUsed.Items.BeginUpdate;
|
||||
for index := 0 to lbLastUsed.Items.Count - 1 do
|
||||
if PtrInt(lbLastUsed.Items.Objects[index]) = hue then begin
|
||||
lbLastUsed.Items.Delete(index);
|
||||
break;
|
||||
end;
|
||||
lbLastUsed.Items.InsertObject(0, lbHue.Items.Strings[hue], TObject(PtrInt(hue)));
|
||||
while lbLastUsed.Items.Count > vdtHuesLastUsedLength do begin
|
||||
lbLastUsed.Items.Delete(lbLastUsed.Items.Count - 1);
|
||||
end;
|
||||
lbLastUsed.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.lbLastUsedDblClick(Sender: TObject);
|
||||
var
|
||||
hue: Integer;
|
||||
begin
|
||||
if (lbLastUsed.ItemIndex < 0) or (lbLastUsed.ItemIndex >= lbLastUsed.Items.Count)
|
||||
then exit;
|
||||
hue := PtrInt(lbLastUsed.Items.Objects[lbLastUsed.ItemIndex]);
|
||||
edHue.Text := Format('$%x', [hue]);
|
||||
edHueEditingDone(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.btnDeleteRandomClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
lbRandom.Items.BeginUpdate;
|
||||
for i := lbRandom.Items.Count - 1 downto 0 do
|
||||
if lbRandom.Selected[i] then
|
||||
lbRandom.Items.Delete(i);
|
||||
lbRandom.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.btnRandomPresetDeleteClick(Sender: TObject);
|
||||
var
|
||||
preset: TDOMElement;
|
||||
begin
|
||||
if cbRandomPreset.ItemIndex > -1 then
|
||||
begin
|
||||
preset := TDOMElement(cbRandomPreset.Items.Objects[cbRandomPreset.ItemIndex]);
|
||||
FRandomHuePresetsDoc.DocumentElement.RemoveChild(preset);
|
||||
cbRandomPreset.Items.Delete(cbRandomPreset.ItemIndex);
|
||||
cbRandomPreset.ItemIndex := -1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.btnRandomPresetSaveClick(Sender: TObject);
|
||||
var
|
||||
presetName: string;
|
||||
i: Integer;
|
||||
preset, hue: TDOMElement;
|
||||
children: TDOMNodeList;
|
||||
begin
|
||||
presetName := cbRandomPreset.Text;
|
||||
if InputQuery(lbDlgSavePrsCaption, lbDlgSavePrs, presetName) then
|
||||
begin
|
||||
preset := FindRandomPreset(presetName);
|
||||
if preset = nil then
|
||||
begin
|
||||
preset := FRandomHuePresetsDoc.CreateElement('Preset');
|
||||
preset.AttribStrings['Name'] := UTF8ToCP1251(presetName);
|
||||
FRandomHuePresetsDoc.DocumentElement.AppendChild(preset);
|
||||
cbRandomPreset.Items.AddObject(presetName, preset);
|
||||
end else
|
||||
begin
|
||||
children := preset.GetChildNodes;
|
||||
for i := children.Count - 1 downto 0 do
|
||||
preset.RemoveChild(children[i]);
|
||||
end;
|
||||
|
||||
for i := 0 to lbRandom.Items.Count - 1 do
|
||||
begin
|
||||
hue := FRandomHuePresetsDoc.CreateElement('Hue');
|
||||
hue.AttribStrings['ID'] := IntToStr(PtrInt(lbRandom.Items.Objects[i]));
|
||||
preset.AppendChild(hue);
|
||||
end;
|
||||
|
||||
cbRandomPreset.ItemIndex := cbRandomPreset.Items.IndexOfObject(preset);
|
||||
|
||||
SaveRandomPresets;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.cbRandomChange(Sender: TObject);
|
||||
begin
|
||||
lbHue.MultiSelect := cbRandom.Checked;
|
||||
gbRandom.Visible := cbRandom.Checked;
|
||||
gbLastUsed.Visible := not cbRandom.Checked;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.cbRandomPresetChange(Sender: TObject);
|
||||
var
|
||||
preset, hue: TDOMElement;
|
||||
id: PtrInt;
|
||||
begin
|
||||
lbRandom.Clear;
|
||||
if cbRandomPreset.ItemIndex > -1 then
|
||||
begin
|
||||
preset := TDOMElement(cbRandomPreset.Items.Objects[cbRandomPreset.ItemIndex]);
|
||||
hue := TDOMElement(preset.FirstChild);
|
||||
|
||||
while hue <> nil do
|
||||
begin
|
||||
if hue.NodeName = 'Hue' then
|
||||
begin
|
||||
id := StrToInt(hue.AttribStrings['ID']);
|
||||
lbRandom.Items.AddObject(lbHue.Items.Strings[id], TObject(id));
|
||||
end;
|
||||
hue := TDOMElement(hue.NextSibling);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.btnClearRandomClick(Sender: TObject);
|
||||
begin
|
||||
lbRandom.Items.Clear;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.btnAddRandomClick(Sender: TObject);
|
||||
var
|
||||
i: PtrInt;
|
||||
begin
|
||||
lbRandom.Items.BeginUpdate;
|
||||
for i := 0 to lbHue.Count - 1 do
|
||||
if lbHue.Selected[i] then
|
||||
lbRandom.Items.AddObject(lbHue.Items.Strings[i], TObject(i));
|
||||
lbRandom.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
hue: THue;
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
|
||||
lbHue.Clear;
|
||||
lbHue.Items.Add('$0 (no hue)');
|
||||
lbHue.Items.Add(lbNoHuesName);
|
||||
for i := 1 to ResMan.Hue.Count do
|
||||
begin
|
||||
hue := ResMan.Hue.Hues[i-1];
|
||||
lbHue.Items.AddObject(Format('$%x (%s)', [i, hue.Name]), hue);
|
||||
end;
|
||||
lbHue.ItemIndex := 0;
|
||||
|
||||
if (sprofile <> '') then
|
||||
if (frmMain.ProfileDir <> '')
|
||||
then FConfigDir := frmMain.ProfileDir
|
||||
else FConfigDir := frmMain.ConfigDir;
|
||||
FRandomHuePresetsFile := FConfigDir + 'RandomHuePresets.xml';
|
||||
ForceDirectories(FConfigDir);
|
||||
|
||||
Logger.Send([lcClient, lcInfo], ' FConfigDir', FRandomHuePresetsFile);
|
||||
LoadRandomPresets;
|
||||
|
||||
vdtHuePreview.Align := alClient;
|
||||
vdtHuePreview.NodeDataSize := SizeOf(THuesInfo);
|
||||
|
||||
gbLastUsed.Height := gbRandom.Height;
|
||||
cbRandomChange(Sender);
|
||||
//ImagePreviewItem.Height := gbPreview.Height - ImagePreviewItem.Top - 4;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.FormShow(Sender: TObject);
|
||||
var
|
||||
item: PVirtualItem;
|
||||
tileInfo: PTileInfo;
|
||||
selectedID: LongWord;
|
||||
begin
|
||||
item := frmMain.vdtTiles.GetFirstSelected;
|
||||
if item <> nil then
|
||||
begin
|
||||
tileInfo := frmMain.vdtTiles.GetNodeData(item);
|
||||
selectedID := tileInfo^.ID;
|
||||
end;
|
||||
if (selectedID < $4000) or (selectedID >= ResMan.Tiledata.StaticCount + $4000)
|
||||
then selectedID := $4001;
|
||||
|
||||
edTileId.Tag := selectedID;
|
||||
edTileId.Text := Format('$%x', [selectedID - $4000]);
|
||||
UpdateItemPreview(edTileId.Tag, lbHue.ItemIndex);
|
||||
|
||||
vdtHuePreview.Visible := False;
|
||||
(frmHueSettings as TfrmToolWindow).FormShow(Sender);
|
||||
gbPreview.Visible := True;
|
||||
frmHueSettings.Width := 516;
|
||||
frmHueSettings.Height:= 534;
|
||||
//lbHue.Visible:= false;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmHueSettings.FormHide(Sender: TObject);
|
||||
begin
|
||||
HuePreviewFree();
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.FormClose(Sender: TObject);
|
||||
begin
|
||||
HuePreviewFree();
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.UpdateItemPreview(ID : Integer; Hue: Integer);
|
||||
var
|
||||
tileData: TTileData;
|
||||
artHue: THue;
|
||||
artEntry: TArt;
|
||||
artPartial: Boolean;
|
||||
destRect: TRect;
|
||||
destColor: Word;
|
||||
begin
|
||||
if ResMan.Art.Exists(ID) then
|
||||
begin
|
||||
if Hue > 0 then
|
||||
artHue := ResMan.Hue.Hues[Hue - 1]
|
||||
else
|
||||
artHue := nil;
|
||||
tileData := TTileData(ResMan.Tiledata.Block[ID]);
|
||||
artPartial := tdfPartialHue in tileData.Flags;
|
||||
|
||||
//destColor := ARGB2RGB(ImagePreviewItem.Canvas.Pixels[destRect.Left, destRect.Top]);
|
||||
destColor := EncodeUOColor($00F0F0F0);
|
||||
artEntry := ResMan.Art.GetArt(ID, destColor, artHue, artPartial);
|
||||
|
||||
destRect.Bottom := Min(artEntry.Graphic.Height, ImagePreviewItem.Canvas.Height);
|
||||
destRect.Right := Min(artEntry.Graphic.Width, ImagePreviewItem.Canvas.Width);
|
||||
destRect.Top := ((ImagePreviewItem.Canvas.Height - destRect.Bottom) div 2);
|
||||
destRect.Left := ((ImagePreviewItem.Canvas.Width - destRect.Right) div 2);
|
||||
|
||||
destRect.Bottom := ((ImagePreviewItem.Canvas.Height + destRect.Bottom) div 2);
|
||||
destRect.Right := ((ImagePreviewItem.Canvas.Width + destRect.Right) div 2);
|
||||
|
||||
ImagePreviewItem.Canvas.Brush.Color := $00F5F5F5;//DecodeUOColor(destColor);
|
||||
ImagePreviewItem.Canvas.Clear;
|
||||
DisplayImage(ImagePreviewItem.Canvas, destRect, artEntry.Graphic);
|
||||
ImagePreviewItem.Update;
|
||||
|
||||
artEntry.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmHueSettings.lbHueDrawItem(Control: TWinControl; Index: Integer;
|
||||
ARect: TRect; State: TOwnerDrawState);
|
||||
var
|
||||
hue: THue;
|
||||
begin
|
||||
if Index > 0 then
|
||||
hue := ResMan.Hue.Hues[Index-1]
|
||||
else
|
||||
hue := nil;
|
||||
DrawHue(hue, lbHue.Canvas, ARect, lbHue.Items.Strings[Index]);
|
||||
if ((Control = lbRandom) or (Control = lbLastUsed)) then begin
|
||||
Index := PtrInt((Control as TListBox).Items.Objects[Index]);
|
||||
if Index > 0
|
||||
then hue := ResMan.Hue.Hues[Index-1]
|
||||
else hue := nil;
|
||||
DrawHue(hue, (Control as TListBox).Canvas, ARect, Format('$%x', [Index]), 3);
|
||||
end else if Control = lbLastUsed then begin
|
||||
Index := PtrInt(lbLastUsed.Items.Objects[Index]);
|
||||
if Index > 0
|
||||
then hue := ResMan.Hue.Hues[Index-1]
|
||||
else hue := nil;
|
||||
DrawHue(hue, lbLastUsed.Canvas, ARect, Format('$%x', [Index]), 3);
|
||||
end else begin // Control = lbHue
|
||||
if Index > 0
|
||||
then hue := ResMan.Hue.Hues[Index-1]
|
||||
else hue := nil;
|
||||
DrawHue(hue, lbHue.Canvas, ARect, lbHue.Items.Strings[Index], 4);
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.lbHueDblClick(Sender: TObject);
|
||||
begin
|
||||
lbHueSelectionChange(Sender, True);
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.lbHueSelectionChange(Sender: TObject; User: boolean);
|
||||
begin
|
||||
edHue.Text := Format('$%x', [lbHue.ItemIndex]);
|
||||
|
||||
//if (ImagePreviewItem <> nil) and (ImagePreviewItem.Canvas <> nil) then
|
||||
UpdateItemPreview(edTileId.Tag, lbHue.ItemIndex);
|
||||
AddLastUsed(lbHue.ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.lbRandomDragDrop(Sender, Source: TObject; X, Y: Integer);
|
||||
begin
|
||||
if Source = lbHue then
|
||||
btnAddRandomClick(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.lbRandomDragOver(Sender, Source: TObject; X, Y: Integer;
|
||||
State: TDragState; var Accept: Boolean);
|
||||
begin
|
||||
if Source = lbHue then Accept := True;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.lvHueCustomDrawItem(Sender: TCustomListView;
|
||||
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
function TfrmHueSettings.FindRandomPreset(AName: String): TDOMElement;
|
||||
begin
|
||||
Result := TDOMElement(FRandomHuePresetsDoc.DocumentElement.FirstChild);
|
||||
while Result <> nil do
|
||||
begin
|
||||
if SameText(Result.AttribStrings['Name'], AName) then
|
||||
Break;
|
||||
|
||||
Result := TDOMElement(Result.NextSibling);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.LoadRandomPresets;
|
||||
var
|
||||
presetElement, hueElement: TDOMElement;
|
||||
begin
|
||||
FreeAndNil(FRandomHuePresetsDoc);
|
||||
cbRandomPreset.Items.Clear;
|
||||
if FileExists(FRandomHuePresetsFile) then
|
||||
begin
|
||||
ReadXMLFile(FRandomHuePresetsDoc, FRandomHuePresetsFile);
|
||||
presetElement := TDOMElement(FRandomHuePresetsDoc.DocumentElement.FirstChild);
|
||||
while presetElement <> nil do
|
||||
begin
|
||||
if presetElement.NodeName = 'Preset' then
|
||||
cbRandomPreset.Items.AddObject(
|
||||
CP1251ToUTF8(presetElement.AttribStrings['Name']), presetElement);
|
||||
presetElement := TDOMElement(presetElement.NextSibling);
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
FRandomHuePresetsDoc := TXMLDocument.Create;
|
||||
FRandomHuePresetsDoc.AppendChild(FRandomHuePresetsDoc.CreateElement('RandomHuePresets'));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.SaveRandomPresets;
|
||||
begin
|
||||
WriteXMLFile(FRandomHuePresetsDoc, FRandomHuePresetsFile);
|
||||
end;
|
||||
|
||||
function TfrmHueSettings.GetHue: Word;
|
||||
begin
|
||||
if cbRandom.Checked and (lbRandom.Items.Count > 0) then
|
||||
Result := PtrInt(lbRandom.Items.Objects[Random(lbRandom.Items.Count)])
|
||||
else
|
||||
Result := lbHue.ItemIndex;
|
||||
end;
|
||||
|
||||
class procedure TfrmHueSettings.DrawHue(AHue: THue; ACanvas: TCanvas; ARect: TRect;
|
||||
ACaption: string);
|
||||
ACaption: string; lineWidth: Integer = 2);
|
||||
var
|
||||
hueColor: TColor;
|
||||
i: Integer;
|
||||
i, w, leftCPos: Integer;
|
||||
begin
|
||||
ACanvas.Pen.Color := clWhite;
|
||||
ACanvas.Rectangle(ARect);
|
||||
@@ -118,12 +540,207 @@ begin
|
||||
begin
|
||||
hueColor := ARGB2RGB(AHue.ColorTable[i]);
|
||||
ACanvas.Pen.Color := hueColor;
|
||||
ACanvas.MoveTo(ARect.Left + 2 + i, ARect.Top + 1);
|
||||
ACanvas.LineTo(ARect.Left + 2 + i, ARect.Bottom - 1);
|
||||
leftCPos := ARect.Left + 2 + lineWidth*i;
|
||||
for w := 0 to lineWidth do begin
|
||||
ACanvas.MoveTo(leftCPos + w, ARect.Top + 1);
|
||||
ACanvas.LineTo(leftCPos + w, ARect.Bottom - 1);
|
||||
end;
|
||||
end;
|
||||
ACanvas.TextOut(ARect.Left + 36, ARect.Top, ACaption);
|
||||
ACanvas.TextOut(ARect.Left + lineWidth*36, ARect.Top+1, ACaption);
|
||||
end;
|
||||
|
||||
// vdtHuePreview
|
||||
|
||||
procedure TfrmHueSettings.ShowAllClick(Sender: TObject);
|
||||
var
|
||||
artEntry: TArt;
|
||||
point: TPoint;
|
||||
begin
|
||||
if ResMan.Art.Exists(edTileId.Tag) then begin
|
||||
LastFormPosition.y := Top;
|
||||
LastFormPosition.x := Left;
|
||||
|
||||
artEntry := ResMan.Art.GetArt(edTileId.Tag, 0, nil, false);
|
||||
HuePreviewRebuild(edTileId.Tag, artEntry.Graphic.Width, artEntry.Graphic.Height);
|
||||
|
||||
cbRandom.Checked := False;
|
||||
vdtHuePreview.Visible := True;
|
||||
vdtHuePreview.SetFocus;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.HuePreviewRebuild(ItemID, ItemWidth, ItemHeight: Integer);
|
||||
var
|
||||
item: PVirtualNode;
|
||||
info: PHuesInfo;
|
||||
cols: Integer;
|
||||
h,cn: Integer;
|
||||
ScrollBarWidth: Integer;
|
||||
wspos: TPoint;
|
||||
wrect: TRect;
|
||||
begin
|
||||
HuePreviewFree;
|
||||
|
||||
GetWindowRect(frmHueSettings.Handle, wrect);
|
||||
wspos.X := 0; wspos.Y := 0;
|
||||
wspos := frmMain.oglGameWindow.ClientToScreen(wspos);
|
||||
Left := wspos.X - 20;
|
||||
Top := wspos.Y - 1;
|
||||
Width := frmMain.oglGameWindow.ClientWidth - (wrect.Right - wrect.Left - ClientWidth);
|
||||
Height:= frmMain.oglGameWindow.ClientHeight - (wrect.Bottom - wrect.Top - ClientHeight);
|
||||
|
||||
|
||||
if vdtHuePreview.Tag = edTileId.Tag then exit;
|
||||
|
||||
//определяем число колонок
|
||||
cols:= ((ClientWidth - GetSystemMetrics(SM_CXVSCROLL))// - 16)
|
||||
div (ItemWidth + 2)) - 1;
|
||||
if (cols > vdtHuesPreviewColumnsMax)
|
||||
then cols:=vdtHuesPreviewColumnsMax;
|
||||
Logger.Send([lcClient, lcInfo], 'TfrmHueSettings.HuePreviewRebuild(): Число колонок cols', cols+1);
|
||||
|
||||
// Создаем колонки
|
||||
vdtHuePreview.BeginUpdate;
|
||||
vdtHuePreview.Header.Columns.Clear;
|
||||
vdtHuePreview.Header.Columns.DefaultWidth := ItemWidth + 2;
|
||||
for cn := 0 to cols do
|
||||
vdtHuePreview.Header.Columns.Add;
|
||||
|
||||
// Создаем ячейки
|
||||
vdtHuePreview.Clear;
|
||||
|
||||
vdtHuePreview.Tag := ItemID;
|
||||
vdtHuePreview.DefaultNodeHeight := ItemHeight + 2;
|
||||
h := 0;
|
||||
while h < ResMan.Hue.Count do begin
|
||||
item := vdtHuePreview.AddChild(nil);
|
||||
info := vdtHuePreview.GetNodeData(item);
|
||||
for cn := cols to vdtHuesPreviewColumnsMax do
|
||||
info^.Art[cn] := nil;
|
||||
for cn := 0 to cols do begin
|
||||
info^.Art[cn] := nil;
|
||||
info^.ID[cn] := h;
|
||||
h := h + 1;
|
||||
if h >= ResMan.Hue.Count
|
||||
then break;
|
||||
end;
|
||||
end;
|
||||
vdtHuePreview.EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.HuePreviewFree();
|
||||
var
|
||||
colm: Integer;
|
||||
node: PVirtualNode;
|
||||
info: PHuesInfo;
|
||||
begin
|
||||
vdtHuePreview.Tag := -1;
|
||||
node := vdtHuePreview.GetFirst();
|
||||
while node <> nil do begin
|
||||
info := vdtHuePreview.GetNodeData(node);
|
||||
for colm := 0 to vdtHuesPreviewColumnsMax do begin
|
||||
if info^.Art[colm] <> nil
|
||||
then info^.Art[colm].Free;
|
||||
info^.Art[colm] := nil;
|
||||
end;
|
||||
node := vdtHuePreview.GetNext(node);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.vdtHuePreviewDrawNode(Sender: TBaseVirtualTree;
|
||||
const PaintInfo: TVTPaintInfo);
|
||||
var
|
||||
//tileInfo : PTileInfo;
|
||||
destColor : Word;
|
||||
tileData : TTileData;
|
||||
artPartial: Boolean;
|
||||
artEntry : TArt;
|
||||
|
||||
info: PHuesInfo;
|
||||
id : Integer;
|
||||
hue : THue;
|
||||
mpos: TPoint;
|
||||
rect: TRect;
|
||||
begin
|
||||
id := TVirtualDrawTree(Sender).Tag;
|
||||
info:= Sender.GetNodeData(PaintInfo.Node);
|
||||
if info^.ID[PaintInfo.Column] <= 0 then begin
|
||||
hue := nil;
|
||||
if (PaintInfo.Node <> Sender.GetFirst()) then begin
|
||||
PaintInfo.Canvas.Brush.Color := vdtHuePreview.Color;
|
||||
exit; // Не рисуем ячейки без цвета если они не в первом ряду
|
||||
end;
|
||||
end else hue := ResMan.Hue.Hues[info^.ID[PaintInfo.Column] - 1];
|
||||
|
||||
if ResMan.Art.Exists(id) then begin
|
||||
// Определяем цвет подсветки (т.е. выделен ли тайл)
|
||||
{mpos := vdtHuePreview.ScreenToClient(Mouse.CursorPos);
|
||||
if (vdtHuePreview.GetNodeAt(mpos.x, mpos.y) = PaintInfo.Node)
|
||||
and ((mpos.x div vdtHuePreview.Header.Columns.DefaultWidth) = PaintInfo.Column)
|
||||
then destColor := EncodeUOColor(vdtHuePreview.Colors.FocusedSelectionColor)
|
||||
else }destColor := EncodeUOColor(vdtHuePreview.Color);
|
||||
|
||||
if info^.Art[PaintInfo.Column] = nil then begin
|
||||
tileData := TTileData(ResMan.Tiledata.Block[ID]);
|
||||
artPartial := tdfPartialHue in tileData.Flags;
|
||||
artEntry := ResMan.Art.GetArt(ID, destColor, hue, artPartial);
|
||||
info^.Art[PaintInfo.Column] := artEntry;
|
||||
end else artEntry := info^.Art[PaintInfo.Column];
|
||||
|
||||
rect.Left := PaintInfo.CellRect.Left + 1;
|
||||
rect.Top := PaintInfo.CellRect.Top + 1;
|
||||
rect.Right := PaintInfo.CellRect.Right - 1;
|
||||
rect.Bottom:= PaintInfo.CellRect.Bottom - 1;
|
||||
|
||||
DisplayImage(PaintInfo.Canvas, rect, artEntry.Graphic);
|
||||
//artEntry.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.vdtHuePreviewMouseMove(Sender: TObject;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
mpos: TPoint;
|
||||
colm: Integer;
|
||||
node: PVirtualNode;
|
||||
begin
|
||||
{mpos := vdtHuePreview.ScreenToClient(Mouse.CursorPos);
|
||||
colm := mpos.x div vdtHuePreview.Header.Columns.DefaultWidth;
|
||||
node := vdtHuePreview.GetNodeAt(mpos.x, mpos.y);
|
||||
if (colm <> LastSelectedColm) and (node <> LastSelectedNode) then begin
|
||||
vdtHuePreview.RepaintNode(node);
|
||||
LastSelectedColm := colm;
|
||||
LastSelectedNode := node;
|
||||
vdtHuePreview.RepaintNode(node);
|
||||
end;}
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.vdtHuePreviewClick(Sender: TObject);
|
||||
var
|
||||
mpos: TPoint;
|
||||
info: PHuesInfo;
|
||||
hues: Integer;
|
||||
begin
|
||||
mpos := vdtHuePreview.ScreenToClient(Mouse.CursorPos);
|
||||
info := vdtHuePreview.GetNodeData( vdtHuePreview.GetNodeAt(mpos.x, mpos.y) );
|
||||
hues := info^.ID[ mpos.x div vdtHuePreview.Header.Columns.DefaultWidth ];
|
||||
if hues < ResMan.Hue.Count then begin
|
||||
Logger.Send([lcClient, lcInfo], 'mpos.x="%d"; mpos.y="%d"; hues="%d"', [mpos.x, mpos.y, hues]);
|
||||
|
||||
edHue.Text := Format('$%x', [hues]);
|
||||
edHueEditingDone(Sender);
|
||||
|
||||
FormShow(Sender); // Закрываем окно и возвращаемся обратно
|
||||
Top := LastFormPosition.y;
|
||||
Left := LastFormPosition.x;
|
||||
mpos.x := ImagePreviewItem.Width div 2;
|
||||
mpos.y := ImagePreviewItem.Height div 2;
|
||||
Mouse.CursorPos := ImagePreviewItem.ClientToScreen(mpos);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
{$I UfrmHueSettings.lrs}
|
||||
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
inherited frmLightlevel: TfrmLightlevel
|
||||
Left = 598
|
||||
Height = 171
|
||||
Width = 40
|
||||
ActiveControl = tbLightlevel
|
||||
Caption = 'Lightlevel'
|
||||
Top = 733
|
||||
Width = 53
|
||||
Caption = 'Свет'
|
||||
ClientHeight = 171
|
||||
ClientWidth = 40
|
||||
ClientWidth = 53
|
||||
Constraints.MaxWidth = 40
|
||||
Constraints.MinWidth = 36
|
||||
OnCreate = FormCreate
|
||||
object tbLightlevel: TTrackBar[0]
|
||||
Left = 0
|
||||
Height = 171
|
||||
Top = 0
|
||||
Width = 40
|
||||
Width = 53
|
||||
Max = 32
|
||||
OnChange = tbLightlevelChange
|
||||
Orientation = trVertical
|
||||
@@ -18,5 +22,6 @@ inherited frmLightlevel: TfrmLightlevel
|
||||
TabOrder = 0
|
||||
end
|
||||
inherited tmClose: TTimer[1]
|
||||
top = 88
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,6 +14,7 @@ type
|
||||
|
||||
TfrmLightlevel = class(TfrmToolWindow)
|
||||
tbLightlevel: TTrackBar;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure tbLightlevelChange(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
@@ -27,7 +28,7 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
UfrmMain;
|
||||
UfrmMain, Language;
|
||||
|
||||
{ TfrmLightlevel }
|
||||
|
||||
@@ -40,9 +41,15 @@ begin
|
||||
end else
|
||||
frmMain.LightManager.LightLevel := tbLightlevel.Position;
|
||||
|
||||
frmMain.acLightlevel.Tag:=frmMain.LightManager.LightLevel;
|
||||
frmMain.oglGameWindow.Repaint;
|
||||
end;
|
||||
|
||||
procedure TfrmLightlevel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmLightlevel.lrs}
|
||||
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
inherited frmMoveSettings: TfrmMoveSettings
|
||||
Left = 290
|
||||
Height = 120
|
||||
Top = 171
|
||||
Width = 232
|
||||
ActiveControl = cbAsk
|
||||
AutoSize = True
|
||||
Caption = 'Move settings'
|
||||
ClientHeight = 120
|
||||
ClientWidth = 232
|
||||
Left = 1327
|
||||
Height = 112
|
||||
Top = 452
|
||||
Width = 212
|
||||
Caption = 'Опции перемещения'
|
||||
ClientHeight = 112
|
||||
ClientWidth = 212
|
||||
OnCreate = FormCreate
|
||||
object cbAsk: TCheckBox[0]
|
||||
AnchorSideLeft.Control = gbDirection
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = gbDirection
|
||||
Left = 121
|
||||
AnchorSideLeft.Control = gbMovment
|
||||
AnchorSideRight.Control = gbMovment
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 119
|
||||
Height = 19
|
||||
Top = 20
|
||||
Width = 94
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 16
|
||||
BorderSpacing.Right = 8
|
||||
Caption = 'Ask each time'
|
||||
Top = 63
|
||||
Width = 87
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Bottom = 30
|
||||
Caption = 'Спрашивать'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
@@ -27,14 +28,13 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
object gbDirection: TGroupBox[1]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 8
|
||||
Left = 4
|
||||
Height = 108
|
||||
Top = 4
|
||||
Top = 0
|
||||
Width = 105
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Bottom = 4
|
||||
BorderSpacing.Around = 4
|
||||
ClientHeight = 90
|
||||
ClientWidth = 101
|
||||
TabOrder = 1
|
||||
@@ -46,7 +46,6 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
Top = 0
|
||||
Width = 23
|
||||
BorderSpacing.Left = 8
|
||||
Color = clBtnFace
|
||||
Down = True
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
@@ -97,7 +96,6 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
Top = 0
|
||||
Width = 23
|
||||
BorderSpacing.Left = 8
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
@@ -147,7 +145,6 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
Top = 0
|
||||
Width = 23
|
||||
BorderSpacing.Left = 8
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
@@ -198,7 +195,6 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
Width = 23
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 8
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
@@ -248,7 +244,6 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
Top = 60
|
||||
Width = 23
|
||||
BorderSpacing.Top = 8
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
@@ -299,7 +294,6 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
Width = 23
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Bottom = 8
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
@@ -349,7 +343,6 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
Top = 60
|
||||
Width = 23
|
||||
BorderSpacing.Top = 8
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
@@ -399,7 +392,6 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
Top = 30
|
||||
Width = 23
|
||||
BorderSpacing.Top = 8
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
@@ -446,7 +438,7 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
AnchorSideTop.Control = btnTop
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 33
|
||||
Height = 25
|
||||
Height = 23
|
||||
Hint = 'Offset'
|
||||
Top = 30
|
||||
Width = 34
|
||||
@@ -462,20 +454,70 @@ inherited frmMoveSettings: TfrmMoveSettings
|
||||
object btnCancel: TButton[2]
|
||||
AnchorSideLeft.Control = gbDirection
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideRight.Control = gbMovment
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = gbDirection
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 121
|
||||
Left = 117
|
||||
Height = 25
|
||||
Top = 83
|
||||
Width = 103
|
||||
Anchors = [akLeft, akBottom]
|
||||
Top = 82
|
||||
Width = 89
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Right = 8
|
||||
BorderSpacing.Bottom = 4
|
||||
BorderSpacing.Bottom = 1
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
Caption = 'Отмена'
|
||||
ModalResult = 2
|
||||
TabOrder = 2
|
||||
end
|
||||
object gbMovment: TGroupBox[3]
|
||||
AnchorSideLeft.Control = gbDirection
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = cbAsk
|
||||
Left = 115
|
||||
Height = 59
|
||||
Top = 0
|
||||
Width = 91
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 4
|
||||
Caption = 'Перемещать'
|
||||
ClientHeight = 41
|
||||
ClientWidth = 87
|
||||
TabOrder = 3
|
||||
object cbLand: TCheckBox
|
||||
AnchorSideLeft.Control = gbMovment
|
||||
AnchorSideTop.Control = gbMovment
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 61
|
||||
BorderSpacing.Left = 8
|
||||
Caption = 'Рельеф'
|
||||
OnChange = cbLandChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object cbItem: TCheckBox
|
||||
AnchorSideLeft.Control = cbLand
|
||||
AnchorSideTop.Control = cbLand
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 19
|
||||
Width = 63
|
||||
Caption = 'Статику'
|
||||
Checked = True
|
||||
OnChange = cbItemChange
|
||||
State = cbChecked
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
inherited tmClose: TTimer[4]
|
||||
left = 184
|
||||
end
|
||||
end
|
||||
|
||||
@@ -40,6 +40,8 @@ type
|
||||
TfrmMoveSettings = class(TfrmToolWindow)
|
||||
btnCancel: TButton;
|
||||
cbAsk: TCheckBox;
|
||||
cbLand: TCheckBox;
|
||||
cbItem: TCheckBox;
|
||||
gbDirection: TGroupBox;
|
||||
btnTopLeft: TSpeedButton;
|
||||
btnTop: TSpeedButton;
|
||||
@@ -49,8 +51,12 @@ type
|
||||
btnBottom: TSpeedButton;
|
||||
btnBottomLeft: TSpeedButton;
|
||||
btnLeft: TSpeedButton;
|
||||
gbMovment: TGroupBox;
|
||||
seOffset: TSpinEdit;
|
||||
procedure btnTopLeftClick(Sender: TObject);
|
||||
procedure cbItemChange(Sender: TObject);
|
||||
procedure cbLandChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDeactivate(Sender: TObject); override;
|
||||
procedure FormShow(Sender: TObject); override;
|
||||
protected
|
||||
@@ -66,7 +72,7 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
UdmNetwork, UfrmMain, UEnums;
|
||||
UdmNetwork, UfrmMain, UEnums, Language;
|
||||
|
||||
{ TfrmMoveSettings }
|
||||
|
||||
@@ -79,7 +85,7 @@ end;
|
||||
procedure TfrmMoveSettings.FormShow(Sender: TObject);
|
||||
begin
|
||||
btnCancel.Visible := (fsModal in FormState);
|
||||
if dmNetwork.AccessLevel = alAdministrator then
|
||||
if dmNetwork.AccessLevel = alDeveloper then
|
||||
seOffset.MaxValue := Max(frmMain.Landscape.CellWidth, frmMain.Landscape.CellHeight);
|
||||
|
||||
inherited FormShow(Sender);
|
||||
@@ -140,6 +146,24 @@ begin
|
||||
ModalResult := mrYes;
|
||||
end;
|
||||
|
||||
procedure TfrmMoveSettings.cbItemChange(Sender: TObject);
|
||||
begin
|
||||
if not cbItem.Checked
|
||||
then cbLand.Checked := True;
|
||||
end;
|
||||
|
||||
procedure TfrmMoveSettings.cbLandChange(Sender: TObject);
|
||||
begin
|
||||
if not cbLand.Checked
|
||||
then cbItem.Checked := True;
|
||||
end;
|
||||
|
||||
procedure TfrmMoveSettings.FormCreate(Sender: TObject);
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
{$I UfrmMoveSettings.lrs}
|
||||
|
||||
|
||||
12
Client/Tools/UfrmSelectionSettings.lfm
Normal file
12
Client/Tools/UfrmSelectionSettings.lfm
Normal file
@@ -0,0 +1,12 @@
|
||||
inherited frmSelectionSettings: TfrmSelectionSettings
|
||||
Left = 1122
|
||||
Height = 116
|
||||
Top = 613
|
||||
Width = 188
|
||||
Caption = 'Опции выделения'
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
inherited tmClose: TTimer
|
||||
left = 80
|
||||
end
|
||||
end
|
||||
82
Client/Tools/UfrmSelectionSettings.pas
Normal file
82
Client/Tools/UfrmSelectionSettings.pas
Normal file
@@ -0,0 +1,82 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2009 Andreas Schneider
|
||||
*)
|
||||
unit UfrmSelectionSettings;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
Spin, ExtCtrls, LMessages, VirtualTrees, UfrmToolWindow, UfrmMain;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmSelectionSettings }
|
||||
|
||||
TfrmSelectionSettings = class(TfrmToolWindow)
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
FCanClose: Boolean;
|
||||
function CanClose: Boolean; override;
|
||||
end;
|
||||
|
||||
var
|
||||
frmSelectionSettings: TfrmSelectionSettings;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UHue, UfrmHueSettings, Language;
|
||||
|
||||
//type
|
||||
|
||||
{ TfrmSelectionSettings }
|
||||
|
||||
procedure TfrmSelectionSettings.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FCanClose := True;
|
||||
end;
|
||||
|
||||
procedure TfrmSelectionSettings.FormShow(Sender: TObject);
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
//do work
|
||||
(frmSelectionSettings as TfrmToolWindow).FormShow(Sender);
|
||||
end;
|
||||
|
||||
|
||||
function TfrmSelectionSettings.CanClose: Boolean;
|
||||
begin
|
||||
Result := FCanClose and inherited CanClose;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmSelectionSettings.lrs}
|
||||
|
||||
end.
|
||||
|
||||
12
Client/Tools/UfrmSurfElevateSettings.lfm
Normal file
12
Client/Tools/UfrmSurfElevateSettings.lfm
Normal file
@@ -0,0 +1,12 @@
|
||||
inherited frmSurfElevateSettings: TfrmSurfElevateSettings
|
||||
Left = 1122
|
||||
Height = 80
|
||||
Top = 613
|
||||
Width = 244
|
||||
Caption = 'Опции редактирования меша'
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
inherited tmClose: TTimer
|
||||
left = 80
|
||||
end
|
||||
end
|
||||
82
Client/Tools/UfrmSurfElevateSettings.pas
Normal file
82
Client/Tools/UfrmSurfElevateSettings.pas
Normal file
@@ -0,0 +1,82 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2009 Andreas Schneider
|
||||
*)
|
||||
unit UfrmSurfElevateSettings;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
Spin, ExtCtrls, LMessages, VirtualTrees, UfrmToolWindow, UfrmMain;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmSurfElevateSettings }
|
||||
|
||||
TfrmSurfElevateSettings = class(TfrmToolWindow)
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
FCanClose: Boolean;
|
||||
function CanClose: Boolean; override;
|
||||
end;
|
||||
|
||||
var
|
||||
frmSurfElevateSettings: TfrmSurfElevateSettings;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UHue, UfrmHueSettings, Language;
|
||||
|
||||
//type
|
||||
|
||||
{ TfrmSurfElevateSettings }
|
||||
|
||||
procedure TfrmSurfElevateSettings.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FCanClose := True;
|
||||
end;
|
||||
|
||||
procedure TfrmSurfElevateSettings.FormShow(Sender: TObject);
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
//do work
|
||||
(frmSurfElevateSettings as TfrmToolWindow).FormShow(Sender);
|
||||
end;
|
||||
|
||||
|
||||
function TfrmSurfElevateSettings.CanClose: Boolean;
|
||||
begin
|
||||
Result := FCanClose and inherited CanClose;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmSurfElevateSettings.lrs}
|
||||
|
||||
end.
|
||||
|
||||
12
Client/Tools/UfrmSurfSmoothSettings.lfm
Normal file
12
Client/Tools/UfrmSurfSmoothSettings.lfm
Normal file
@@ -0,0 +1,12 @@
|
||||
inherited frmSurfSmoothSettings: TfrmSurfSmoothSettings
|
||||
Left = 1122
|
||||
Height = 87
|
||||
Top = 613
|
||||
Width = 231
|
||||
Caption = 'Опции растягивания меша'
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
inherited tmClose: TTimer
|
||||
left = 80
|
||||
end
|
||||
end
|
||||
82
Client/Tools/UfrmSurfSmoothSettings.pas
Normal file
82
Client/Tools/UfrmSurfSmoothSettings.pas
Normal file
@@ -0,0 +1,82 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2009 Andreas Schneider
|
||||
*)
|
||||
unit UfrmSurfSmoothSettings;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
Spin, ExtCtrls, LMessages, VirtualTrees, UfrmToolWindow, UfrmMain;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmSurfSmoothSettings }
|
||||
|
||||
TfrmSurfSmoothSettings = class(TfrmToolWindow)
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
FCanClose: Boolean;
|
||||
function CanClose: Boolean; override;
|
||||
end;
|
||||
|
||||
var
|
||||
frmSurfSmoothSettings: TfrmSurfSmoothSettings;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UHue, UfrmHueSettings, Language;
|
||||
|
||||
//type
|
||||
|
||||
{ TfrmSurfSmoothSettings }
|
||||
|
||||
procedure TfrmSurfSmoothSettings.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FCanClose := True;
|
||||
end;
|
||||
|
||||
procedure TfrmSurfSmoothSettings.FormShow(Sender: TObject);
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
//do work
|
||||
(frmSurfSmoothSettings as TfrmToolWindow).FormShow(Sender);
|
||||
end;
|
||||
|
||||
|
||||
function TfrmSurfSmoothSettings.CanClose: Boolean;
|
||||
begin
|
||||
Result := FCanClose and inherited CanClose;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmSurfSmoothSettings.lrs}
|
||||
|
||||
end.
|
||||
|
||||
12
Client/Tools/UfrmSurfStretchSettings.lfm
Normal file
12
Client/Tools/UfrmSurfStretchSettings.lfm
Normal file
@@ -0,0 +1,12 @@
|
||||
inherited frmSurfStretchSettings: TfrmSurfStretchSettings
|
||||
Left = 1122
|
||||
Height = 71
|
||||
Top = 613
|
||||
Width = 249
|
||||
Caption = 'Опции сглаживания меша'
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
inherited tmClose: TTimer
|
||||
left = 80
|
||||
end
|
||||
end
|
||||
82
Client/Tools/UfrmSurfStretchSettings.pas
Normal file
82
Client/Tools/UfrmSurfStretchSettings.pas
Normal file
@@ -0,0 +1,82 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2009 Andreas Schneider
|
||||
*)
|
||||
unit UfrmSurfStretchSettings;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
Spin, ExtCtrls, LMessages, VirtualTrees, UfrmToolWindow, UfrmMain;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmSurfStretchSettings }
|
||||
|
||||
TfrmSurfStretchSettings = class(TfrmToolWindow)
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
FCanClose: Boolean;
|
||||
function CanClose: Boolean; override;
|
||||
end;
|
||||
|
||||
var
|
||||
frmSurfStretchSettings: TfrmSurfStretchSettings;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UHue, UfrmHueSettings, Language;
|
||||
|
||||
//type
|
||||
|
||||
{ TfrmSurfStretchSettings }
|
||||
|
||||
procedure TfrmSurfStretchSettings.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FCanClose := True;
|
||||
end;
|
||||
|
||||
procedure TfrmSurfStretchSettings.FormShow(Sender: TObject);
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
//do work
|
||||
(frmSurfStretchSettings as TfrmToolWindow).FormShow(Sender);
|
||||
end;
|
||||
|
||||
|
||||
function TfrmSurfStretchSettings.CanClose: Boolean;
|
||||
begin
|
||||
Result := FCanClose and inherited CanClose;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmSurfStretchSettings.lrs}
|
||||
|
||||
end.
|
||||
|
||||
@@ -11,7 +11,7 @@ object frmToolWindow: TfrmToolWindow
|
||||
OnDeactivate = FormDeactivate
|
||||
OnShow = FormShow
|
||||
ShowInTaskBar = stNever
|
||||
LCLVersion = '0.9.29'
|
||||
LCLVersion = '0.9.30'
|
||||
object tmClose: TTimer
|
||||
Enabled = False
|
||||
OnTimer = tmCloseTimer
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
inherited frmVirtualLayer: TfrmVirtualLayer
|
||||
Left = 290
|
||||
Height = 82
|
||||
Top = 171
|
||||
Left = 1164
|
||||
Height = 88
|
||||
Top = 443
|
||||
Width = 210
|
||||
ActiveControl = cbShowLayer
|
||||
Caption = 'Virtual Layer'
|
||||
ClientHeight = 82
|
||||
Caption = 'Виртуальный слой'
|
||||
ClientHeight = 88
|
||||
ClientWidth = 210
|
||||
OnCreate = FormCreate
|
||||
object tbZ: TTrackBar[0]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = seZ
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideTop.Control = cbShowBlocks
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 36
|
||||
Top = 37
|
||||
Top = 44
|
||||
Width = 194
|
||||
Frequency = 10
|
||||
Max = 127
|
||||
@@ -24,6 +23,7 @@ inherited frmVirtualLayer: TfrmVirtualLayer
|
||||
PageSize = 1
|
||||
Position = 0
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 9
|
||||
BorderSpacing.Around = 8
|
||||
TabOrder = 0
|
||||
end
|
||||
@@ -32,28 +32,164 @@ inherited frmVirtualLayer: TfrmVirtualLayer
|
||||
AnchorSideTop.Control = seZ
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 8
|
||||
Height = 22
|
||||
Top = 7
|
||||
Width = 126
|
||||
Height = 19
|
||||
Top = 8
|
||||
Width = 131
|
||||
BorderSpacing.Left = 8
|
||||
Caption = 'Show Layer at Z:'
|
||||
Caption = 'Показать на высоте:'
|
||||
OnChange = cbShowLayerChange
|
||||
TabOrder = 1
|
||||
end
|
||||
object seZ: TSpinEdit[2]
|
||||
object cbShowBlocks: TCheckBox[2]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = cbShowLayer
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 27
|
||||
Width = 166
|
||||
BorderSpacing.Left = 8
|
||||
Caption = 'Выделять границы блоков'
|
||||
OnChange = cbShowLayerChange
|
||||
TabOrder = 3
|
||||
end
|
||||
object btnZi20: TButton[3]
|
||||
AnchorSideTop.Control = tbZ
|
||||
AnchorSideRight.Control = tbZ
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 172
|
||||
Height = 14
|
||||
Top = 72
|
||||
Width = 28
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 28
|
||||
BorderSpacing.Right = 2
|
||||
Caption = '+20'
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Height = -12
|
||||
Font.Name = 'Consolas'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
OnClick = btnZ_Click
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
end
|
||||
object btnZi05: TButton[4]
|
||||
AnchorSideTop.Control = btnZi20
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = btnZi20
|
||||
Left = 142
|
||||
Height = 14
|
||||
Top = 72
|
||||
Width = 28
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 2
|
||||
Caption = '+5'
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Height = -12
|
||||
Font.Name = 'Consolas'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
OnClick = btnZ_Click
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
end
|
||||
object btnZd20: TButton[5]
|
||||
AnchorSideLeft.Control = tbZ
|
||||
AnchorSideTop.Control = btnZi20
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 10
|
||||
Height = 14
|
||||
Top = 72
|
||||
Width = 28
|
||||
BorderSpacing.Left = 2
|
||||
Caption = '-20'
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Height = -12
|
||||
Font.Name = 'Consolas'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
OnClick = btnZ_Click
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
end
|
||||
object btnZd05: TButton[6]
|
||||
AnchorSideLeft.Control = btnZd20
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = btnZi20
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 40
|
||||
Height = 14
|
||||
Top = 72
|
||||
Width = 28
|
||||
BorderSpacing.Left = 2
|
||||
Caption = '-5'
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Height = -12
|
||||
Font.Name = 'Consolas'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
OnClick = btnZ_Click
|
||||
ParentFont = False
|
||||
TabOrder = 7
|
||||
end
|
||||
object btnZd03: TButton[7]
|
||||
AnchorSideLeft.Control = btnZd05
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = btnZi20
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 70
|
||||
Height = 14
|
||||
Top = 72
|
||||
Width = 28
|
||||
BorderSpacing.Left = 2
|
||||
Caption = '-3'
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Height = -12
|
||||
Font.Name = 'Consolas'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
OnClick = btnZ_Click
|
||||
ParentFont = False
|
||||
TabOrder = 8
|
||||
end
|
||||
object btnZi03: TButton[8]
|
||||
AnchorSideTop.Control = btnZi20
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = btnZi05
|
||||
Left = 112
|
||||
Height = 14
|
||||
Top = 72
|
||||
Width = 28
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 2
|
||||
Caption = '+3'
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Height = -12
|
||||
Font.Name = 'Consolas'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
OnClick = btnZ_Click
|
||||
ParentFont = False
|
||||
TabOrder = 9
|
||||
end
|
||||
object seZ: TSpinEdit[9]
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 152
|
||||
Height = 21
|
||||
Top = 8
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 50
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 8
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
OnChange = seZChange
|
||||
TabOrder = 2
|
||||
end
|
||||
inherited tmClose: TTimer[10]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -38,10 +38,19 @@ type
|
||||
{ TfrmVirtualLayer }
|
||||
|
||||
TfrmVirtualLayer = class(TfrmToolWindow)
|
||||
btnZi20: TButton;
|
||||
btnZi05: TButton;
|
||||
btnZd20: TButton;
|
||||
btnZd05: TButton;
|
||||
btnZd03: TButton;
|
||||
btnZi03: TButton;
|
||||
cbShowLayer: TCheckBox;
|
||||
cbShowBlocks: TCheckBox;
|
||||
seZ: TSpinEdit;
|
||||
tbZ: TTrackBar;
|
||||
procedure btnZ_Click(Sender: TObject);
|
||||
procedure cbShowLayerChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure seZChange(Sender: TObject);
|
||||
procedure tbZChange(Sender: TObject);
|
||||
public
|
||||
@@ -54,7 +63,7 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
UfrmMain;
|
||||
UfrmMain, Language;
|
||||
|
||||
{ TfrmVirtualLayer }
|
||||
|
||||
@@ -69,6 +78,29 @@ begin
|
||||
frmMain.InvalidateScreenBuffer;
|
||||
end;
|
||||
|
||||
procedure TfrmVirtualLayer.btnZ_Click(Sender: TObject);
|
||||
var
|
||||
value: integer;
|
||||
begin
|
||||
value := seZ.Value;
|
||||
if (Sender = btnZd20) then dec(value, 20) else
|
||||
if (Sender = btnZd05) then dec(value, 05) else
|
||||
if (Sender = btnZd03) then dec(value, 03) else
|
||||
if (Sender = btnZi03) then inc(value, 03) else
|
||||
if (Sender = btnZi05) then inc(value, 05) else
|
||||
if (Sender = btnZi20) then inc(value, 20) else
|
||||
exit;
|
||||
if (value < -128) or (value > 127) then
|
||||
exit;
|
||||
seZ.Value := value;
|
||||
seZChange(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmVirtualLayer.FormCreate(Sender: TObject);
|
||||
begin
|
||||
LanguageTranslate(Self);
|
||||
end;
|
||||
|
||||
procedure TfrmVirtualLayer.tbZChange(Sender: TObject);
|
||||
begin
|
||||
seZ.Value := tbZ.Position;
|
||||
|
||||
Reference in New Issue
Block a user