- Added UfrmToolWindow

- Changed the tool windows to inherit from TfrmToolWindow
- Added a "close timer" to TfrmToolWindow to handle different focus behaviours of window managers
- Moved position changes for the tool windows to the appropriate TfrmToolWindow.FormShow event
This commit is contained in:
Andreas Schneider 2009-09-02 03:21:39 +02:00
parent d769c7ddc3
commit b9ef61c0db
21 changed files with 1687 additions and 1700 deletions

View File

@ -18,7 +18,7 @@
<AutoIncrementBuild Value="True"/> <AutoIncrementBuild Value="True"/>
<CurrentMajorRevNr Value="4"/> <CurrentMajorRevNr Value="4"/>
<CurrentMinorRevNr Value="2"/> <CurrentMinorRevNr Value="2"/>
<CurrentBuildNr Value="87"/> <CurrentBuildNr Value="123"/>
<ProjectVersion Value="0.4.2.85"/> <ProjectVersion Value="0.4.2.85"/>
<CompanyName Value="AKS DataBasis"/> <CompanyName Value="AKS DataBasis"/>
<FileDescription Value="UO CentrED"/> <FileDescription Value="UO CentrED"/>
@ -54,7 +54,7 @@
<MinVersion Major="4" Minor="5" Release="1" Valid="True"/> <MinVersion Major="4" Minor="5" Release="1" Valid="True"/>
</Item4> </Item4>
</RequiredPackages> </RequiredPackages>
<Units Count="29"> <Units Count="30">
<Unit0> <Unit0>
<Filename Value="CentrED.lpr"/> <Filename Value="CentrED.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -239,6 +239,13 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="UAdminHandling"/> <UnitName Value="UAdminHandling"/>
</Unit28> </Unit28>
<Unit29>
<Filename Value="Tools/UfrmToolWindow.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="frmToolWindow"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="UfrmToolWindow"/>
</Unit29>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
@ -268,11 +275,6 @@
<Debugging> <Debugging>
<GenerateDebugInfo Value="True"/> <GenerateDebugInfo Value="True"/>
</Debugging> </Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking> </Linking>
<Other> <Other>
<CustomOptions Value="-FE../bin/ "/> <CustomOptions Value="-FE../bin/ "/>

View File

