- Added flat-mode settings to toggle height display

This commit is contained in:
Andreas Schneider 2009-12-05 17:37:33 +01:00
parent be3f8c05df
commit 4280db3f7e
2 changed files with 25 additions and 5 deletions

View File

@ -961,14 +961,14 @@ object frmMain: TfrmMain
OnClick = tbStaticsClick
end
object tbSeparator5: TToolButton
Left = 403
Left = 415
Top = 2
Width = 17
Caption = 'tbSeparator5'
Style = tbsDivider
end
object tbRadarMap: TToolButton
Left = 420
Left = 432
Hint = 'Radar Map'
Top = 2
Caption = 'Radar Map'
@ -993,7 +993,8 @@ object frmMain: TfrmMain
Left = 380
Top = 2
Action = acFlat
Style = tbsCheck
DropdownMenu = pmFlatViewSettings
Style = tbsDropDown
end
object tbNoDraw: TToolButton
Left = 357
@ -2610,4 +2611,13 @@ object frmMain: TfrmMain
OnClick = mnuGrabHueClick
end
end
object pmFlatViewSettings: TPopupMenu
left = 368
top = 136
object mnuFlatShowHeight: TMenuItem
AutoCheck = True
Caption = 'Show Height'
OnClick = mnuFlatShowHeightClick
end
end
end

View File

@ -87,6 +87,7 @@ type
lblY: TLabel;
lbClients: TListBox;
MainMenu1: TMainMenu;
mnuFlatShowHeight: TMenuItem;
mnuGrabHue: TMenuItem;
mnuGrabTileID: TMenuItem;
mnuRegionControl: TMenuItem;
@ -124,6 +125,7 @@ type
pmClients: TPopupMenu;
pnlChat: TPanel;
pnlChatHeader: TPanel;
pmFlatViewSettings: TPopupMenu;
spChat: TSplitter;
spTileList: TSplitter;
tbFilter: TToolButton;
@ -198,6 +200,7 @@ type
procedure mnuAccountControlClick(Sender: TObject);
procedure mnuDisconnectClick(Sender: TObject);
procedure mnuExitClick(Sender: TObject);
procedure mnuFlatShowHeightClick(Sender: TObject);
procedure mnuFlushClick(Sender: TObject);
procedure mnuGoToClientClick(Sender: TObject);
procedure mnuGrabHueClick(Sender: TObject);
@ -398,6 +401,11 @@ begin
Close;
end;
procedure TfrmMain.mnuFlatShowHeightClick(Sender: TObject);
begin
RebuildScreenBuffer;
end;
procedure TfrmMain.mnuFlushClick(Sender: TObject);
begin
dmNetwork.Send(TFlushServerPacket.Create);
@ -1889,6 +1897,8 @@ begin
ABlockInfo^.HighRes := nil;
ABlockInfo^.CheckRealQuad := False;
ABlockInfo^.Text.Free;
if item is TMapCell then
begin
if not acFlat.Checked then
@ -1934,8 +1944,8 @@ begin
end;
end else
begin
ABlockInfo^.Text.Free;
ABlockInfo^.Text := TGLText.Create(FGLFont, IntToStr(item.Z));
if mnuFlatShowHeight.Checked then
ABlockInfo^.Text := TGLText.Create(FGLFont, IntToStr(item.Z));
end;
if not ABlockInfo^.CheckRealQuad then