summaryrefslogtreecommitdiff
path: root/indra/newview/lldebugview.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
commit9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch)
tree4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/lldebugview.cpp
parent351ebe9fcb76f3b99c2957004bb8493a904869ee (diff)
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/lldebugview.cpp')
-rw-r--r--indra/newview/lldebugview.cpp63
1 files changed, 29 insertions, 34 deletions
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 40f5202067..bd5b9c30a2 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -35,16 +35,16 @@
#include "lldebugview.h"
// library includes
-#include "llframestatview.h"
#include "llfasttimerview.h"
#include "llmemoryview.h"
#include "llconsole.h"
#include "lltextureview.h"
#include "llresmgr.h"
#include "imageids.h"
-#include "llvelocitybar.h"
+#include "llviewercontrol.h"
#include "llviewerwindow.h"
-#include "llfloaterstats.h"
+#include "llappviewer.h"
+#include "llmemoryview.h"
//
// Globals
@@ -56,57 +56,52 @@ LLDebugView* gDebugView = NULL;
// Methods
//
-LLDebugView::LLDebugView(const std::string& name, const LLRect &rect)
-: LLView(name, rect, FALSE)
+LLDebugView::LLDebugView(const LLDebugView::Params& p)
+: LLView(p)
{
LLRect r;
+ LLRect rect(p.rect);
r.set(10, rect.getHeight() - 100, rect.getWidth()/2, 100);
- mDebugConsolep = new LLConsole("debug console", 20, r, -1, 0.f );
- mDebugConsolep->setFollowsBottom();
- mDebugConsolep->setFollowsLeft();
- mDebugConsolep->setVisible( FALSE );
+ LLConsole::Params cp;
+ cp.name("debug console");
+ cp.max_lines(20);
+ cp.rect(r);
+ cp.font(LLFontGL::getFontMonospace());
+ cp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_LEFT);
+ cp.visible(false);
+ mDebugConsolep = LLUICtrlFactory::create<LLConsole>(cp);
addChild(mDebugConsolep);
r.set(150 - 25, rect.getHeight() - 50, rect.getWidth()/2 - 25, rect.getHeight() - 450);
- mFrameStatView = new LLFrameStatView("frame stat", r);
- mFrameStatView->setFollowsTop();
- mFrameStatView->setFollowsLeft();
- mFrameStatView->setVisible(FALSE); // start invisible
- addChild(mFrameStatView);
r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.75f),
(S32) (gViewerWindow->getVirtualWindowRect().getHeight() * 0.75f));
- mFastTimerView = new LLFastTimerView("fast timers", r);
+ mFastTimerView = new LLFastTimerView(r);
mFastTimerView->setFollowsTop();
mFastTimerView->setFollowsLeft();
mFastTimerView->setVisible(FALSE); // start invisible
addChild(mFastTimerView);
- r.set(25, rect.getHeight() - 50, rect.getWidth()/2, rect.getHeight() - 450);
- mMemoryView = new LLMemoryView("memory", r);
- mMemoryView->setFollowsTop();
- mMemoryView->setFollowsLeft();
- mMemoryView->setVisible(FALSE); // start invisible
+ r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.75f),
+ (S32) (gViewerWindow->getVirtualWindowRect().getHeight() * 0.75f));
+ LLMemoryView::Params mp;
+ mp.name("memory");
+ mp.rect(r);
+ mp.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
+ mp.visible(false);
+ mMemoryView = LLUICtrlFactory::create<LLMemoryView>(mp);
addChild(mMemoryView);
r.set(150, rect.getHeight() - 50, 820, 100);
- gTextureView = new LLTextureView("gTextureView", r);
- gTextureView->setRect(r);
- gTextureView->setFollowsBottom();
- gTextureView->setFollowsLeft();
+ LLTextureView::Params tvp;
+ tvp.name("gTextureView");
+ tvp.rect(r);
+ tvp.follows.flags(FOLLOWS_BOTTOM|FOLLOWS_LEFT);
+ tvp.visible(false);
+ gTextureView = LLUICtrlFactory::create<LLTextureView>(tvp);
addChild(gTextureView);
//gTextureView->reshape(r.getWidth(), r.getHeight(), TRUE);
-
- const S32 VELOCITY_LEFT = 10; // 370;
- const S32 VELOCITY_WIDTH = 500;
- const S32 VELOCITY_TOP = 140;
- const S32 VELOCITY_HEIGHT = 45;
- r.setLeftTopAndSize( VELOCITY_LEFT, VELOCITY_TOP, VELOCITY_WIDTH, VELOCITY_HEIGHT );
- gVelocityBar = new LLVelocityBar("Velocity Bar", r);
- gVelocityBar->setFollowsBottom();
- gVelocityBar->setFollowsLeft();
- addChild(gVelocityBar);
}