@ -32,14 +32,14 @@ uses
cthreads, cthreads,
{$ENDIF}{$ENDIF} {$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset Interfaces, // this includes the LCL widgetset
Forms, LResources, lnetvisual, LazOpenGLContext, Forms, LResources, lnetvisual, LazOpenGLContext, UdmNetwork, UfrmMain,
UdmNetwork, UfrmMain, UfrmLogin, UfrmInitialize, UfrmAccountControl, UfrmLogin, UfrmInitialize, UfrmAccountControl, virtualtreeview_package,
virtualtreeview_package, UfrmEditAccount, UfrmDrawSettings, UfrmBoundaries, UfrmEditAccount, UfrmDrawSettings, UfrmBoundaries, UfrmElevateSettings,
UfrmElevateSettings, UOverlayUI, UResourceManager, UfrmConfirmation, UOverlayUI, UResourceManager, UfrmConfirmation, UfrmMoveSettings, UfrmAbout,
UfrmMoveSettings, UfrmAbout, UfrmHueSettings, UfrmRadar, UfrmHueSettings, UfrmRadar, UfrmLargeScaleCommand, UfrmVirtualLayer,
UfrmLargeScaleCommand, UfrmVirtualLayer, UfrmFilter, UfrmTileInfo, UfrmFilter, UfrmTileInfo, UGUIPlatformUtils, UPlatformTypes,
UGUIPlatformUtils, UPlatformTypes, UfrmRegionControl, UPackets, UfrmRegionControl, UPackets, UPacketHandlers, UAdminHandling, UGameResources,
UPacketHandlers, UAdminHandling, UGameResources, ULandscape; ULandscape, UfrmToolWindow;
{$IFDEF WINDOWS}{$R CentrED.rc}{$ENDIF} {$IFDEF WINDOWS}{$R CentrED.rc}{$ENDIF}

View File

@ -1,5 +1,5 @@
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 0,4,2,87 FILEVERSION 0,4,2,123
PRODUCTVERSION 0,4,2,85 PRODUCTVERSION 0,4,2,85
{ {
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
@ -9,7 +9,7 @@ PRODUCTVERSION 0,4,2,85
VALUE "Comments", "\000" VALUE "Comments", "\000"
VALUE "CompanyName", "AKS DataBasis\000" VALUE "CompanyName", "AKS DataBasis\000"
VALUE "FileDescription", "UO CentrED\000" VALUE "FileDescription", "UO CentrED\000"
VALUE "FileVersion", "0.4.2.87\000" VALUE "FileVersion", "0.4.2.123\000"
VALUE "InternalName", "\000" VALUE "InternalName", "\000"
VALUE "LegalCopyright", "Andreas Schneider\000" VALUE "LegalCopyright", "Andreas Schneider\000"
VALUE "LegalTrademarks", "\000" VALUE "LegalTrademarks", "\000"

View File

@ -1,114 +1,109 @@
object frmBoundaries: TfrmBoundaries inherited frmBoundaries: TfrmBoundaries
Left = 290 Left = 290
Height = 154 Height = 164
Top = 171 Top = 171
Width = 212 Width = 205
ActiveControl = Panel1
BorderIcons = []
BorderStyle = bsToolWindow
Caption = 'Boundaries' Caption = 'Boundaries'
ClientHeight = 154 ClientHeight = 164
ClientWidth = 212 ClientWidth = 205
Font.Height = -11 object lblMaxZ: TLabel[0]
OnClose = FormClose AnchorSideLeft.Control = Owner
OnDeactivate = FormDeactivate AnchorSideTop.Control = seMaxZ
LCLVersion = '0.9.27' AnchorSideTop.Side = asrCenter
object tbMinZ: TTrackBar 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
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 8 Left = 8
Height = 36 Height = 36
Top = 39 Top = 41
Width = 196 Width = 189
Frequency = 10 Frequency = 10
Max = 127 Max = 127
Min = -128 Min = -128
OnChange = tbMinZChange OnChange = tbMinZChange
PageSize = 1 PageSize = 1
Position = -128 Position = -128
Align = alTop Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 8 BorderSpacing.Around = 8
TabOrder = 0 TabOrder = 0
end end
object tbMaxZ: TTrackBar object tbMaxZ: TTrackBar[3]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = seMaxZ
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 8 Left = 8
Height = 36 Height = 36
Top = 114 Top = 118
Width = 196 Width = 189
Frequency = 10 Frequency = 10
Max = 127 Max = 127
Min = -128 Min = -128
OnChange = tbMaxZChange OnChange = tbMaxZChange
PageSize = 1 PageSize = 1
Position = 127 Position = 127
Align = alTop Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 8 BorderSpacing.Around = 8
TabOrder = 1 TabOrder = 1
end end
object Panel1: TPanel object seMaxZ: TSpinEdit[4]
Left = 8 AnchorSideTop.Control = tbMinZ
Height = 23 AnchorSideTop.Side = asrBottom
Top = 8 AnchorSideRight.Control = Owner
Width = 196 AnchorSideRight.Side = asrBottom
Align = alTop Left = 149
BorderSpacing.Around = 8 Height = 25
BevelOuter = bvNone Top = 85
ClientHeight = 23 Width = 48
ClientWidth = 196 Anchors = [akTop, akRight]
BorderSpacing.Right = 8
MaxValue = 127
MinValue = -128
OnChange = seMaxZChange
TabOrder = 2 TabOrder = 2
object lblMinZ: TLabel Value = 127
Left = 0
Height = 23
Top = 0
Width = 148
Align = alClient
Caption = 'Minimum Z:'
Layout = tlCenter
ParentColor = False
end
object seMinZ: TSpinEdit
Left = 148
Height = 23
Top = 0
Width = 48
Align = alRight
MaxValue = 127
MinValue = -128
OnChange = seMinZChange
TabOrder = 0
Value = -128
end
end end
object Panel2: TPanel object seMinZ: TSpinEdit[5]
Left = 8 AnchorSideTop.Control = Owner
Height = 23 AnchorSideRight.Control = Owner
Top = 83 AnchorSideRight.Side = asrBottom
Width = 196 Left = 149
Align = alTop Height = 25
BorderSpacing.Around = 8 Top = 8
BevelOuter = bvNone Width = 48
ClientHeight = 23 Anchors = [akTop, akRight]
ClientWidth = 196 BorderSpacing.Top = 8
BorderSpacing.Right = 8
MaxValue = 127
MinValue = -128
OnChange = seMinZChange
TabOrder = 3 TabOrder = 3
object lblMaxZ: TLabel Value = -128
Left = 0
Height = 23
Top = 0
Width = 148
Align = alClient
Caption = 'Maximum Z:'
Layout = tlCenter
ParentColor = False
end
object seMaxZ: TSpinEdit
Left = 148
Height = 23
Top = 0
Width = 48
Align = alRight
MaxValue = 127
MinValue = -128
OnChange = seMaxZChange
TabOrder = 0
Value = 127
end
end end
end end

View File

@ -30,30 +30,24 @@ unit UfrmBoundaries;
interface interface
uses uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, LMessages, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
LCLIntf, StdCtrls, ComCtrls, Spin, ExtCtrls; ComCtrls, Spin, ExtCtrls, UfrmToolWindow;
type type
{ TfrmBoundaries } { TfrmBoundaries }
TfrmBoundaries = class(TForm) TfrmBoundaries = class(TfrmToolWindow)
lblMaxZ: TLabel; lblMaxZ: TLabel;
lblMinZ: TLabel; lblMinZ: TLabel;
Panel1: TPanel;
Panel2: TPanel;
seMaxZ: TSpinEdit; seMaxZ: TSpinEdit;
seMinZ: TSpinEdit; seMinZ: TSpinEdit;
tbMinZ: TTrackBar; tbMinZ: TTrackBar;
tbMaxZ: TTrackBar; tbMaxZ: TTrackBar;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormDeactivate(Sender: TObject);
procedure seMaxZChange(Sender: TObject); procedure seMaxZChange(Sender: TObject);
procedure seMinZChange(Sender: TObject); procedure seMinZChange(Sender: TObject);
procedure tbMaxZChange(Sender: TObject); procedure tbMaxZChange(Sender: TObject);
procedure tbMinZChange(Sender: TObject); procedure tbMinZChange(Sender: TObject);
protected
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
public public
{ public declarations } { public declarations }
end; end;
@ -68,25 +62,16 @@ uses
{ TfrmBoundaries } { TfrmBoundaries }
procedure TfrmBoundaries.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction := caHide;
end;
procedure TfrmBoundaries.FormDeactivate(Sender: TObject);
begin
Close;
end;
procedure TfrmBoundaries.seMaxZChange(Sender: TObject); procedure TfrmBoundaries.seMaxZChange(Sender: TObject);
begin begin
tbMaxZ.Position := seMaxZ.Value; tbMaxZ.Position := seMaxZ.Value;
frmMain.InvalidateFilter;
end; end;
procedure TfrmBoundaries.seMinZChange(Sender: TObject); procedure TfrmBoundaries.seMinZChange(Sender: TObject);
begin begin
tbMinZ.Position := seMinZ.Value; tbMinZ.Position := seMinZ.Value;
frmMain.InvalidateFilter;
end; end;
procedure TfrmBoundaries.tbMaxZChange(Sender: TObject); procedure TfrmBoundaries.tbMaxZChange(Sender: TObject);
@ -101,12 +86,6 @@ begin
frmMain.InvalidateFilter; frmMain.InvalidateFilter;
end; end;
procedure TfrmBoundaries.MouseLeave(var msg: TLMessage);
begin
if not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then
Close;
end;
initialization initialization
{$I UfrmBoundaries.lrs} {$I UfrmBoundaries.lrs}

View File

@ -1,134 +1,120 @@
object frmDrawSettings: TfrmDrawSettings inherited frmDrawSettings: TfrmDrawSettings
Left = 268 Left = 268
Height = 181 Height = 180
Top = 165 Top = 165
Width = 243 Width = 242
ActiveControl = rbTileList ActiveControl = rbTileList
BorderIcons = [] Caption = 'Draw settings'
BorderStyle = bsToolWindow ClientHeight = 180
Caption = 'Draw settings' ClientWidth = 242
ClientHeight = 181 object rbTileList: TRadioButton[0]
ClientWidth = 243 AnchorSideLeft.Control = Owner
Font.Height = -11 AnchorSideTop.Control = Owner
FormStyle = fsStayOnTop Left = 8
OnClose = FormClose Height = 19
OnDeactivate = FormDeactivate Top = 8
OnShow = FormShow Width = 125
LCLVersion = '0.9.25' BorderSpacing.Left = 8
object rbTileList: TRadioButton BorderSpacing.Top = 8
Left = 8 BorderSpacing.Bottom = 4
Height = 21 Caption = 'Use tile from the list'
Top = 8 Checked = True
Width = 227 State = cbChecked
Align = alTop TabOrder = 0
BorderSpacing.Left = 8 end
BorderSpacing.Top = 8 object rbRandom: TRadioButton[1]
BorderSpacing.Right = 8 AnchorSideLeft.Control = rbTileList
BorderSpacing.Bottom = 4 AnchorSideTop.Control = rbTileList
Caption = 'Use tile from the list' AnchorSideTop.Side = asrBottom
Checked = True Left = 8
ParentFont = True Height = 19
State = cbChecked Top = 31
TabOrder = 0 Width = 184
UseOnChange = True BorderSpacing.Top = 4
end Caption = 'Use tiles from the random pool'
object rbRandom: TRadioButton TabOrder = 1
Left = 8 TabStop = False
Height = 21 end
Top = 33 object gbHue: TGroupBox[2]
Width = 227 AnchorSideLeft.Control = Owner
Align = alTop AnchorSideTop.Control = seRandomHeight
BorderSpacing.Left = 8 AnchorSideTop.Side = asrBottom
BorderSpacing.Top = 4 AnchorSideRight.Control = Owner
BorderSpacing.Right = 8 AnchorSideRight.Side = asrBottom
Caption = 'Use tiles from the random pool' Left = 8
ParentFont = True Height = 49
TabOrder = 1 Top = 123
UseOnChange = True Width = 226
end Anchors = [akTop, akLeft, akRight]
object gbHue: TGroupBox BorderSpacing.Around = 8
Left = 8 Caption = 'Hue (Statics only)'
Height = 49 ClientHeight = 31
Top = 124 ClientWidth = 222
Width = 227 TabOrder = 2
Align = alTop object pbHue: TPaintBox
BorderSpacing.Around = 8 Cursor = crHandPoint
Caption = 'Hue (Statics only)' Left = 4
ClientHeight = 32 Height = 27
ClientWidth = 223 Top = 0
ParentFont = True Width = 214
TabOrder = 2 Align = alClient
object pbHue: TPaintBox BorderSpacing.Left = 4
Cursor = crHandPoint BorderSpacing.Right = 4
Left = 4 BorderSpacing.Bottom = 4
Height = 28 OnClick = pbHueClick
Width = 215 OnPaint = pbHuePaint
Align = alClient end
BorderSpacing.Left = 4 end
BorderSpacing.Right = 4 object cbRandomHeight: TCheckBox[3]
BorderSpacing.Bottom = 4 AnchorSideLeft.Control = cbForceAltitude
OnClick = pbHueClick AnchorSideTop.Control = cbForceAltitude
OnPaint = pbHuePaint AnchorSideTop.Side = asrBottom
end Left = 8
end Height = 19
object Panel1: TPanel Top = 93
Left = 8 Width = 135
Height = 23 BorderSpacing.Top = 12
Top = 62 Caption = 'Add Random Altitude'
Width = 227 TabOrder = 3
Align = alTop end
BorderSpacing.Around = 8 object seRandomHeight: TSpinEdit[4]
BevelOuter = bvNone AnchorSideTop.Control = cbRandomHeight
ClientHeight = 23 AnchorSideTop.Side = asrCenter
ClientWidth = 227 AnchorSideRight.Control = Owner
ParentFont = True AnchorSideRight.Side = asrBottom
TabOrder = 3 Left = 184
object seForceAltitude: TSpinEdit Height = 25
Left = 177 Top = 90
Height = 23 Width = 50
Width = 50 Anchors = [akTop, akRight]
Align = alRight BorderSpacing.Right = 8
MaxValue = 127 TabOrder = 4
MinValue = -128 end
ParentFont = True object cbForceAltitude: TCheckBox[5]
TabOrder = 0 AnchorSideLeft.Control = rbRandom
end AnchorSideTop.Control = rbRandom
object cbForceAltitude: TCheckBox AnchorSideTop.Side = asrBottom
Height = 23 Left = 8
Width = 177 Height = 19
Align = alClient Top = 62
Caption = 'Force altitude:' Width = 95
ParentFont = True BorderSpacing.Top = 12
TabOrder = 1 Caption = 'Force altitude:'
end TabOrder = 5
end end
object Panel2: TPanel object seForceAltitude: TSpinEdit[6]
Left = 8 AnchorSideTop.Control = cbForceAltitude
Height = 23 AnchorSideTop.Side = asrCenter
Top = 93 AnchorSideRight.Control = Owner
Width = 227 AnchorSideRight.Side = asrBottom
Align = alTop Left = 184
BorderSpacing.Around = 8 Height = 25
BevelOuter = bvNone Top = 59
ClientHeight = 23 Width = 50
ClientWidth = 227 Anchors = [akTop, akRight]
ParentFont = True BorderSpacing.Right = 8
TabOrder = 4 MaxValue = 127
object seRandomHeight: TSpinEdit MinValue = -128
Left = 177 TabOrder = 6
Height = 23 end
Width = 50 end
Align = alRight
ParentFont = True
TabOrder = 0
end
object cbRandomHeight: TCheckBox
Height = 23
Width = 177
Align = alClient
Caption = 'Add Random Altitude'
ParentFont = True
TabOrder = 1
end
end
end

View File

@ -1,142 +1,109 @@
(* (*
* CDDL HEADER START * CDDL HEADER START
* *
* The contents of this file are subject to the terms of the * The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only * Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance * (the "License"). You may not use this file except in compliance
* with the License. * with the License.
* *
* You can obtain a copy of the license at * You can obtain a copy of the license at
* http://www.opensource.org/licenses/cddl1.php. * http://www.opensource.org/licenses/cddl1.php.
* See the License for the specific language governing permissions * See the License for the specific language governing permissions
* and limitations under the License. * and limitations under the License.
* *
* When distributing Covered Code, include this CDDL HEADER in each * When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at * file and include the License file at
* http://www.opensource.org/licenses/cddl1.php. If applicable, * http://www.opensource.org/licenses/cddl1.php. If applicable,
* add the following below this CDDL HEADER, with the fields enclosed * add the following below this CDDL HEADER, with the fields enclosed
* by brackets "[]" replaced with your own identifying * information: * by brackets "[]" replaced with your own identifying * information:
* Portions Copyright [yyyy] [name of copyright owner] * Portions Copyright [yyyy] [name of copyright owner]
* *
* CDDL HEADER END * CDDL HEADER END
* *
* *
* Portions Copyright 2007 Andreas Schneider * Portions Copyright 2009 Andreas Schneider
*) *)
unit UfrmDrawSettings; unit UfrmDrawSettings;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
Spin, ExtCtrls, LMessages, LCLIntf; Spin, ExtCtrls, LMessages, UfrmToolWindow;
type type
{ TfrmDrawSettings } { TfrmDrawSettings }
TfrmDrawSettings = class(TForm) TfrmDrawSettings = class(TfrmToolWindow)
cbForceAltitude: TCheckBox; cbForceAltitude: TCheckBox;
cbRandomHeight: TCheckBox; cbRandomHeight: TCheckBox;
gbHue: TGroupBox; gbHue: TGroupBox;
Panel1: TPanel; pbHue: TPaintBox;
Panel2: TPanel; rbRandom: TRadioButton;
pbHue: TPaintBox;
rbRandom: TRadioButton;
rbTileList: TRadioButton; rbTileList: TRadioButton;
seForceAltitude: TSpinEdit; seForceAltitude: TSpinEdit;
seRandomHeight: TSpinEdit; seRandomHeight: TSpinEdit;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure pbHueClick(Sender: TObject);
procedure FormDeactivate(Sender: TObject); procedure pbHuePaint(Sender: TObject);
procedure FormShow(Sender: TObject); procedure seForceAltitudeChange(Sender: TObject);
procedure pbHueClick(Sender: TObject); procedure seRandomHeightChange(Sender: TObject);
procedure pbHuePaint(Sender: TObject); public
procedure seForceAltitudeChange(Sender: TObject); { public declarations }
procedure seRandomHeightChange(Sender: TObject); end;
protected
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave; var
public frmDrawSettings: TfrmDrawSettings;
{ public declarations }
end; implementation
var uses
frmDrawSettings: TfrmDrawSettings; UGameResources, UHue, UfrmHueSettings;
implementation { TfrmDrawSettings }
uses procedure TfrmDrawSettings.pbHueClick(Sender: TObject);
UGameResources, UHue, UfrmHueSettings; var
msg: TLMessage;
{ TfrmDrawSettings } begin
frmHueSettings.Left := Mouse.CursorPos.x - 8;
procedure TfrmDrawSettings.FormClose(Sender: TObject; frmHueSettings.Top := Mouse.CursorPos.y - 8;
var CloseAction: TCloseAction); frmHueSettings.ShowModal;
begin pbHue.Repaint;
CloseAction := caHide; MouseLeave(msg);
end; end;
procedure TfrmDrawSettings.FormDeactivate(Sender: TObject); procedure TfrmDrawSettings.pbHuePaint(Sender: TObject);
begin var
if not frmHueSettings.Visible then hue: THue;
Close; begin
end; if frmHueSettings <> nil then
begin
procedure TfrmDrawSettings.FormShow(Sender: TObject); if frmHueSettings.lbHue.ItemIndex > 0 then
begin hue := ResMan.Hue.Hues[frmHueSettings.lbHue.ItemIndex - 1]
Left := Mouse.CursorPos.x - 8; else
Top := Mouse.CursorPos.y - 8; hue := nil;
end; TfrmHueSettings.DrawHue(hue, pbHue.Canvas, pbHue.Canvas.ClipRect,
frmHueSettings.lbHue.Items.Strings[frmHueSettings.lbHue.ItemIndex]);
procedure TfrmDrawSettings.pbHueClick(Sender: TObject); end;
var end;
msg: TLMessage;
begin procedure TfrmDrawSettings.seForceAltitudeChange(Sender: TObject);
frmHueSettings.Left := Mouse.CursorPos.x - 8; begin
frmHueSettings.Top := Mouse.CursorPos.y - 8; cbForceAltitude.Checked := True;
frmHueSettings.ShowModal; end;
pbHue.Repaint;
MouseLeave(msg); procedure TfrmDrawSettings.seRandomHeightChange(Sender: TObject);
end; begin
cbRandomHeight.Checked := True;
procedure TfrmDrawSettings.pbHuePaint(Sender: TObject); end;
var
hue: THue; //TODO : canclose ---> hue settings
begin
if frmHueSettings <> nil then initialization
begin {$I UfrmDrawSettings.lrs}
if frmHueSettings.lbHue.ItemIndex > 0 then
hue := ResMan.Hue.Hues[frmHueSettings.lbHue.ItemIndex - 1] end.
else
hue := nil;
TfrmHueSettings.DrawHue(hue, pbHue.Canvas, pbHue.Canvas.ClipRect,
frmHueSettings.lbHue.Items.Strings[frmHueSettings.lbHue.ItemIndex]);
end;
end;
procedure TfrmDrawSettings.seForceAltitudeChange(Sender: TObject);
begin
cbForceAltitude.Checked := True;
end;
procedure TfrmDrawSettings.seRandomHeightChange(Sender: TObject);
begin
cbRandomHeight.Checked := True;
end;
procedure TfrmDrawSettings.MouseLeave(var msg: TLMessage);
begin
try
if (not frmHueSettings.Visible) and (not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos))) then
Close;
except
Close;
end;
end;
initialization
{$I UfrmDrawSettings.lrs}
end.

View File

@ -1,120 +1,92 @@
object frmElevateSettings: TfrmElevateSettings inherited frmElevateSettings: TfrmElevateSettings
Left = 290 Left = 290
Height = 115 Height = 114
Top = 171 Top = 171
Width = 231 Width = 250
HorzScrollBar.Page = 230 Caption = 'Elevate'
HorzScrollBar.Range = 122 ClientHeight = 114
VertScrollBar.Page = 114 ClientWidth = 250
VertScrollBar.Range = 59 object rbRaise: TRadioButton[0]
ActiveControl = rbRaise AnchorSideLeft.Control = Owner
AutoScroll = False AnchorSideTop.Control = Owner
BorderIcons = [] Left = 8
BorderStyle = bsToolWindow Height = 19
Caption = 'Elevate' Top = 8
ClientHeight = 115 Width = 47
ClientWidth = 231 BorderSpacing.Left = 8
Font.Height = -11 BorderSpacing.Top = 8
OnClose = FormClose Caption = 'Raise'
OnDeactivate = FormDeactivate Checked = True
LCLVersion = '0.9.25' State = cbChecked
object Panel1: TPanel TabOrder = 2
Left = 8 end
Height = 67 object rbLower: TRadioButton[1]
Top = 8 AnchorSideLeft.Control = rbRaise
Width = 215 AnchorSideTop.Control = rbRaise
Align = alTop AnchorSideTop.Side = asrBottom
BorderSpacing.Around = 8 Left = 8
BevelOuter = bvNone Height = 19
ClientHeight = 67 Top = 27
ClientWidth = 215 Width = 52
TabOrder = 0 Caption = 'Lower'
object Panel2: TPanel TabOrder = 0
Height = 67 TabStop = False
Width = 162 end
Align = alClient object rbSet: TRadioButton[2]
BevelOuter = bvNone AnchorSideLeft.Control = rbLower
ClientHeight = 67 AnchorSideTop.Control = rbLower
ClientWidth = 162 AnchorSideTop.Side = asrBottom
ParentFont = True Left = 8
TabOrder = 0 Height = 19
object rbRaise: TRadioButton Top = 46
Height = 21 Width = 36
Width = 162 Caption = 'Set'
Align = alTop TabOrder = 1
Caption = 'Raise' TabStop = False
Checked = True end
State = cbChecked object cbRandomHeight: TCheckBox[3]
TabOrder = 2 AnchorSideLeft.Control = rbSet
end AnchorSideTop.Control = rbSet
object rbLower: TRadioButton AnchorSideTop.Side = asrBottom
Height = 21 Left = 8
Top = 21 Height = 19
Width = 162 Top = 81
Align = alTop Width = 135
Caption = 'Lower' BorderSpacing.Top = 16
ParentFont = True Caption = 'Add Random Altitude'
TabOrder = 0 TabOrder = 3
end end
object rbSet: TRadioButton object seRandomHeight: TSpinEdit[4]
Height = 21 AnchorSideLeft.Control = seZ
Top = 42 AnchorSideTop.Control = cbRandomHeight
Width = 162 AnchorSideTop.Side = asrCenter
Align = alTop AnchorSideRight.Control = Owner
Caption = 'Set' AnchorSideRight.Side = asrBottom
ParentFont = True Left = 197
TabOrder = 1 Height = 25
end Top = 78
end Width = 45
object Panel3: TPanel Anchors = [akTop, akLeft, akRight]
Left = 162 BorderSpacing.Right = 8
Height = 67 BorderSpacing.Bottom = 8
Width = 53 OnChange = seRandomHeightChange
Align = alRight TabOrder = 4
BevelOuter = bvNone end
ClientHeight = 67 object seZ: TSpinEdit[5]
ClientWidth = 53 AnchorSideLeft.Control = rbSet
TabOrder = 1 AnchorSideTop.Control = rbLower
object seZ: TSpinEdit AnchorSideTop.Side = asrCenter
Left = 7 AnchorSideRight.Control = Owner
Height = 23 AnchorSideRight.Side = asrBottom
Top = 20 Left = 197
Width = 47 Height = 25
MaxValue = 127 Top = 24
MinValue = -128 Width = 45
ParentFont = True Anchors = [akTop, akRight]
TabOrder = 0 BorderSpacing.Right = 8
Value = 1 MaxValue = 127
end MinValue = -128
end TabOrder = 5
end Value = 1
object Panel4: TPanel end
Left = 8 end
Height = 23
Top = 83
Width = 215
Align = alTop
BorderSpacing.Around = 8
BevelOuter = bvNone
ClientHeight = 23
ClientWidth = 215
TabOrder = 1
object cbRandomHeight: TCheckBox
Height = 23
Width = 168
Align = alClient
Caption = 'Add Random Altitude'
ParentFont = True
TabOrder = 0
end
object seRandomHeight: TSpinEdit
Left = 168
Height = 23
Width = 47
Align = alRight
OnChange = seRandomHeightChange
ParentFont = True
TabOrder = 1
end
end
end

View File

@ -21,7 +21,7 @@
* CDDL HEADER END * CDDL HEADER END
* *
* *
* Portions Copyright 2008 Andreas Schneider * Portions Copyright 2009 Andreas Schneider
*) *)
unit UfrmElevateSettings; unit UfrmElevateSettings;
@ -30,29 +30,21 @@ unit UfrmElevateSettings;
interface interface
uses uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, LMessages, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
LCLIntf, StdCtrls, Spin, ExtCtrls; Spin, ExtCtrls, UfrmToolWindow;
type type
{ TfrmElevateSettings } { TfrmElevateSettings }
TfrmElevateSettings = class(TForm) TfrmElevateSettings = class(TfrmToolWindow)
cbRandomHeight: TCheckBox; cbRandomHeight: TCheckBox;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
rbRaise: TRadioButton;
rbLower: TRadioButton; rbLower: TRadioButton;
rbRaise: TRadioButton;
rbSet: TRadioButton; rbSet: TRadioButton;
seRandomHeight: TSpinEdit; seRandomHeight: TSpinEdit;
seZ: TSpinEdit; seZ: TSpinEdit;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormDeactivate(Sender: TObject);
procedure seRandomHeightChange(Sender: TObject); procedure seRandomHeightChange(Sender: TObject);
protected
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
public public
{ public declarations } { public declarations }
end; end;
@ -64,28 +56,11 @@ implementation
{ TfrmElevateSettings } { TfrmElevateSettings }
procedure TfrmElevateSettings.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction := caHide;
end;
procedure TfrmElevateSettings.FormDeactivate(Sender: TObject);
begin
Close;
end;
procedure TfrmElevateSettings.seRandomHeightChange(Sender: TObject); procedure TfrmElevateSettings.seRandomHeightChange(Sender: TObject);
begin begin
cbRandomHeight.Checked := True; cbRandomHeight.Checked := True;
end; end;
procedure TfrmElevateSettings.MouseLeave(var msg: TLMessage);
begin
if not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then
Close;
end;
initialization initialization
{$I UfrmElevateSettings.lrs} {$I UfrmElevateSettings.lrs}

