summaryrefslogtreecommitdiff
path: root/indra/newview/lldebugview.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-05-08 07:43:08 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-05-08 07:43:08 +0000
commita4000c3744e42fcbb638e742f3b63fa31a0dee15 (patch)
tree7f472c30e65bbfa04ee9bc06631a1af305cc31fb /indra/newview/lldebugview.cpp
parent6c4cadbb04d633ad7b762058bdeba6e1f650dafd (diff)
merge trunk@116587 skinning-7@119389 -> viewer-2.0.0-skinning-7
Diffstat (limited to 'indra/newview/lldebugview.cpp')
-rw-r--r--indra/newview/lldebugview.cpp58
1 files changed, 25 insertions, 33 deletions
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 40f5202067..2af29260f4 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -35,16 +35,14 @@
#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"
//
// Globals
@@ -56,57 +54,51 @@ 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
+ 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);
}