- Removed several unnecessary panels from frmMain (using Anchors instead)

This commit is contained in:
Andreas Schneider 2009-07-31 17:03:26 +02:00
parent dc1f425353
commit f3888db49c
4 changed files with 1086 additions and 1026 deletions

View File

@ -13,7 +13,7 @@ object frmFilter: TfrmFilter
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy OnDestroy = FormDestroy
OnShow = FormShow OnShow = FormShow
LCLVersion = '0.9.25' LCLVersion = '0.9.27'
object rgFilterType: TRadioGroup object rgFilterType: TRadioGroup
Left = 4 Left = 4
Height = 40 Height = 40
@ -31,15 +31,14 @@ object frmFilter: TfrmFilter
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2 ChildSizing.ControlsPerLine = 2
ClientHeight = 23 ClientHeight = 26
ClientWidth = 224 ClientWidth = 226
Columns = 2 Columns = 2
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'Exclusive' 'Exclusive'
'Inclusive' 'Inclusive'
) )
ParentFont = True
TabOrder = 0 TabOrder = 0
end end
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
@ -50,52 +49,52 @@ object frmFilter: TfrmFilter
Align = alClient Align = alClient
BorderSpacing.Around = 4 BorderSpacing.Around = 4
Caption = 'Tile filter' Caption = 'Tile filter'
ClientHeight = 242 ClientHeight = 245
ClientWidth = 224 ClientWidth = 226
ParentFont = True
TabOrder = 1 TabOrder = 1
object Label1: TLabel object Label1: TLabel
Left = 4 Left = 4
Height = 28 Height = 30
Top = 28 Top = 30
Width = 216 Width = 218
Align = alTop Align = alTop
BorderSpacing.Around = 4 BorderSpacing.Around = 4
Caption = 'Drag and Drop static tiles from the tile list on this list to add them to the filter.' Caption = 'Drag and Drop static tiles from the tile list on this list to add them to the filter.'
ParentColor = False ParentColor = False
ParentFont = True
WordWrap = True WordWrap = True
end end
object vdtFilter: TVirtualDrawTree object vdtFilter: TVirtualDrawTree
Tag = 1 Tag = 1
Cursor = 63 Cursor = 63
Left = 4 Left = 4
Height = 152 Height = 151
Top = 60 Top = 64
Width = 216 Width = 218
Align = alClient Align = alClient
BorderSpacing.Around = 4 BorderSpacing.Around = 4
BorderStyle = bsSingle BorderStyle = bsSingle
DefaultNodeHeight = 44 DefaultNodeHeight = 44
DragType = dtVCL DragType = dtVCL
Header.Options = [hoColumnResize, hoDrag, hoVisible] Header.AutoSizeIndex = 0
Header.ParentFont = True
Header.Style = hsFlatButtons
Header.Columns = < Header.Columns = <
item item
Position = 0
Text = 'ID' Text = 'ID'
end end
item item
Position = 1 Position = 1
Width = 44
Text = 'Tile' Text = 'Tile'
Width = 44
end end
item item
Position = 2 Position = 2
Width = 100
Text = 'Name' Text = 'Name'
Width = 100
end> end>
ParentFont = True Header.DefaultHeight = 17
Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
TabOrder = 0 TabOrder = 0
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages] TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect] TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect]
@ -106,19 +105,19 @@ object frmFilter: TfrmFilter
object pnlControls: TPanel object pnlControls: TPanel
Left = 4 Left = 4
Height = 22 Height = 22
Top = 216 Top = 219
Width = 216 Width = 218
Align = alBottom Align = alBottom
BorderSpacing.Around = 4 BorderSpacing.Around = 4
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 22 ClientHeight = 22
ClientWidth = 216 ClientWidth = 218
ParentFont = True
TabOrder = 1 TabOrder = 1
object btnDelete: TSpeedButton object btnDelete: TSpeedButton
Left = 84 Left = 84
Height = 22 Height = 22
Hint = 'Delete' Hint = 'Delete'
Top = 0
Width = 23 Width = 23
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -160,13 +159,13 @@ object frmFilter: TfrmFilter
NumGlyphs = 0 NumGlyphs = 0
OnClick = btnDeleteClick OnClick = btnDeleteClick
ShowHint = True ShowHint = True
ParentFont = True
ParentShowHint = False ParentShowHint = False
end end
object btnClear: TSpeedButton object btnClear: TSpeedButton
Left = 108 Left = 108
Height = 22 Height = 22
Hint = 'Clear' Hint = 'Clear'
Top = 0
Width = 23 Width = 23
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -208,20 +207,18 @@ object frmFilter: TfrmFilter
NumGlyphs = 0 NumGlyphs = 0
OnClick = btnClearClick OnClick = btnClearClick
ShowHint = True ShowHint = True
ParentFont = True
ParentShowHint = False ParentShowHint = False
end end
end end
object cbTileFilter: TCheckBox object cbTileFilter: TCheckBox
Left = 4 Left = 4
Height = 20 Height = 22
Top = 4 Top = 4
Width = 216 Width = 218
Align = alTop Align = alTop
BorderSpacing.Around = 4 BorderSpacing.Around = 4
Caption = 'Filter active' Caption = 'Filter active'
Checked = True Checked = True
ParentFont = True
State = cbChecked State = cbChecked
TabOrder = 2 TabOrder = 2
end end
@ -234,49 +231,48 @@ object frmFilter: TfrmFilter
Align = alBottom Align = alBottom
BorderSpacing.Around = 4 BorderSpacing.Around = 4
Caption = 'Hue filter' Caption = 'Hue filter'
ClientHeight = 151 ClientHeight = 154
ClientWidth = 224 ClientWidth = 226
ParentFont = True
TabOrder = 2 TabOrder = 2
object cbHueFilter: TCheckBox object cbHueFilter: TCheckBox
Left = 4 Left = 4
Height = 20 Height = 22
Top = 4 Top = 4
Width = 216 Width = 218
Align = alTop Align = alTop
BorderSpacing.Around = 4 BorderSpacing.Around = 4
Caption = 'Filter active' Caption = 'Filter active'
ParentFont = True
TabOrder = 0 TabOrder = 0
end end
object vdtHues: TVirtualDrawTree object vdtHues: TVirtualDrawTree
Cursor = 63 Cursor = 63
Left = 4 Left = 4
Height = 119 Height = 120
Top = 28 Top = 30
Width = 216 Width = 218
Align = alClient Align = alClient
BorderSpacing.Around = 4 BorderSpacing.Around = 4
BorderStyle = bsSingle BorderStyle = bsSingle
Header.AutoSizeIndex = 2 Header.AutoSizeIndex = 2
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
Header.Columns = < Header.Columns = <
item item
Position = 0
Width = 20 Width = 20
end end
item item
Position = 1 Position = 1
Width = 38
Text = 'Hue' Text = 'Hue'
Width = 38
end end
item item
Position = 2 Position = 2
Width = 158
Text = 'Name' Text = 'Name'
Width = 158
end> end>
ParentFont = True Header.DefaultHeight = 17
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsFlatButtons
PopupMenu = pmHues PopupMenu = pmHues
TabOrder = 1 TabOrder = 1
TreeOptions.MiscOptions = [toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning] TreeOptions.MiscOptions = [toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
@ -288,6 +284,7 @@ object frmFilter: TfrmFilter
end end
object Splitter1: TSplitter object Splitter1: TSplitter
Cursor = crVSplit Cursor = crVSplit
Left = 0
Height = 5 Height = 5
Top = 311 Top = 311
Width = 236 Width = 236

View File

@ -111,8 +111,9 @@ procedure TfrmFilter.FormShow(Sender: TObject);
var var
upperLeft, lowerLeft: TPoint; upperLeft, lowerLeft: TPoint;
begin begin
upperLeft := frmMain.pnlMain.ClientToScreen(Point(0, 0)); upperLeft := frmMain.pcLeft.ClientToScreen(Point(frmMain.pcLeft.Width, 0));
lowerLeft := frmMain.pnlMain.ClientToScreen(Point(0, frmMain.pnlMain.Height)); lowerLeft := frmMain.pcLeft.ClientToScreen(Point(frmMain.pcLeft.Width,
frmMain.pcLeft.Height));
Left := upperLeft.x; Left := upperLeft.x;
Top := upperLeft.y; Top := upperLeft.y;
Height := lowerLeft.y - upperLeft.y; Height := lowerLeft.y - upperLeft.y;

File diff suppressed because it is too large Load Diff

View File

@ -60,30 +60,35 @@ type
ActionList1: TActionList; ActionList1: TActionList;
ApplicationProperties1: TApplicationProperties; ApplicationProperties1: TApplicationProperties;
btnAddLocation: TSpeedButton; btnAddLocation: TSpeedButton;
btnAddRandom: TSpeedButton;
btnClearLocations: TSpeedButton; btnClearLocations: TSpeedButton;
btnClearRandom: TSpeedButton;
btnDeleteLocation: TSpeedButton; btnDeleteLocation: TSpeedButton;
btnDeleteRandom: TSpeedButton;
btnGoTo: TButton; btnGoTo: TButton;
btnRandomPresetDelete: TSpeedButton;
btnRandomPresetSave: TSpeedButton;
cbRandomPreset: TComboBox; cbRandomPreset: TComboBox;
cbTerrain: TCheckBox;
cbStatics: TCheckBox; cbStatics: TCheckBox;
edFilter: TEdit; cbTerrain: TCheckBox;
edChat: TEdit; edChat: TEdit;
edFilter: TEdit;
edSearchID: TEdit; edSearchID: TEdit;
gbRandom: TGroupBox; gbRandom: TGroupBox;
ImageList1: TImageList; ImageList1: TImageList;
lblChatHeaderCaption: TLabel; lblChatHeaderCaption: TLabel;
lblFilter: TLabel;
lblTipC: TLabel; lblTipC: TLabel;
lblTip: TLabel; lblTip: TLabel;
lblTileInfo: TLabel; lblTileInfo: TLabel;
lblFilter: TLabel;
lblX: TLabel; lblX: TLabel;
lblY: TLabel; lblY: TLabel;
lbClients: TListBox; lbClients: TListBox;
MainMenu1: TMainMenu; MainMenu1: TMainMenu;
mnuGrabHue: TMenuItem;
mnuGrabTileID: TMenuItem;
mnuRegionControl: TMenuItem; mnuRegionControl: TMenuItem;
mnuVirtualLayer: TMenuItem; mnuVirtualLayer: TMenuItem;
mnuGrabTileID: TMenuItem;
mnuGrabHue: TMenuItem;
mnuLargeScaleCommands: TMenuItem; mnuLargeScaleCommands: TMenuItem;
mnuSetHue: TMenuItem; mnuSetHue: TMenuItem;
mnuGoToClient: TMenuItem; mnuGoToClient: TMenuItem;
@ -107,27 +112,17 @@ type
mnuDisconnect: TMenuItem; mnuDisconnect: TMenuItem;
mnuCentrED: TMenuItem; mnuCentrED: TMenuItem;
oglGameWindow: TOpenGLControl; oglGameWindow: TOpenGLControl;
pnlRandomPreset: TPanel;
pnlLocationControls: TPanel;
pnlChat: TPanel;
pnlChatHeader: TPanel;
pnlMain: TPanel;
pnlRandomControl: TPanel;
pnlTileListSettings: TPanel;
pcLeft: TPageControl; pcLeft: TPageControl;
pmGrabTileInfo: TPopupMenu;
pnlBottom: TPanel; pnlBottom: TPanel;
edX: TSpinEdit; edX: TSpinEdit;
edY: TSpinEdit; edY: TSpinEdit;
pmTileList: TPopupMenu; pmTileList: TPopupMenu;
btnAddRandom: TSpeedButton;
btnDeleteRandom: TSpeedButton;
btnClearRandom: TSpeedButton;
pmTools: TPopupMenu; pmTools: TPopupMenu;
pmClients: TPopupMenu; pmClients: TPopupMenu;
pmGrabTileInfo: TPopupMenu; pnlChat: TPanel;
pnlChatHeader: TPanel;
spChat: TSplitter; spChat: TSplitter;
btnRandomPresetSave: TSpeedButton;
btnRandomPresetDelete: TSpeedButton;
spTileList: TSplitter; spTileList: TSplitter;
tbFilter: TToolButton; tbFilter: TToolButton;
tbFlat: TToolButton; tbFlat: TToolButton;
@ -157,8 +152,8 @@ type
tsTiles: TTabSheet; tsTiles: TTabSheet;
vdtTiles: TVirtualDrawTree; vdtTiles: TVirtualDrawTree;
vdtRandom: TVirtualDrawTree; vdtRandom: TVirtualDrawTree;
vstLocations: TVirtualStringTree;
vstChat: TVirtualStringTree; vstChat: TVirtualStringTree;
vstLocations: TVirtualStringTree;
procedure acBoundariesExecute(Sender: TObject); procedure acBoundariesExecute(Sender: TObject);
procedure acDeleteExecute(Sender: TObject); procedure acDeleteExecute(Sender: TObject);
procedure acDrawExecute(Sender: TObject); procedure acDrawExecute(Sender: TObject);
@ -739,6 +734,7 @@ begin
Randomize; Randomize;
vstChat.NodeDataSize := SizeOf(TChatInfo); vstChat.NodeDataSize := SizeOf(TChatInfo);
pnlChatHeader.AnchorSide[akBottom].Control := pnlBottom;
FLocationsFile := IncludeTrailingPathDelimiter(ExtractFilePath( FLocationsFile := IncludeTrailingPathDelimiter(ExtractFilePath(
Application.ExeName)) + 'Locations.dat'; Application.ExeName)) + 'Locations.dat';
@ -1113,12 +1109,13 @@ begin
begin begin
pnlChat.Visible := False; pnlChat.Visible := False;
spChat.Visible := False; spChat.Visible := False;
pnlChatHeader.AnchorSide[akBottom].Control := pnlBottom;
end else end else
begin begin
spChat.Visible := True; spChat.Visible := True;
pnlChat.Visible := True; pnlChat.Visible := True;
spChat.Top := pnlChatHeader.Top + pnlChatHeader.Height; spChat.Top := pnlChat.Top - spChat.Height;
pnlChat.Top := spChat.Top + spChat.Height; pnlChatHeader.AnchorSide[akBottom].Control := spChat;
lblChatHeaderCaption.Font.Bold := False; lblChatHeaderCaption.Font.Bold := False;
lblChatHeaderCaption.Font.Italic := False; lblChatHeaderCaption.Font.Italic := False;
@ -1368,8 +1365,6 @@ procedure TfrmMain.vdtTilesKeyPress(Sender: TObject; var Key: char);
begin begin
if Key in ['$', '0'..'9'] then if Key in ['$', '0'..'9'] then
begin begin
edSearchID.Top := vdtTiles.Top + vdtTiles.Height - edSearchID.Height - 4;
edSearchID.Left := vdtTiles.Left + vdtTiles.Width - edSearchID.Width - 4;
edSearchID.Text := Key; edSearchID.Text := Key;
edSearchID.Visible := True; edSearchID.Visible := True;
edSearchID.SetFocus; edSearchID.SetFocus;