View File

@ -1,48 +1,59 @@
object frmHueSettings: TfrmHueSettings inherited frmHueSettings: TfrmHueSettings
Left = 290 Left = 290
Height = 208 Height = 209
Top = 171 Top = 171
Width = 217 Width = 217
BorderIcons = [] Caption = 'Hue Settings'
BorderStyle = bsToolWindow ClientHeight = 209
Caption = 'Hue Settings' ClientWidth = 217
ClientHeight = 208 OnCreate = FormCreate
ClientWidth = 217 object lblHue: TLabel[0]
Font.Height = -11 AnchorSideLeft.Control = Owner
FormStyle = fsStayOnTop AnchorSideTop.Control = edHue
OnClose = FormClose AnchorSideTop.Side = asrCenter
OnCreate = FormCreate Left = 8
OnDeactivate = FormDeactivate Height = 16
LCLVersion = '0.9.25' Top = 12
object lblHue: TLabel Width = 26
Left = 8 BorderSpacing.Left = 8
Height = 13 Caption = 'Hue:'
Top = 16 ParentColor = False
Width = 27 end
Caption = 'Hue:' object edHue: TEdit[1]
ParentColor = False AnchorSideLeft.Control = lblHue
ParentFont = True AnchorSideLeft.Side = asrBottom
end AnchorSideTop.Control = Owner
object edHue: TEdit Left = 42
Left = 48 Height = 25
Height = 23 Top = 8
Top = 10 Width = 80
Width = 80 BorderSpacing.Left = 8
OnEditingDone = edHueEditingDone BorderSpacing.Top = 8
ParentFont = True OnEditingDone = edHueEditingDone
TabOrder = 0 TabOrder = 0
end end
object lbHue: TListBox object lbHue: TListBox[2]
Left = 8 AnchorSideLeft.Control = Owner
Height = 160 AnchorSideTop.Control = edHue
Top = 40 AnchorSideTop.Side = asrBottom
Width = 200 AnchorSideRight.Control = Owner
ItemHeight = 16 AnchorSideRight.Side = asrBottom
OnDrawItem = lbHueDrawItem AnchorSideBottom.Control = Owner
OnSelectionChange = lbHueSelectionChange AnchorSideBottom.Side = asrBottom
ParentFont = True Left = 8
Style = lbOwnerDrawFixed Height = 160
TabOrder = 1 Top = 41
TopIndex = -1 Width = 201
end Anchors = [akTop, akLeft, akRight, akBottom]
end BorderSpacing.Around = 8
ItemHeight = 16
OnDrawItem = lbHueDrawItem
OnSelectionChange = lbHueSelectionChange
Style = lbOwnerDrawFixed
TabOrder = 1
end
inherited tmClose: TTimer[3]
left = 152
top = 112
end
end

View File

@ -21,7 +21,7 @@
* CDDL HEADER END * CDDL HEADER END
* *
* *
* Portions Copyright 2007 Andreas Schneider * Portions Copyright 2009 Andreas Schneider
*) *)
unit UfrmHueSettings; unit UfrmHueSettings;
@ -31,25 +31,21 @@ interface
uses uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
LMessages, LCLIntf, UHue; UfrmToolWindow, UHue;
type type
{ TfrmHueSettings } { TfrmHueSettings }
TfrmHueSettings = class(TForm) TfrmHueSettings = class(TfrmToolWindow)
edHue: TEdit; edHue: TEdit;
lblHue: TLabel; lblHue: TLabel;
lbHue: TListBox; lbHue: TListBox;
procedure edHueEditingDone(Sender: TObject); procedure edHueEditingDone(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormDeactivate(Sender: TObject);
procedure lbHueDrawItem(Control: TWinControl; Index: Integer; ARect: TRect; procedure lbHueDrawItem(Control: TWinControl; Index: Integer; ARect: TRect;
State: TOwnerDrawState); State: TOwnerDrawState);
procedure lbHueSelectionChange(Sender: TObject; User: boolean); procedure lbHueSelectionChange(Sender: TObject; User: boolean);
protected
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
public public
class procedure DrawHue(AHue: THue; ACanvas: TCanvas; ARect: TRect; class procedure DrawHue(AHue: THue; ACanvas: TCanvas; ARect: TRect;
ACaption: string); ACaption: string);
@ -65,12 +61,6 @@ uses
{ TfrmHueSettings } { TfrmHueSettings }
procedure TfrmHueSettings.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction := caHide;
end;
procedure TfrmHueSettings.edHueEditingDone(Sender: TObject); procedure TfrmHueSettings.edHueEditingDone(Sender: TObject);
var var
hueID: Integer; hueID: Integer;
@ -98,11 +88,6 @@ begin
lbHue.ItemIndex := 0; lbHue.ItemIndex := 0;
end; end;
procedure TfrmHueSettings.FormDeactivate(Sender: TObject);
begin
Close;
end;
procedure TfrmHueSettings.lbHueDrawItem(Control: TWinControl; Index: Integer; procedure TfrmHueSettings.lbHueDrawItem(Control: TWinControl; Index: Integer;
ARect: TRect; State: TOwnerDrawState); ARect: TRect; State: TOwnerDrawState);
var var
@ -120,16 +105,6 @@ begin
edHue.Text := Format('$%x', [lbHue.ItemIndex]); edHue.Text := Format('$%x', [lbHue.ItemIndex]);
end; end;
procedure TfrmHueSettings.MouseLeave(var msg: TLMessage);
begin
try
if not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then
Close;
except
Close;
end;
end;
class procedure TfrmHueSettings.DrawHue(AHue: THue; ACanvas: TCanvas; ARect: TRect; class procedure TfrmHueSettings.DrawHue(AHue: THue; ACanvas: TCanvas; ARect: TRect;
ACaption: string); ACaption: string);
var var

View File

@ -1,439 +1,481 @@
object frmMoveSettings: TfrmMoveSettings inherited frmMoveSettings: TfrmMoveSettings
Left = 290 Left = 290
Height = 113 Height = 120
Top = 171 Top = 171
Width = 236 Width = 232
ActiveControl = cbAsk ActiveControl = cbAsk
BorderIcons = [] AutoSize = True
BorderStyle = bsToolWindow Caption = 'Move settings'
Caption = 'Move settings' ClientHeight = 120
ClientHeight = 113 ClientWidth = 232
ClientWidth = 236 object cbAsk: TCheckBox[0]
Font.Height = -11 AnchorSideLeft.Control = gbDirection
FormStyle = fsStayOnTop AnchorSideLeft.Side = asrBottom
OnClose = FormClose AnchorSideTop.Control = gbDirection
OnDeactivate = FormDeactivate Left = 121
OnShow = FormShow Height = 19
LCLVersion = '0.9.25' Top = 20
object cbAsk: TCheckBox Width = 94
Left = 128 BorderSpacing.Left = 8
Height = 21 BorderSpacing.Top = 16
Top = 16 BorderSpacing.Right = 8
Width = 102 Caption = 'Ask each time'
Caption = 'Ask each time' Checked = True
Checked = True State = cbChecked
ParentFont = True TabOrder = 0
State = cbChecked end
TabOrder = 0 object gbDirection: TGroupBox[1]
end AnchorSideLeft.Control = Owner
object gbDirection: TGroupBox AnchorSideTop.Control = Owner
Left = 8 Left = 8
Height = 96 Height = 108
Top = 8 Top = 4
Width = 105 Width = 105
ClientHeight = 92 AutoSize = True
ClientWidth = 101 BorderSpacing.Left = 4
ParentFont = True BorderSpacing.Bottom = 4
TabOrder = 1 BorderSpacing.Around = 4
object btnTopLeft: TSpeedButton ClientHeight = 90
Left = 6 ClientWidth = 101
Height = 22 TabOrder = 1
Width = 23 object btnTopLeft: TSpeedButton
Color = clBtnFace AnchorSideLeft.Control = gbDirection
Down = True AnchorSideTop.Control = gbDirection
Glyph.Data = { Left = 8
36040000424D3604000000000000360000002800000010000000100000000100 Height = 22
2000000000000004000064000000640000000000000000000000000000000000 Top = 0
0000000000000000000000000000000000000000000000000000000000000000 Width = 23
0000000000000000000000000000000000000000000000000000000000000000 BorderSpacing.Left = 8
0000000000000000000000000000000000000000000000000000000000000000 Color = clBtnFace
0000000000000000000000000000000000000000000000000000000000000000 Down = True
0000000000000000000000000000000000000000000000000000000000000000 Glyph.Data = {
000000000000404040FF00000000000000000000000000000000000000000000 36040000424D3604000000000000360000002800000010000000100000000100
0000000000000000000000000000000000000000000000000000000000000000 2000000000000004000064000000640000000000000000000000000000000000
0000404040FF404040FF404040FF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000004040 0000000000000000000000000000000000000000000000000000000000000000
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF404040FF404040FF404040FF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000404040FF404040FF4040 000000000000404040FF00000000000000000000000000000000000000000000
40FF404040FF404040FF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000404040FF000000000000000000000000404040FF404040FF404040FF4040 0000404040FF404040FF404040FF000000000000000000000000000000000000
40FF404040FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000004040
0000404040FF404040FF00000000404040FF404040FF404040FF404040FF4040 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
40FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000404040FF4040
0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF0000 40FF404040FF404040FF404040FF000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000404040FF404040FF4040
0000404040FF404040FF404040FF404040FF404040FF404040FF000000000000 40FF404040FF404040FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000404040FF000000000000000000000000404040FF404040FF404040FF4040
0000404040FF404040FF404040FF404040FF404040FF00000000000000000000 40FF404040FF0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000404040FF404040FF00000000404040FF404040FF404040FF404040FF4040
0000404040FF404040FF404040FF404040FF404040FF404040FF000000000000 40FF000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF0000
0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF0000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000404040FF404040FF404040FF404040FF404040FF404040FF000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000404040FF404040FF404040FF404040FF404040FF00000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000 0000404040FF404040FF404040FF404040FF404040FF404040FF000000000000
} 0000000000000000000000000000000000000000000000000000000000000000
GroupIndex = 1 0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF0000
NumGlyphs = 0 0000000000000000000000000000000000000000000000000000000000000000
OnClick = btnTopLeftClick 0000000000000000000000000000000000000000000000000000000000000000
ParentFont = True 0000000000000000000000000000000000000000000000000000000000000000
end 0000000000000000000000000000000000000000000000000000000000000000
object btnTop: TSpeedButton 0000000000000000000000000000000000000000000000000000
Left = 38 }
Height = 22 GroupIndex = 1
Width = 23 NumGlyphs = 0
Color = clBtnFace OnClick = btnTopLeftClick
Glyph.Data = { end
36040000424D3604000000000000360000002800000010000000100000000100 object btnTop: TSpeedButton
2000000000000004000064000000640000000000000000000000000000000000 AnchorSideLeft.Control = btnTopLeft
0000000000000000000000000000000000000000000000000000000000000000 AnchorSideLeft.Side = asrBottom
0000000000000000000000000000000000000000000000000000000000000000 AnchorSideTop.Control = gbDirection
0000000000000000000000000000000000000000000000000000000000000000 Left = 39
0000000000000000000000000000000000000000000000000000000000000000 Height = 22
000000000000000000000000000000000000404040FF404040FF404040FF4040 Top = 0
40FF000000000000000000000000000000000000000000000000000000000000 Width = 23
000000000000000000000000000000000000404040FF404040FF404040FF4040 BorderSpacing.Left = 8
40FF000000000000000000000000000000000000000000000000000000000000 Color = clBtnFace
000000000000000000000000000000000000404040FF404040FF404040FF4040 Glyph.Data = {
40FF000000000000000000000000000000000000000000000000000000000000 36040000424D3604000000000000360000002800000010000000100000000100
000000000000000000000000000000000000404040FF404040FF404040FF4040 2000000000000004000064000000640000000000000000000000000000000000
40FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000404040FF404040FF404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000404040FF404040FF404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
000000000000000000000000000000000000404040FF404040FF404040FF4040 40FF000000000000000000000000000000000000000000000000000000000000
40FF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
000000000000000000000000000000000000404040FF404040FF404040FF4040 40FF000000000000000000000000000000000000000000000000000000000000
40FF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
000000000000404040FF404040FF404040FF404040FF404040FF404040FF4040 40FF000000000000000000000000000000000000000000000000000000000000
40FF404040FF404040FF404040FF000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
00000000000000000000404040FF404040FF404040FF404040FF404040FF4040 40FF000000000000000000000000000000000000000000000000000000000000
40FF404040FF404040FF00000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
0000000000000000000000000000404040FF404040FF404040FF404040FF4040 40FF000000000000000000000000000000000000000000000000000000000000
40FF404040FF0000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
000000000000000000000000000000000000404040FF404040FF404040FF4040 40FF000000000000000000000000000000000000000000000000000000000000
40FF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
00000000000000000000000000000000000000000000404040FF404040FF0000 40FF000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
0000000000000000000000000000000000000000000000000000000000000000 40FF000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000 000000000000404040FF404040FF404040FF404040FF404040FF404040FF4040
} 40FF404040FF404040FF404040FF000000000000000000000000000000000000
GroupIndex = 1 00000000000000000000404040FF404040FF404040FF404040FF404040FF4040
NumGlyphs = 0 40FF404040FF404040FF00000000000000000000000000000000000000000000
OnClick = btnTopLeftClick 0000000000000000000000000000404040FF404040FF404040FF404040FF4040
ParentFont = True 40FF404040FF0000000000000000000000000000000000000000000000000000
end 000000000000000000000000000000000000404040FF404040FF404040FF4040
object btnTopRight: TSpeedButton 40FF000000000000000000000000000000000000000000000000000000000000
Left = 70 00000000000000000000000000000000000000000000404040FF404040FF0000
Height = 22 0000000000000000000000000000000000000000000000000000000000000000
Width = 23 0000000000000000000000000000000000000000000000000000000000000000
Color = clBtnFace 0000000000000000000000000000000000000000000000000000
Glyph.Data = { }
36040000424D3604000000000000360000002800000010000000100000000100 GroupIndex = 1
2000000000000004000064000000640000000000000000000000000000000000 NumGlyphs = 0
0000000000000000000000000000000000000000000000000000000000000000 OnClick = btnTopLeftClick
0000000000000000000000000000000000000000000000000000000000000000 end
0000000000000000000000000000000000000000000000000000000000000000 object btnTopRight: TSpeedButton
0000000000000000000000000000000000000000000000000000000000000000 AnchorSideLeft.Control = btnTop
00000000000000000000404040FF000000000000000000000000000000000000 AnchorSideLeft.Side = asrBottom
0000000000000000000000000000000000000000000000000000000000000000 AnchorSideTop.Control = gbDirection
000000000000404040FF404040FF404040FF0000000000000000000000000000 Left = 70
0000000000000000000000000000000000000000000000000000000000000000 Height = 22
0000404040FF404040FF404040FF404040FF404040FF00000000000000000000 Top = 0
0000000000000000000000000000000000000000000000000000000000000000 Width = 23
000000000000404040FF404040FF404040FF404040FF404040FF000000000000 BorderSpacing.Left = 8
0000000000000000000000000000000000000000000000000000000000000000 Color = clBtnFace
00000000000000000000404040FF404040FF404040FF404040FF404040FF0000 Glyph.Data = {
0000000000000000000000000000000000000000000000000000000000000000 36040000424D3604000000000000360000002800000010000000100000000100
0000000000000000000000000000404040FF404040FF404040FF404040FF4040 2000000000000004000064000000640000000000000000000000000000000000
40FF000000000000000000000000404040FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000404040FF404040FF404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF404040FF00000000404040FF404040FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000404040FF404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 00000000000000000000404040FF000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 000000000000404040FF404040FF404040FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000004040 0000000000000000000000000000000000000000000000000000000000000000
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 0000404040FF404040FF404040FF404040FF404040FF00000000000000000000
0000000000000000000000000000000000000000000000000000404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 000000000000404040FF404040FF404040FF404040FF404040FF000000000000
00000000000000000000000000000000000000000000404040FF404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 00000000000000000000404040FF404040FF404040FF404040FF404040FF0000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000404040FF404040FF404040FF404040FF4040
0000000000000000000000000000000000000000000000000000000000000000 40FF000000000000000000000000404040FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
} 40FF404040FF00000000404040FF404040FF0000000000000000000000000000
GroupIndex = 1 00000000000000000000000000000000000000000000404040FF404040FF4040
NumGlyphs = 0 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
OnClick = btnTopLeftClick 0000000000000000000000000000000000000000000000000000404040FF4040
ParentFont = True 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
end 0000000000000000000000000000000000000000000000000000000000004040
object btnRight: TSpeedButton 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
Left = 70 0000000000000000000000000000000000000000000000000000404040FF4040
Height = 22 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
Top = 32 00000000000000000000000000000000000000000000404040FF404040FF4040
Width = 23 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
Color = clBtnFace 0000000000000000000000000000000000000000000000000000000000000000
Glyph.Data = { 0000000000000000000000000000000000000000000000000000000000000000
36040000424D3604000000000000360000002800000010000000100000000100 0000000000000000000000000000000000000000000000000000000000000000
2000000000000004000064000000640000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 }
0000000000000000000000000000000000000000000000000000000000000000 GroupIndex = 1
0000000000000000000000000000000000000000000000000000000000000000 NumGlyphs = 0
0000000000000000000000000000000000000000000000000000000000000000 OnClick = btnTopLeftClick
0000000000000000000000000000000000000000000000000000000000000000 end
0000000000000000000000000000000000000000000000000000000000000000 object btnRight: TSpeedButton
0000000000000000000000000000000000000000000000000000000000000000 AnchorSideLeft.Control = btnTopRight
0000404040FF0000000000000000000000000000000000000000000000000000 AnchorSideTop.Control = btnTopRight
0000000000000000000000000000000000000000000000000000000000000000 AnchorSideTop.Side = asrBottom
0000404040FF404040FF00000000000000000000000000000000000000000000 Left = 70
0000000000000000000000000000000000000000000000000000000000000000 Height = 22
0000404040FF404040FF404040FF000000000000000000000000000000000000 Top = 30
0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040 Width = 23
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 BorderSpacing.Top = 8
0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040 BorderSpacing.Right = 8
40FF404040FF404040FF404040FF404040FF404040FF00000000000000000000 Color = clBtnFace
0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040 Glyph.Data = {
40FF404040FF404040FF404040FF404040FF404040FF00000000000000000000 36040000424D3604000000000000360000002800000010000000100000000100
0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040 2000000000000004000064000000640000000000000000000000000000000000
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000404040FF404040FF404040FF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000404040FF404040FF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000404040FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000404040FF0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000404040FF404040FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000404040FF404040FF404040FF000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000 0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040
} 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
GroupIndex = 1 0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040
NumGlyphs = 0 40FF404040FF404040FF404040FF404040FF404040FF00000000000000000000
OnClick = btnTopLeftClick 0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040
ParentFont = True 40FF404040FF404040FF404040FF404040FF404040FF00000000000000000000
end 0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040
object btnBottomRight: TSpeedButton 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
Left = 70 0000000000000000000000000000000000000000000000000000000000000000
Height = 22 0000404040FF404040FF404040FF000000000000000000000000000000000000
Top = 64 0000000000000000000000000000000000000000000000000000000000000000
Width = 23 0000404040FF404040FF00000000000000000000000000000000000000000000
Color = clBtnFace 0000000000000000000000000000000000000000000000000000000000000000
Glyph.Data = { 0000404040FF0000000000000000000000000000000000000000000000000000
36040000424D3604000000000000360000002800000010000000100000000100 0000000000000000000000000000000000000000000000000000000000000000
2000000000000004000064000000640000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000404040FF404040FF4040 }
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 GroupIndex = 1
0000000000000000000000000000000000000000000000000000404040FF4040 NumGlyphs = 0
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 OnClick = btnTopLeftClick
0000000000000000000000000000000000000000000000000000000000004040 end
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 object btnBottomRight: TSpeedButton
0000000000000000000000000000000000000000000000000000404040FF4040 AnchorSideLeft.Control = btnRight
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 AnchorSideTop.Control = btnRight
00000000000000000000000000000000000000000000404040FF404040FF4040 AnchorSideTop.Side = asrBottom
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 Left = 70
000000000000000000000000000000000000404040FF404040FF404040FF4040 Height = 22
40FF404040FF00000000404040FF404040FF0000000000000000000000000000 Top = 60
0000000000000000000000000000404040FF404040FF404040FF404040FF4040 Width = 23
40FF000000000000000000000000404040FF0000000000000000000000000000 BorderSpacing.Top = 8
00000000000000000000404040FF404040FF404040FF404040FF404040FF0000 Color = clBtnFace
0000000000000000000000000000000000000000000000000000000000000000 Glyph.Data = {
000000000000404040FF404040FF404040FF404040FF404040FF000000000000 36040000424D3604000000000000360000002800000010000000100000000100
0000000000000000000000000000000000000000000000000000000000000000 2000000000000004000064000000640000000000000000000000000000000000
0000404040FF404040FF404040FF404040FF404040FF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
000000000000404040FF404040FF404040FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000404040FF000000000000000000000000000000000000 00000000000000000000000000000000000000000000404040FF404040FF4040
0000000000000000000000000000000000000000000000000000000000000000 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000404040FF4040
0000000000000000000000000000000000000000000000000000000000000000 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000004040
0000000000000000000000000000000000000000000000000000 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
} 0000000000000000000000000000000000000000000000000000404040FF4040
GroupIndex = 1 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
NumGlyphs = 0 00000000000000000000000000000000000000000000404040FF404040FF4040
OnClick = btnTopLeftClick 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
ParentFont = True 000000000000000000000000000000000000404040FF404040FF404040FF4040
end 40FF404040FF00000000404040FF404040FF0000000000000000000000000000
object btnBottom: TSpeedButton 0000000000000000000000000000404040FF404040FF404040FF404040FF4040
Left = 38 40FF000000000000000000000000404040FF0000000000000000000000000000
Height = 22 00000000000000000000404040FF404040FF404040FF404040FF404040FF0000
Top = 64 0000000000000000000000000000000000000000000000000000000000000000
Width = 23 000000000000404040FF404040FF404040FF404040FF404040FF000000000000
Color = clBtnFace 0000000000000000000000000000000000000000000000000000000000000000
Glyph.Data = { 0000404040FF404040FF404040FF404040FF404040FF00000000000000000000
36040000424D3604000000000000360000002800000010000000100000000100 0000000000000000000000000000000000000000000000000000000000000000
2000000000000004000064000000640000000000000000000000000000000000 000000000000404040FF404040FF404040FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000404040FF000000000000000000000000000000000000
00000000000000000000000000000000000000000000404040FF404040FF0000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000404040FF404040FF404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000404040FF404040FF404040FF404040FF4040 0000000000000000000000000000000000000000000000000000
40FF404040FF0000000000000000000000000000000000000000000000000000 }
00000000000000000000404040FF404040FF404040FF404040FF404040FF4040 GroupIndex = 1
40FF404040FF404040FF00000000000000000000000000000000000000000000 NumGlyphs = 0
000000000000404040FF404040FF404040FF404040FF404040FF404040FF4040 OnClick = btnTopLeftClick
40FF404040FF404040FF404040FF000000000000000000000000000000000000 end
000000000000000000000000000000000000404040FF404040FF404040FF4040 object btnBottom: TSpeedButton
40FF000000000000000000000000000000000000000000000000000000000000 AnchorSideLeft.Control = btnBottomLeft
000000000000000000000000000000000000404040FF404040FF404040FF4040 AnchorSideLeft.Side = asrBottom
40FF000000000000000000000000000000000000000000000000000000000000 AnchorSideTop.Control = btnBottomLeft
000000000000000000000000000000000000404040FF404040FF404040FF4040 Left = 39
40FF000000000000000000000000000000000000000000000000000000000000 Height = 22
000000000000000000000000000000000000404040FF404040FF404040FF4040 Top = 60
40FF000000000000000000000000000000000000000000000000000000000000 Width = 23
000000000000000000000000000000000000404040FF404040FF404040FF4040 BorderSpacing.Left = 8
40FF000000000000000000000000000000000000000000000000000000000000 BorderSpacing.Bottom = 8
000000000000000000000000000000000000404040FF404040FF404040FF4040 Color = clBtnFace
40FF000000000000000000000000000000000000000000000000000000000000 Glyph.Data = {
000000000000000000000000000000000000404040FF404040FF404040FF4040 36040000424D3604000000000000360000002800000010000000100000000100
40FF000000000000000000000000000000000000000000000000000000000000 2000000000000004000064000000640000000000000000000000000000000000
000000000000000000000000000000000000404040FF404040FF404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000404040FF404040FF0000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
0000000000000000000000000000000000000000000000000000 40FF000000000000000000000000000000000000000000000000000000000000
} 0000000000000000000000000000404040FF404040FF404040FF404040FF4040
GroupIndex = 1 40FF404040FF0000000000000000000000000000000000000000000000000000
NumGlyphs = 0 00000000000000000000404040FF404040FF404040FF404040FF404040FF4040
OnClick = btnTopLeftClick 40FF404040FF404040FF00000000000000000000000000000000000000000000
ParentFont = True 000000000000404040FF404040FF404040FF404040FF404040FF404040FF4040
end 40FF404040FF404040FF404040FF000000000000000000000000000000000000
object btnBottomLeft: TSpeedButton 000000000000000000000000000000000000404040FF404040FF404040FF4040
Left = 6 40FF000000000000000000000000000000000000000000000000000000000000
Height = 22 000000000000000000000000000000000000404040FF404040FF404040FF4040
Top = 64 40FF000000000000000000000000000000000000000000000000000000000000
Width = 23 000000000000000000000000000000000000404040FF404040FF404040FF4040
Color = clBtnFace 40FF000000000000000000000000000000000000000000000000000000000000
Glyph.Data = { 000000000000000000000000000000000000404040FF404040FF404040FF4040
36040000424D3604000000000000360000002800000010000000100000000100 40FF000000000000000000000000000000000000000000000000000000000000
2000000000000004000064000000640000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
0000000000000000000000000000000000000000000000000000000000000000 40FF000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
0000000000000000000000000000000000000000000000000000000000000000 40FF000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF0000 40FF000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000404040FF404040FF404040FF4040
0000404040FF404040FF404040FF404040FF404040FF404040FF000000000000 40FF000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000404040FF404040FF404040FF404040FF404040FF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000404040FF404040FF404040FF404040FF404040FF404040FF000000000000 0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 }
0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF0000 GroupIndex = 1
0000000000000000000000000000000000000000000000000000000000000000 NumGlyphs = 0
0000404040FF404040FF00000000404040FF404040FF404040FF404040FF4040 OnClick = btnTopLeftClick
40FF000000000000000000000000000000000000000000000000000000000000 end
0000404040FF000000000000000000000000404040FF404040FF404040FF4040 object btnBottomLeft: TSpeedButton
40FF404040FF0000000000000000000000000000000000000000000000000000 AnchorSideLeft.Control = btnLeft
00000000000000000000000000000000000000000000404040FF404040FF4040 AnchorSideTop.Control = btnLeft
40FF404040FF404040FF00000000000000000000000000000000000000000000 AnchorSideTop.Side = asrBottom
0000000000000000000000000000000000000000000000000000404040FF4040 Left = 8
40FF404040FF404040FF404040FF000000000000000000000000000000000000 Height = 22
0000000000000000000000000000000000000000000000000000000000004040 Top = 60
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 Width = 23
0000000000000000000000000000000000000000000000000000000000000000 BorderSpacing.Top = 8
0000404040FF404040FF404040FF000000000000000000000000000000000000 Color = clBtnFace
0000000000000000000000000000000000000000000000000000000000000000 Glyph.Data = {
000000000000404040FF00000000000000000000000000000000000000000000 36040000424D3604000000000000360000002800000010000000100000000100
0000000000000000000000000000000000000000000000000000000000000000 2000000000000004000064000000640000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
} 0000000000000000000000000000000000000000000000000000000000000000
GroupIndex = 1 0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF0000
NumGlyphs = 0 0000000000000000000000000000000000000000000000000000000000000000
OnClick = btnTopLeftClick 0000404040FF404040FF404040FF404040FF404040FF404040FF000000000000
ParentFont = True 0000000000000000000000000000000000000000000000000000000000000000
end 0000404040FF404040FF404040FF404040FF404040FF00000000000000000000
object btnLeft: TSpeedButton 0000000000000000000000000000000000000000000000000000000000000000
Left = 6 0000404040FF404040FF404040FF404040FF404040FF404040FF000000000000
Height = 22 0000000000000000000000000000000000000000000000000000000000000000
Top = 32 0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF0000
Width = 23 0000000000000000000000000000000000000000000000000000000000000000
Color = clBtnFace 0000404040FF404040FF00000000404040FF404040FF404040FF404040FF4040
Glyph.Data = { 40FF000000000000000000000000000000000000000000000000000000000000
36040000424D3604000000000000360000002800000010000000100000000100 0000404040FF000000000000000000000000404040FF404040FF404040FF4040
2000000000000004000064000000640000000000000000000000000000000000 40FF404040FF0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000404040FF404040FF4040
0000000000000000000000000000000000000000000000000000000000000000 40FF404040FF404040FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000404040FF4040
0000000000000000000000000000000000000000000000000000000000000000 40FF404040FF404040FF404040FF000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000004040
0000000000000000000000000000000000000000000000000000000000000000 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
0000000000000000000000000000404040FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000404040FF404040FF404040FF000000000000000000000000000000000000
00000000000000000000404040FF404040FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 000000000000404040FF00000000000000000000000000000000000000000000
000000000000404040FF404040FF404040FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040 0000000000000000000000000000000000000000000000000000000000000000
40FF404040FF404040FF404040FF404040FF0000000000000000000000004040 0000000000000000000000000000000000000000000000000000
40FF404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040 }
40FF404040FF404040FF404040FF404040FF0000000000000000000000004040 GroupIndex = 1
40FF404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040 NumGlyphs = 0
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 OnClick = btnTopLeftClick
0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040 end
40FF404040FF404040FF404040FF404040FF0000000000000000000000000000 object btnLeft: TSpeedButton
000000000000404040FF404040FF404040FF0000000000000000000000000000 AnchorSideLeft.Control = btnTopLeft
0000000000000000000000000000000000000000000000000000000000000000 AnchorSideTop.Control = btnTop
00000000000000000000404040FF404040FF0000000000000000000000000000 AnchorSideTop.Side = asrBottom
0000000000000000000000000000000000000000000000000000000000000000 Left = 8
0000000000000000000000000000404040FF0000000000000000000000000000 Height = 22
0000000000000000000000000000000000000000000000000000000000000000 Top = 30
0000000000000000000000000000000000000000000000000000000000000000 Width = 23
0000000000000000000000000000000000000000000000000000000000000000 BorderSpacing.Top = 8
0000000000000000000000000000000000000000000000000000000000000000 Color = clBtnFace
0000000000000000000000000000000000000000000000000000000000000000 Glyph.Data = {
0000000000000000000000000000000000000000000000000000000000000000 36040000424D3604000000000000360000002800000010000000100000000100
0000000000000000000000000000000000000000000000000000 2000000000000004000064000000640000000000000000000000000000000000
} 0000000000000000000000000000000000000000000000000000000000000000
GroupIndex = 1 0000000000000000000000000000000000000000000000000000000000000000
NumGlyphs = 0 0000000000000000000000000000000000000000000000000000000000000000
OnClick = btnTopLeftClick 0000000000000000000000000000000000000000000000000000000000000000
ParentFont = True 0000000000000000000000000000000000000000000000000000000000000000
end 0000000000000000000000000000000000000000000000000000000000000000
object seOffset: TSpinEdit 0000000000000000000000000000404040FF0000000000000000000000000000
Left = 33 0000000000000000000000000000000000000000000000000000000000000000
Height = 23 00000000000000000000404040FF404040FF0000000000000000000000000000
Hint = 'Offset' 0000000000000000000000000000000000000000000000000000000000000000
Top = 32 000000000000404040FF404040FF404040FF0000000000000000000000000000
Width = 34 0000000000000000000000000000000000000000000000000000000000000000
MaxValue = 8 0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040
MinValue = 1 40FF404040FF404040FF404040FF404040FF0000000000000000000000004040
ParentFont = True 40FF404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040
ParentShowHint = False 40FF404040FF404040FF404040FF404040FF0000000000000000000000004040
ShowHint = True 40FF404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040
TabOrder = 0 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
Value = 1 0000404040FF404040FF404040FF404040FF404040FF404040FF404040FF4040
end 40FF404040FF404040FF404040FF404040FF0000000000000000000000000000
end 000000000000404040FF404040FF404040FF0000000000000000000000000000
object btnCancel: TButton 0000000000000000000000000000000000000000000000000000000000000000
Left = 128 00000000000000000000404040FF404040FF0000000000000000000000000000
Height = 25 0000000000000000000000000000000000000000000000000000000000000000
Top = 80 0000000000000000000000000000404040FF0000000000000000000000000000
Width = 103 0000000000000000000000000000000000000000000000000000000000000000
BorderSpacing.InnerBorder = 4 0000000000000000000000000000000000000000000000000000000000000000
Cancel = True 0000000000000000000000000000000000000000000000000000000000000000
Caption = 'Cancel' 0000000000000000000000000000000000000000000000000000000000000000
ModalResult = 2 0000000000000000000000000000000000000000000000000000000000000000
ParentFont = True 0000000000000000000000000000000000000000000000000000000000000000
TabOrder = 2 0000000000000000000000000000000000000000000000000000
end }
end GroupIndex = 1
NumGlyphs = 0
OnClick = btnTopLeftClick
end
object seOffset: TSpinEdit
AnchorSideLeft.Control = btnTop
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = btnTop
AnchorSideTop.Side = asrBottom
Left = 33
Height = 25
Hint = 'Offset'
Top = 30
Width = 34
BorderSpacing.Top = 8
MaxValue = 8
MinValue = 1
ParentShowHint = False
ShowHint = True
TabOrder = 0
Value = 1
end
end
object btnCancel: TButton[2]
AnchorSideLeft.Control = gbDirection
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = gbDirection
AnchorSideBottom.Side = asrBottom
Left = 121
Height = 25
Top = 83
Width = 103
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 4
BorderSpacing.InnerBorder = 4
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 2
end
end

View File

@ -1,152 +1,147 @@
(* (*
* CDDL HEADER START * CDDL HEADER START
* *
* The contents of this file are subject to the terms of the * The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only * Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance * (the "License"). You may not use this file except in compliance
* with the License. * with the License.
* *
* You can obtain a copy of the license at * You can obtain a copy of the license at
* http://www.opensource.org/licenses/cddl1.php. * http://www.opensource.org/licenses/cddl1.php.
* See the License for the specific language governing permissions * See the License for the specific language governing permissions
* and limitations under the License. * and limitations under the License.
* *
* When distributing Covered Code, include this CDDL HEADER in each * When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at * file and include the License file at
* http://www.opensource.org/licenses/cddl1.php. If applicable, * http://www.opensource.org/licenses/cddl1.php. If applicable,
* add the following below this CDDL HEADER, with the fields enclosed * add the following below this CDDL HEADER, with the fields enclosed
* by brackets "[]" replaced with your own identifying * information: * by brackets "[]" replaced with your own identifying * information:
* Portions Copyright [yyyy] [name of copyright owner] * Portions Copyright [yyyy] [name of copyright owner]
* *
* CDDL HEADER END * CDDL HEADER END
* *
* *
* Portions Copyright 2007 Andreas Schneider * Portions Copyright 2009 Andreas Schneider
*) *)
unit UfrmMoveSettings; unit UfrmMoveSettings;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
Buttons, Spin, LMessages, LCLIntf, math; Buttons, Spin, ExtCtrls, Math, UfrmToolWindow;
type type
{ TfrmMoveSettings } { TfrmMoveSettings }
TfrmMoveSettings = class(TForm) TfrmMoveSettings = class(TfrmToolWindow)
btnCancel: TButton; btnCancel: TButton;
cbAsk: TCheckBox; cbAsk: TCheckBox;
gbDirection: TGroupBox; gbDirection: TGroupBox;
btnTopLeft: TSpeedButton; btnTopLeft: TSpeedButton;
btnTop: TSpeedButton; btnTop: TSpeedButton;
btnTopRight: TSpeedButton; btnTopRight: TSpeedButton;
btnRight: TSpeedButton; btnRight: TSpeedButton;
btnBottomRight: TSpeedButton; btnBottomRight: TSpeedButton;
btnBottom: TSpeedButton; btnBottom: TSpeedButton;
btnBottomLeft: TSpeedButton; btnBottomLeft: TSpeedButton;
btnLeft: TSpeedButton; btnLeft: TSpeedButton;
seOffset: TSpinEdit; seOffset: TSpinEdit;
procedure btnTopLeftClick(Sender: TObject); procedure btnTopLeftClick(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure FormDeactivate(Sender: TObject); override;
procedure FormDeactivate(Sender: TObject); procedure FormShow(Sender: TObject); override;
procedure FormShow(Sender: TObject); protected
protected function CanClose: Boolean; override;
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave; public
public function GetOffsetX: Integer;
function GetOffsetX: Integer; function GetOffsetY: Integer;
function GetOffsetY: Integer; end;
end;
var
var frmMoveSettings: TfrmMoveSettings;
frmMoveSettings: TfrmMoveSettings;
implementation
implementation
uses
uses UdmNetwork, UfrmMain, UEnums;
UdmNetwork, UfrmMain, UEnums;
{ TfrmMoveSettings }
{ TfrmMoveSettings }
procedure TfrmMoveSettings.FormDeactivate(Sender: TObject);
procedure TfrmMoveSettings.FormClose(Sender: TObject; var CloseAction: TCloseAction); begin
begin if not (fsModal in FormState) then
CloseAction := caHide; inherited FormDeactivate(Sender);
end; end;
procedure TfrmMoveSettings.FormDeactivate(Sender: TObject); procedure TfrmMoveSettings.FormShow(Sender: TObject);
begin begin
if not (fsModal in FormState) then btnCancel.Visible := (fsModal in FormState);
Close; if dmNetwork.AccessLevel = alAdministrator then
end; seOffset.MaxValue := Max(frmMain.Landscape.CellWidth, frmMain.Landscape.CellHeight);
procedure TfrmMoveSettings.FormShow(Sender: TObject); inherited FormShow(Sender);
begin end;
btnCancel.Visible := (fsModal in FormState);
if dmNetwork.AccessLevel = alAdministrator then function TfrmMoveSettings.CanClose: Boolean;
seOffset.MaxValue := Max(frmMain.Landscape.CellWidth, frmMain.Landscape.CellHeight); begin
end; Result := Visible and (not (fsModal in FormState)) and
inherited CanClose;
procedure TfrmMoveSettings.MouseLeave(var msg: TLMessage); end;
begin
if Visible and (not (fsModal in FormState)) and function TfrmMoveSettings.GetOffsetX: Integer;
(not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos))) then begin
Close; if btnTopLeft.Down then
end; Result := -seOffset.Value
else if btnTop.Down then
function TfrmMoveSettings.GetOffsetX: Integer; Result := -seOffset.Value
begin else if btnTopRight.Down then
if btnTopLeft.Down then Result := 0
Result := -seOffset.Value else if btnRight.Down then
else if btnTop.Down then Result := seOffset.Value
Result := -seOffset.Value else if btnBottomRight.Down then
else if btnTopRight.Down then Result := seOffset.Value
Result := 0 else if btnBottom.Down then
else if btnRight.Down then Result := seOffset.Value
Result := seOffset.Value else if btnBottomLeft.Down then
else if btnBottomRight.Down then Result := 0
Result := seOffset.Value else if btnLeft.Down then
else if btnBottom.Down then Result := -seOffset.Value
Result := seOffset.Value else
else if btnBottomLeft.Down then Result := 0;
Result := 0 end;
else if btnLeft.Down then
Result := -seOffset.Value function TfrmMoveSettings.GetOffsetY: Integer;
else begin
Result := 0; if btnTopLeft.Down then
end; Result := 0
else if btnTop.Down then
function TfrmMoveSettings.GetOffsetY: Integer; Result := -seOffset.Value
begin else if btnTopRight.Down then
if btnTopLeft.Down then Result := -seOffset.Value
Result := 0 else if btnRight.Down then
else if btnTop.Down then Result := -seOffset.Value
Result := -seOffset.Value else if btnBottomRight.Down then
else if btnTopRight.Down then Result := 0
Result := -seOffset.Value else if btnBottom.Down then
else if btnRight.Down then Result := seOffset.Value
Result := -seOffset.Value else if btnBottomLeft.Down then
else if btnBottomRight.Down then Result := seOffset.Value
Result := 0 else if btnLeft.Down then
else if btnBottom.Down then Result := seOffset.Value
Result := seOffset.Value else
else if btnBottomLeft.Down then Result := 0;
Result := seOffset.Value end;
else if btnLeft.Down then
Result := seOffset.Value procedure TfrmMoveSettings.btnTopLeftClick(Sender: TObject);
else begin
Result := 0; ModalResult := mrYes;
end; end;
procedure TfrmMoveSettings.btnTopLeftClick(Sender: TObject); initialization
begin {$I UfrmMoveSettings.lrs}
ModalResult := mrYes;
end; end.
initialization
{$I UfrmMoveSettings.lrs}
end.

View File

@ -0,0 +1,21 @@
object frmToolWindow: TfrmToolWindow
Left = 282
Height = 300
Top = 157
Width = 400
BorderIcons = []
BorderStyle = bsToolWindow
Caption = 'ToolWindow'
FormStyle = fsStayOnTop
OnClose = FormClose
OnDeactivate = FormDeactivate
OnShow = FormShow
ShowInTaskBar = stNever
LCLVersion = '0.9.29'
object tmClose: TTimer
Enabled = False
OnTimer = tmCloseTimer
left = 8
top = 8
end
end

View File

@ -0,0 +1,103 @@
(*
* 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 UfrmToolWindow;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
LCLIntf, LMessages, ExtCtrls;
type
{ TfrmToolWindow }
TfrmToolWindow = class(TForm)
tmClose: TTimer;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormDeactivate(Sender: TObject); virtual;
procedure FormShow(Sender: TObject); virtual;
procedure tmCloseTimer(Sender: TObject);
protected
function CanClose: Boolean; virtual;
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
public
{ public declarations }
end;
var
frmToolWindow: TfrmToolWindow;
implementation
{ TfrmToolWindow }
procedure TfrmToolWindow.FormDeactivate(Sender: TObject);
begin
Close;
end;
procedure TfrmToolWindow.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction := caHide;
end;
procedure TfrmToolWindow.FormShow(Sender: TObject);
begin
Top := Mouse.CursorPos.y - 8;
Left := Mouse.CursorPos.x - 8;
OnDeactivate := nil;
tmClose.Enabled := True;
end;
procedure TfrmToolWindow.tmCloseTimer(Sender: TObject);
begin
tmClose.Enabled := False;
OnDeactivate := @FormDeactivate;
if CanClose then
Close;
end;
function TfrmToolWindow.CanClose: Boolean;
begin
Result := not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos));
end;
procedure TfrmToolWindow.MouseLeave(var msg: TLMessage);
begin
if CanClose then
Close;
end;
initialization
{$I UfrmToolWindow.lrs}
end.

View File

@ -1,61 +1,56 @@
object frmVirtualLayer: TfrmVirtualLayer inherited frmVirtualLayer: TfrmVirtualLayer
Left = 290 Left = 290
Height = 80 Height = 82
Top = 171 Top = 171
Width = 212 Width = 210
BorderIcons = [] Caption = 'Virtual Layer'
BorderStyle = bsToolWindow ClientHeight = 82
Caption = 'Virtual Layer' ClientWidth = 210
ClientHeight = 80 object tbZ: TTrackBar[0]
ClientWidth = 212 AnchorSideLeft.Control = Owner
Font.Height = -11 AnchorSideTop.Control = seZ
OnClose = FormClose AnchorSideTop.Side = asrBottom
OnDeactivate = FormDeactivate AnchorSideRight.Control = Owner
LCLVersion = '0.9.25' AnchorSideRight.Side = asrBottom
object tbZ: TTrackBar Left = 8
Left = 8 Height = 33
Height = 33 Top = 41
Top = 39 Width = 194
Width = 196 Frequency = 10
Frequency = 10 Max = 127
Max = 127 Min = -128
Min = -128 OnChange = tbZChange
OnChange = tbZChange PageSize = 1
PageSize = 1 Position = 0
ScalePos = trTop Anchors = [akTop, akLeft, akRight]
Align = alTop BorderSpacing.Around = 8
BorderSpacing.Around = 8 TabOrder = 0
TabOrder = 0 end
end object cbShowLayer: TCheckBox[1]
object Panel1: TPanel AnchorSideLeft.Control = Owner
Left = 8 AnchorSideTop.Control = seZ
Height = 23 AnchorSideTop.Side = asrCenter
Top = 8 Left = 8
Width = 196 Height = 19
Align = alTop Top = 11
BorderSpacing.Around = 8 Width = 106
BevelOuter = bvNone BorderSpacing.Left = 8
ClientHeight = 23 Caption = 'Show Layer at Z:'
ClientWidth = 196 TabOrder = 1
ParentFont = True end
TabOrder = 1 object seZ: TSpinEdit[2]
object seZ: TSpinEdit AnchorSideTop.Control = Owner
Left = 146 AnchorSideRight.Control = Owner
Height = 23 AnchorSideRight.Side = asrBottom
Width = 50 Left = 152
Align = alRight Height = 25
MaxValue = 127 Top = 8
MinValue = -128 Width = 50
ParentFont = True Anchors = [akTop, akRight]
TabOrder = 0 BorderSpacing.Top = 8
end BorderSpacing.Right = 8
object cbShowLayer: TCheckBox MaxValue = 127
Height = 23 MinValue = -128
Width = 146 TabOrder = 2
Align = alClient end
Caption = 'Show Layer at Z:' end
ParentFont = True
TabOrder = 1
end
end
end

View File

@ -1,93 +1,71 @@
(* (*
* CDDL HEADER START * CDDL HEADER START
* *
* The contents of this file are subject to the terms of the * The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only * Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance * (the "License"). You may not use this file except in compliance
* with the License. * with the License.
* *
* You can obtain a copy of the license at * You can obtain a copy of the license at
* http://www.opensource.org/licenses/cddl1.php. * http://www.opensource.org/licenses/cddl1.php.
* See the License for the specific language governing permissions * See the License for the specific language governing permissions
* and limitations under the License. * and limitations under the License.
* *
* When distributing Covered Code, include this CDDL HEADER in each * When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at * file and include the License file at
* http://www.opensource.org/licenses/cddl1.php. If applicable, * http://www.opensource.org/licenses/cddl1.php. If applicable,
* add the following below this CDDL HEADER, with the fields enclosed * add the following below this CDDL HEADER, with the fields enclosed
* by brackets "[]" replaced with your own identifying * information: * by brackets "[]" replaced with your own identifying * information:
* Portions Copyright [yyyy] [name of copyright owner] * Portions Copyright [yyyy] [name of copyright owner]
* *
* CDDL HEADER END * CDDL HEADER END
* *
* *
* Portions Copyright 2007 Andreas Schneider * Portions Copyright 2009 Andreas Schneider
*) *)
unit UfrmVirtualLayer; unit UfrmVirtualLayer;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, LCLIntf, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
LMessages, StdCtrls, Spin, ComCtrls, ExtCtrls; Spin, ComCtrls, ExtCtrls, UfrmToolWindow;
type type
{ TfrmVirtualLayer } { TfrmVirtualLayer }
TfrmVirtualLayer = class(TForm) TfrmVirtualLayer = class(TfrmToolWindow)
cbShowLayer: TCheckBox; cbShowLayer: TCheckBox;
Panel1: TPanel; seZ: TSpinEdit;
seZ: TSpinEdit; tbZ: TTrackBar;
tbZ: TTrackBar; procedure seZChange(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure tbZChange(Sender: TObject);
procedure FormDeactivate(Sender: TObject); public
procedure seZChange(Sender: TObject); { public declarations }
procedure tbZChange(Sender: TObject); end;
protected
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave; var
public frmVirtualLayer: TfrmVirtualLayer;
{ public declarations }
end; implementation
var { TfrmVirtualLayer }
frmVirtualLayer: TfrmVirtualLayer;
procedure TfrmVirtualLayer.seZChange(Sender: TObject);
implementation begin
tbZ.Position := seZ.Value;
{ TfrmVirtualLayer } end;
procedure TfrmVirtualLayer.FormClose(Sender: TObject; procedure TfrmVirtualLayer.tbZChange(Sender: TObject);
var CloseAction: TCloseAction); begin
begin seZ.Value := tbZ.Position;
CloseAction := caHide; end;
end;
initialization
procedure TfrmVirtualLayer.FormDeactivate(Sender: TObject); {$I UfrmVirtualLayer.lrs}
begin
Close; end.
end;
procedure TfrmVirtualLayer.seZChange(Sender: TObject);
begin
tbZ.Position := seZ.Value;
end;
procedure TfrmVirtualLayer.tbZChange(Sender: TObject);
begin
seZ.Value := tbZ.Position;
end;
procedure TfrmVirtualLayer.MouseLeave(var msg: TLMessage);
begin
if not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then
Close;
end;
initialization
{$I UfrmVirtualLayer.lrs}
end.

View File

@ -5,7 +5,7 @@ object frmMain: TfrmMain
Width = 766 Width = 766
ActiveControl = oglGameWindow ActiveControl = oglGameWindow
Caption = 'UO CentrED' Caption = 'UO CentrED'
ClientHeight = 580 ClientHeight = 583
ClientWidth = 766 ClientWidth = 766
Constraints.MinHeight = 603 Constraints.MinHeight = 603
Constraints.MinWidth = 766 Constraints.MinWidth = 766
@ -17,12 +17,12 @@ object frmMain: TfrmMain
OnDestroy = FormDestroy OnDestroy = FormDestroy
Position = poScreenCenter Position = poScreenCenter
ShowInTaskBar = stAlways ShowInTaskBar = stAlways
LCLVersion = '0.9.27' LCLVersion = '0.9.29'
WindowState = wsMaximized WindowState = wsMaximized
object pnlBottom: TPanel object pnlBottom: TPanel
Left = 0 Left = 0
Height = 31 Height = 31
Top = 549 Top = 552
Width = 766 Width = 766
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
@ -33,7 +33,7 @@ object frmMain: TfrmMain
Left = 11 Left = 11
Height = 14 Height = 14
Top = 7 Top = 7
Width = 11 Width = 10
Caption = 'X:' Caption = 'X:'
ParentColor = False ParentColor = False
end end
@ -41,7 +41,7 @@ object frmMain: TfrmMain
Left = 88 Left = 88
Height = 14 Height = 14
Top = 7 Top = 7
Width = 10 Width = 9
Caption = 'Y:' Caption = 'Y:'
ParentColor = False ParentColor = False
end end
@ -54,10 +54,10 @@ object frmMain: TfrmMain
ParentColor = False ParentColor = False
end end
object lblTip: TLabel object lblTip: TLabel
Left = 528 Left = 534
Height = 31 Height = 31
Top = 0 Top = 0
Width = 230 Width = 224
Align = alRight Align = alRight
Alignment = taRightJustify Alignment = taRightJustify
BorderSpacing.Right = 8 BorderSpacing.Right = 8
@ -66,10 +66,10 @@ object frmMain: TfrmMain
ParentColor = False ParentColor = False
end end
object lblTipC: TLabel object lblTipC: TLabel
Left = 498 Left = 511
Height = 31 Height = 31
Top = 0 Top = 0
Width = 30 Width = 23
Align = alRight Align = alRight
Caption = 'Tip: ' Caption = 'Tip: '
Font.Height = -11 Font.Height = -11
@ -80,7 +80,7 @@ object frmMain: TfrmMain
end end
object edX: TSpinEdit object edX: TSpinEdit
Left = 24 Left = 24
Height = 19 Height = 23
Top = 3 Top = 3
Width = 55 Width = 55
MaxValue = 100000 MaxValue = 100000
@ -88,7 +88,7 @@ object frmMain: TfrmMain
end end
object edY: TSpinEdit object edY: TSpinEdit
Left = 104 Left = 104
Height = 19 Height = 23
Top = 3 Top = 3
Width = 52 Width = 52
MaxValue = 100000 MaxValue = 100000
@ -107,7 +107,7 @@ object frmMain: TfrmMain
end end
object pcLeft: TPageControl object pcLeft: TPageControl
Left = 0 Left = 0
Height = 525 Height = 528
Top = 24 Top = 24
Width = 224 Width = 224
ActivePage = tsTiles ActivePage = tsTiles
@ -116,13 +116,13 @@ object frmMain: TfrmMain
TabOrder = 1 TabOrder = 1
object tsTiles: TTabSheet object tsTiles: TTabSheet
Caption = 'Tiles' Caption = 'Tiles'
ClientHeight = 492 ClientHeight = 502
ClientWidth = 218 ClientWidth = 216
object lblFilter: TLabel object lblFilter: TLabel
AnchorSideLeft.Control = cbTerrain AnchorSideLeft.Control = cbTerrain
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbTerrain AnchorSideTop.Control = cbTerrain
Left = 81 Left = 75
Height = 14 Height = 14
Top = 8 Top = 8
Width = 30 Width = 30
@ -139,9 +139,9 @@ object frmMain: TfrmMain
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = spTileList AnchorSideBottom.Control = spTileList
Left = 4 Left = 4
Height = 250 Height = 266
Top = 56 Top = 50
Width = 210 Width = 208
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Top = 4 BorderSpacing.Top = 4
@ -193,13 +193,13 @@ object frmMain: TfrmMain
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 0 Left = 0
Height = 181 Height = 181
Top = 311 Top = 321
Width = 218 Width = 216
Align = alBottom Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
Caption = 'Random pool' Caption = 'Random pool'
ClientHeight = 167 ClientHeight = 163
ClientWidth = 216 ClientWidth = 212
TabOrder = 1 TabOrder = 1
object btnAddRandom: TSpeedButton object btnAddRandom: TSpeedButton
AnchorSideLeft.Control = gbRandom AnchorSideLeft.Control = gbRandom
@ -359,10 +359,10 @@ object frmMain: TfrmMain
object btnRandomPresetSave: TSpeedButton object btnRandomPresetSave: TSpeedButton
AnchorSideTop.Control = cbRandomPreset AnchorSideTop.Control = cbRandomPreset
AnchorSideRight.Control = btnRandomPresetDelete AnchorSideRight.Control = btnRandomPresetDelete
Left = 164 Left = 160
Height = 22 Height = 22
Hint = 'Save Preset' Hint = 'Save Preset'
Top = 134 Top = 138
Width = 22 Width = 22
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Right = 4 BorderSpacing.Right = 4
@ -413,10 +413,10 @@ object frmMain: TfrmMain
AnchorSideTop.Control = btnRandomPresetSave AnchorSideTop.Control = btnRandomPresetSave
AnchorSideRight.Control = gbRandom AnchorSideRight.Control = gbRandom
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 190 Left = 186
Height = 22 Height = 22
Hint = 'Delete Preset' Hint = 'Delete Preset'
Top = 134 Top = 138
Width = 22 Width = 22
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Right = 4 BorderSpacing.Right = 4
@ -473,9 +473,9 @@ object frmMain: TfrmMain
AnchorSideBottom.Control = cbRandomPreset AnchorSideBottom.Control = cbRandomPreset
Cursor = 63 Cursor = 63
Left = 4 Left = 4
Height = 106 Height = 110
Top = 24 Top = 24
Width = 208 Width = 204
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Top = 2 BorderSpacing.Top = 2
@ -519,14 +519,14 @@ object frmMain: TfrmMain
AnchorSideBottom.Control = gbRandom AnchorSideBottom.Control = gbRandom
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 4 Left = 4
Height = 29 Height = 21
Top = 134 Top = 138
Width = 156 Width = 152
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Right = 4 BorderSpacing.Right = 4
BorderSpacing.Bottom = 4 BorderSpacing.Bottom = 4
ItemHeight = 0 ItemHeight = 13
OnChange = cbRandomPresetChange OnChange = cbRandomPresetChange
Style = csDropDownList Style = csDropDownList
TabOrder = 1 TabOrder = 1
@ -539,8 +539,8 @@ object frmMain: TfrmMain
Cursor = crVSplit Cursor = crVSplit
Left = 0 Left = 0
Height = 5 Height = 5
Top = 306 Top = 316
Width = 218 Width = 216
Align = alNone Align = alNone
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
ResizeAnchor = akBottom ResizeAnchor = akBottom
@ -550,10 +550,10 @@ object frmMain: TfrmMain
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = vdtTiles AnchorSideBottom.Control = vdtTiles
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 110 Left = 108
Height = 19 Height = 23
Hint = 'Append S or T to restrict the search to Statics or Terrain.' Hint = 'Append S or T to restrict the search to Statics or Terrain.'
Top = 279 Top = 285
Width = 96 Width = 96
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
BorderSpacing.Right = 8 BorderSpacing.Right = 8
@ -572,10 +572,10 @@ object frmMain: TfrmMain
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = tsTiles AnchorSideRight.Control = tsTiles
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 81 Left = 75
Height = 19 Height = 23
Top = 22 Top = 22
Width = 121 Width = 125
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Right = 16 BorderSpacing.Right = 16
OnEditingDone = edFilterEditingDone OnEditingDone = edFilterEditingDone
@ -586,10 +586,10 @@ object frmMain: TfrmMain
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = cbTerrain AnchorSideTop.Control = cbTerrain
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 4 Left = 5
Height = 22 Height = 19
Top = 30 Top = 27
Width = 60 Width = 53
Caption = 'Statics' Caption = 'Statics'
Checked = True Checked = True
OnChange = cbStaticsChange OnChange = cbStaticsChange
@ -600,9 +600,9 @@ object frmMain: TfrmMain
AnchorSideLeft.Control = tsTiles AnchorSideLeft.Control = tsTiles
AnchorSideTop.Control = tsTiles AnchorSideTop.Control = tsTiles
Left = 4 Left = 4
Height = 22 Height = 19
Top = 8 Top = 8
Width = 61 Width = 55
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Top = 8 BorderSpacing.Top = 8
Caption = 'Terrain' Caption = 'Terrain'
@ -614,26 +614,25 @@ object frmMain: TfrmMain
end end
object tsClients: TTabSheet object tsClients: TTabSheet
Caption = 'Clients' Caption = 'Clients'
ClientHeight = 492 ClientHeight = 502
ClientWidth = 218 ClientWidth = 216
object lbClients: TListBox object lbClients: TListBox
Left = 0 Left = 0
Height = 492 Height = 502
Top = 0 Top = 0
Width = 218 Width = 216
Align = alClient Align = alClient
ItemHeight = 0 ItemHeight = 0
OnDblClick = mnuGoToClientClick OnDblClick = mnuGoToClientClick
PopupMenu = pmClients PopupMenu = pmClients
Sorted = True Sorted = True
TabOrder = 0 TabOrder = 0
TopIndex = -1
end end
end end
object tsLocations: TTabSheet object tsLocations: TTabSheet
Caption = 'Locations' Caption = 'Locations'
ClientHeight = 492 ClientHeight = 502
ClientWidth = 218 ClientWidth = 216
object btnClearLocations: TSpeedButton object btnClearLocations: TSpeedButton
AnchorSideLeft.Control = btnDeleteLocation AnchorSideLeft.Control = btnDeleteLocation
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
@ -641,7 +640,7 @@ object frmMain: TfrmMain
Left = 128 Left = 128
Height = 22 Height = 22
Hint = 'Clear' Hint = 'Clear'
Top = 450 Top = 460
Width = 23 Width = 23
BorderSpacing.Left = 4 BorderSpacing.Left = 4
Color = clBtnFace Color = clBtnFace
@ -694,7 +693,7 @@ object frmMain: TfrmMain
Left = 101 Left = 101
Height = 22 Height = 22
Hint = 'Delete' Hint = 'Delete'
Top = 450 Top = 460
Width = 23 Width = 23
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 4 BorderSpacing.Bottom = 4
@ -746,7 +745,7 @@ object frmMain: TfrmMain
Left = 74 Left = 74
Height = 22 Height = 22
Hint = 'Add' Hint = 'Add'
Top = 450 Top = 460
Width = 23 Width = 23
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Right = 4 BorderSpacing.Right = 4
@ -800,9 +799,9 @@ object frmMain: TfrmMain
AnchorSideBottom.Control = btnDeleteLocation AnchorSideBottom.Control = btnDeleteLocation
Cursor = 63 Cursor = 63
Left = 4 Left = 4
Height = 428 Height = 438
Top = 18 Top = 18
Width = 210 Width = 208
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 4 BorderSpacing.Around = 4
BorderStyle = bsSingle BorderStyle = bsSingle
@ -817,7 +816,7 @@ object frmMain: TfrmMain
item item
Position = 1 Position = 1
Text = 'Name' Text = 'Name'
Width = 131 Width = 129
end> end>
Header.DefaultHeight = 17 Header.DefaultHeight = 17
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible] Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
@ -1012,7 +1011,7 @@ object frmMain: TfrmMain
AnchorSideBottom.Control = spChat AnchorSideBottom.Control = spChat
Left = 224 Left = 224
Height = 22 Height = 22
Top = 413 Top = 416
Width = 542 Width = 542
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BevelInner = bvRaised BevelInner = bvRaised
@ -1025,7 +1024,7 @@ object frmMain: TfrmMain
Left = 10 Left = 10
Height = 18 Height = 18
Top = 2 Top = 2
Width = 104 Width = 101
Align = alLeft Align = alLeft
BorderSpacing.Left = 8 BorderSpacing.Left = 8
Caption = 'Chat and Messages' Caption = 'Chat and Messages'
@ -1046,7 +1045,7 @@ object frmMain: TfrmMain
AnchorSideBottom.Control = pnlBottom AnchorSideBottom.Control = pnlBottom
Left = 224 Left = 224
Height = 109 Height = 109
Top = 440 Top = 443
Width = 542 Width = 542
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BevelOuter = bvNone BevelOuter = bvNone
@ -1057,7 +1056,7 @@ object frmMain: TfrmMain
object vstChat: TVirtualStringTree object vstChat: TVirtualStringTree
Cursor = 63 Cursor = 63
Left = 0 Left = 0
Height = 90 Height = 86
Top = 0 Top = 0
Width = 542 Width = 542
Align = alClient Align = alClient
@ -1095,8 +1094,8 @@ object frmMain: TfrmMain
end end
object edChat: TEdit object edChat: TEdit
Left = 0 Left = 0
Height = 19 Height = 23
Top = 90 Top = 86
Width = 542 Width = 542
Align = alBottom Align = alBottom
OnKeyPress = edChatKeyPress OnKeyPress = edChatKeyPress
@ -1111,7 +1110,7 @@ object frmMain: TfrmMain
Cursor = crVSplit Cursor = crVSplit
Left = 224 Left = 224
Height = 5 Height = 5
Top = 435 Top = 438
Width = 542 Width = 542
Align = alNone Align = alNone
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
@ -1128,7 +1127,7 @@ object frmMain: TfrmMain
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = pnlChatHeader AnchorSideBottom.Control = pnlChatHeader
Left = 224 Left = 224
Height = 389 Height = 392
Top = 24 Top = 24
Width = 542 Width = 542
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]

View File

@ -886,8 +886,6 @@ end;
procedure TfrmMain.acVirtualLayerExecute(Sender: TObject); procedure TfrmMain.acVirtualLayerExecute(Sender: TObject);
begin begin
frmVirtualLayer.Left := Mouse.CursorPos.x - 8;
frmVirtualLayer.Top := Mouse.CursorPos.y - 8;
frmVirtualLayer.Show; frmVirtualLayer.Show;
end; end;
@ -896,8 +894,6 @@ begin
acDraw.Checked := True; acDraw.Checked := True;
tbDrawTile.Down := True; tbDrawTile.Down := True;
mnuDraw.Checked := True; mnuDraw.Checked := True;
frmDrawSettings.Left := Mouse.CursorPos.x - 8;
frmDrawSettings.Top := Mouse.CursorPos.y - 8;
frmDrawSettings.ShowModal; frmDrawSettings.ShowModal;
ProcessToolState; ProcessToolState;
end; end;
@ -912,8 +908,6 @@ end;
procedure TfrmMain.acBoundariesExecute(Sender: TObject); procedure TfrmMain.acBoundariesExecute(Sender: TObject);
begin begin
frmBoundaries.Left := Mouse.CursorPos.x - 8;
frmBoundaries.Top := Mouse.CursorPos.y - 8;
frmBoundaries.Show; frmBoundaries.Show;
end; end;
@ -923,8 +917,6 @@ begin
tbElevateTile.Down := True; tbElevateTile.Down := True;
mnuElevate.Checked := True; mnuElevate.Checked := True;
ProcessToolState; ProcessToolState;
frmElevateSettings.Left := Mouse.CursorPos.x - 8;
frmElevateSettings.Top := Mouse.CursorPos.y - 8;
frmElevateSettings.Show; frmElevateSettings.Show;
end; end;
@ -951,8 +943,6 @@ begin
tbSetHue.Down := True; tbSetHue.Down := True;
mnuSetHue.Checked := True; mnuSetHue.Checked := True;
ProcessToolState; ProcessToolState;
frmHueSettings.Left := Mouse.CursorPos.x - 8;
frmHueSettings.Top := Mouse.CursorPos.y - 8;
frmHueSettings.Show; frmHueSettings.Show;
end; end;
@ -962,8 +952,6 @@ begin
tbMoveTile.Down := True; tbMoveTile.Down := True;
mnuMove.Checked := True; mnuMove.Checked := True;
ProcessToolState; ProcessToolState;
frmMoveSettings.Left := Mouse.CursorPos.x - 8;
frmMoveSettings.Top := Mouse.CursorPos.y - 8;
frmMoveSettings.Show; frmMoveSettings.Show;
end; end;
@ -2573,8 +2561,6 @@ function TfrmMain.ConfirmAction: Boolean;
begin begin
if acMove.Checked and frmMoveSettings.cbAsk.Checked then if acMove.Checked and frmMoveSettings.cbAsk.Checked then
begin begin
frmMoveSettings.Left := Mouse.CursorPos.x - 8;
frmMoveSettings.Top := Mouse.CursorPos.y - 8;
Result := frmMoveSettings.ShowModal = mrYes; Result := frmMoveSettings.ShowModal = mrYes;
end else end else
begin begin
@ -2582,6 +2568,7 @@ begin
frmConfirmation.Top := Mouse.CursorPos.y - frmConfirmation.btnYes.Top - frmConfirmation.btnYes.Height div 2; frmConfirmation.Top := Mouse.CursorPos.y - frmConfirmation.btnYes.Top - frmConfirmation.btnYes.Height div 2;
Result := frmConfirmation.ShowModal = mrYes; Result := frmConfirmation.ShowModal = mrYes;
end; end;
if not oglGameWindow.MouseEntered then if not oglGameWindow.MouseEntered then
oglGameWindowMouseLeave(nil); oglGameWindowMouseLeave(nil);
end; end;

View File

@ -1,64 +1,69 @@
object frmTileInfo: TfrmTileInfo object frmTileInfo: TfrmTileInfo
Left = 290 Left = 290
Height = 107 Height = 59
Top = 171 Top = 171
Width = 250 Width = 250
HorzScrollBar.Page = 249 HorzScrollBar.Page = 249
VertScrollBar.Page = 106 VertScrollBar.Page = 106
AutoSize = True AutoSize = True
BorderIcons = [] BorderIcons = []
BorderStyle = bsNone BorderStyle = bsNone
Caption = 'Tile info' Caption = 'Tile info'
ClientHeight = 107 ClientHeight = 59
ClientWidth = 250 ClientWidth = 250
Color = clInfoBk Color = clInfoBk
Constraints.MinWidth = 250 Constraints.MinWidth = 250
Font.Color = clInfoText Font.Color = clInfoText
FormStyle = fsStayOnTop FormStyle = fsStayOnTop
OnShow = FormShow OnShow = FormShow
object lblTileID: TLabel ShowInTaskBar = stNever
Left = 8 LCLVersion = '0.9.29'
Height = 17 object lblTileID: TLabel
Top = 27 Left = 8
Width = 234 Height = 16
Align = alTop Top = 26
BorderSpacing.Left = 8 Width = 234
BorderSpacing.Top = 2 Align = alTop
BorderSpacing.Right = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 8 BorderSpacing.Top = 2
Font.Color = clInfoText BorderSpacing.Right = 8
Font.Style = [fsItalic] BorderSpacing.Bottom = 8
ParentColor = False Font.Color = clInfoText
end Font.Style = [fsItalic]
object lblFlags: TLabel ParentColor = False
Left = 8 ParentFont = False
Height = 47 end
Top = 52 object lblFlags: TLabel
Width = 234 Left = 8
Align = alTop Height = 1
BorderSpacing.Around = 8 Top = 50
Font.Color = clInfoText Width = 234
ParentColor = False Align = alTop
WordWrap = True BorderSpacing.Around = 8
end Font.Color = clInfoText
object lblName: TLabel ParentColor = False
Left = 8 ParentFont = False
Height = 17 WordWrap = True
Top = 8 end
Width = 234 object lblName: TLabel
Align = alTop Left = 8
BorderSpacing.Left = 8 Height = 16
BorderSpacing.Top = 8 Top = 8
BorderSpacing.Right = 8 Width = 234
BorderSpacing.Bottom = 2 Align = alTop
Font.Style = [fsBold] BorderSpacing.Left = 8
ParentColor = False BorderSpacing.Top = 8
end BorderSpacing.Right = 8
object tmHide: TTimer BorderSpacing.Bottom = 2
Enabled = False Font.Style = [fsBold]
Interval = 5000 ParentColor = False
OnTimer = tmHideTimer ParentFont = False
left = 216 end
top = 8 object tmHide: TTimer
end Enabled = False
end Interval = 5000
OnTimer = tmHideTimer
left = 216
top = 8
end
end

View File

@ -1,186 +1,186 @@
(* (*
* CDDL HEADER START * CDDL HEADER START
* *
* The contents of this file are subject to the terms of the * The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only * Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance * (the "License"). You may not use this file except in compliance
* with the License. * with the License.
* *
* You can obtain a copy of the license at * You can obtain a copy of the license at
* http://www.opensource.org/licenses/cddl1.php. * http://www.opensource.org/licenses/cddl1.php.
* See the License for the specific language governing permissions * See the License for the specific language governing permissions
* and limitations under the License. * and limitations under the License.
* *
* When distributing Covered Code, include this CDDL HEADER in each * When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at * file and include the License file at
* http://www.opensource.org/licenses/cddl1.php. If applicable, * http://www.opensource.org/licenses/cddl1.php. If applicable,
* add the following below this CDDL HEADER, with the fields enclosed * add the following below this CDDL HEADER, with the fields enclosed
* by brackets "[]" replaced with your own identifying * information: * by brackets "[]" replaced with your own identifying * information:
* Portions Copyright [yyyy] [name of copyright owner] * Portions Copyright [yyyy] [name of copyright owner]
* *
* CDDL HEADER END * CDDL HEADER END
* *
* *
* Portions Copyright 2007 Andreas Schneider * Portions Copyright 2007 Andreas Schneider
*) *)
unit UfrmTileInfo; unit UfrmTileInfo;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
ExtCtrls, LCLIntf, LCLType, LMessages, strutils; ExtCtrls, LCLIntf, LCLType, LMessages, strutils;
type type
{ TfrmTileInfo } { TfrmTileInfo }
TfrmTileInfo = class(TForm) TfrmTileInfo = class(TForm)
lblName: TLabel; lblName: TLabel;
lblFlags: TLabel; lblFlags: TLabel;
lblTileID: TLabel; lblTileID: TLabel;
tmHide: TTimer; tmHide: TTimer;
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure tmHideTimer(Sender: TObject); procedure tmHideTimer(Sender: TObject);
private private
{ private declarations } { private declarations }
public public
procedure Update(ATileID: Word); procedure Update(ATileID: Word);
//procedure Show; overload; reintroduce; //procedure Show; overload; reintroduce;
procedure Show(ATileID: Word); overload; procedure Show(ATileID: Word); overload;
end; end;
var var
frmTileInfo: TfrmTileInfo; frmTileInfo: TfrmTileInfo;
implementation implementation
uses uses
UGameResources, UTiledata; UGameResources, UTiledata;
{ TfrmTileInfo } { TfrmTileInfo }
procedure TfrmTileInfo.tmHideTimer(Sender: TObject); procedure TfrmTileInfo.tmHideTimer(Sender: TObject);
begin begin
tmHide.Enabled := False; tmHide.Enabled := False;
Hide; Hide;
end; end;
procedure TfrmTileInfo.FormShow(Sender: TObject); procedure TfrmTileInfo.FormShow(Sender: TObject);
begin begin
tmHide.Enabled := True; tmHide.Enabled := True;
Left := Mouse.CursorPos.x + 8; Left := Mouse.CursorPos.x + 8;
Top := Mouse.CursorPos.y + 8; Top := Mouse.CursorPos.y + 8;
end; end;
procedure TfrmTileInfo.Update(ATileID: Word); procedure TfrmTileInfo.Update(ATileID: Word);
var var
tileData: TTiledata; tileData: TTiledata;
prefix, flags: string; prefix, flags: string;
procedure UpdateFlags(AFlag: LongWord; AName: string); procedure UpdateFlags(AFlag: LongWord; AName: string);
begin begin
if tileData.HasFlag(AFlag) then if tileData.HasFlag(AFlag) then
begin begin
if flags <> '' then if flags <> '' then
flags := flags + ', ' + AName flags := flags + ', ' + AName
else else
flags := AName; flags := AName;
end; end;
end; end;
begin begin
if Visible then if Visible then
begin begin
Left := Mouse.CursorPos.x + 8; Left := Mouse.CursorPos.x + 8;
Top := Mouse.CursorPos.y + 8; Top := Mouse.CursorPos.y + 8;
end; end;
flags := ''; flags := '';
if ATileID < $4000 then if ATileID < $4000 then
begin begin
tileData := ResMan.Tiledata.LandTiles[ATileID]; tileData := ResMan.Tiledata.LandTiles[ATileID];
if TLandTiledata(tileData).TextureID > 0 then if TLandTiledata(tileData).TextureID > 0 then
flags := 'Stretchable'; flags := 'Stretchable';
end else end else
begin begin
Dec(ATileID, $4000); Dec(ATileID, $4000);
tileData := ResMan.Tiledata.StaticTiles[ATileID]; tileData := ResMan.Tiledata.StaticTiles[ATileID];
end; end;
if tileData.HasFlag(tdfArticleA) then if tileData.HasFlag(tdfArticleA) then
prefix := 'a ' prefix := 'a '
else if tileData.HasFlag(tdfArticleAn) then else if tileData.HasFlag(tdfArticleAn) then
prefix := 'an ' prefix := 'an '
else else
prefix := ''; prefix := '';
lblName.Caption := AnsiProperCase(Format('%s%s', [prefix, tileData.TileName]), [' ']); lblName.Caption := AnsiProperCase(Format('%s%s', [prefix, tileData.TileName]), [' ']);
lblTileID.Caption := Format('Tile ID: $%x (%0:d)', [ATileID]); lblTileID.Caption := Format('Tile ID: $%x (%0:d)', [ATileID]);
UpdateFlags(tdfBackground, 'Background'); UpdateFlags(tdfBackground, 'Background');
UpdateFlags(tdfWeapon, 'Weapon'); UpdateFlags(tdfWeapon, 'Weapon');
UpdateFlags(tdfTransparent, 'Transparent'); UpdateFlags(tdfTransparent, 'Transparent');
UpdateFlags(tdfTranslucent, 'Translucent'); UpdateFlags(tdfTranslucent, 'Translucent');
UpdateFlags(tdfWall, 'Wall'); UpdateFlags(tdfWall, 'Wall');
UpdateFlags(tdfDamaging, 'Damaging'); UpdateFlags(tdfDamaging, 'Damaging');
UpdateFlags(tdfImpassable, 'Impassable'); UpdateFlags(tdfImpassable, 'Impassable');
UpdateFlags(tdfWet, 'Wet'); UpdateFlags(tdfWet, 'Wet');
UpdateFlags(tdfSurface, 'Surface'); UpdateFlags(tdfSurface, 'Surface');
UpdateFlags(tdfBridge, 'Bridge'); UpdateFlags(tdfBridge, 'Bridge');
UpdateFlags(tdfGeneric, 'Generic'); UpdateFlags(tdfGeneric, 'Generic');
UpdateFlags(tdfWindow, 'Window'); UpdateFlags(tdfWindow, 'Window');
UpdateFlags(tdfNoShoot, 'NoShoot'); UpdateFlags(tdfNoShoot, 'NoShoot');
UpdateFlags(tdfInternal, 'Internal'); UpdateFlags(tdfInternal, 'Internal');
UpdateFlags(tdfFoliage, 'Foliage'); UpdateFlags(tdfFoliage, 'Foliage');
UpdateFlags(tdfPartialHue, 'PartialHue'); UpdateFlags(tdfPartialHue, 'PartialHue');
UpdateFlags(tdfMap, 'Map'); UpdateFlags(tdfMap, 'Map');
UpdateFlags(tdfContainer, 'Container'); UpdateFlags(tdfContainer, 'Container');
UpdateFlags(tdfWearable, 'Wearable'); UpdateFlags(tdfWearable, 'Wearable');
UpdateFlags(tdfLightSource, 'Lightsource'); UpdateFlags(tdfLightSource, 'Lightsource');
UpdateFlags(tdfAnimation, 'Animation'); UpdateFlags(tdfAnimation, 'Animation');
UpdateFlags(tdfNoDiagonal, 'NoDiagonal'); UpdateFlags(tdfNoDiagonal, 'NoDiagonal');
UpdateFlags(tdfArmor, 'Armor'); UpdateFlags(tdfArmor, 'Armor');
UpdateFlags(tdfRoof, 'Roof'); UpdateFlags(tdfRoof, 'Roof');
UpdateFlags(tdfDoor, 'Door'); UpdateFlags(tdfDoor, 'Door');
UpdateFlags(tdfStairBack, 'StairBack'); UpdateFlags(tdfStairBack, 'StairBack');
UpdateFlags(tdfStairRight, 'StairRight'); UpdateFlags(tdfStairRight, 'StairRight');
lblFlags.Caption := Format('Flags = [%s]', [flags]); lblFlags.Caption := Format('Flags = [%s]', [flags]);
if tmHide.Enabled then if tmHide.Enabled then
begin begin
tmHide.Enabled := False; tmHide.Enabled := False;
tmHide.Enabled := True; //Refresh timer tmHide.Enabled := True; //Refresh timer
end; end;
end; end;
{procedure TfrmTileInfo.Show; {procedure TfrmTileInfo.Show;
begin begin
ShowWindow(Handle, SW_SHOWNOACTIVATE); ShowWindow(Handle, SW_SHOWNOACTIVATE);
Include(FormState, fsVisible); Include(FormState, fsVisible);
VisibleChanging; VisibleChanging;
try try
Perform(CM_VISIBLECHANGED, WParam(Ord(True)), 0); Perform(CM_VISIBLECHANGED, WParam(Ord(True)), 0);
AdjustSize; AdjustSize;
RequestAlign; RequestAlign;
finally finally
VisibleChanged; VisibleChanged;
end; end;
//FormShow(Self); //FormShow(Self);
end;} end;}
procedure TfrmTileInfo.Show(ATileID: Word); procedure TfrmTileInfo.Show(ATileID: Word);
begin begin
Update(ATileID); Update(ATileID);
Show; Show;
end; end;
initialization initialization
{$I UfrmTileInfo.lrs} {$I UfrmTileInfo.lrs}
end. end.