summaryrefslogtreecommitdiff
path: root/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r--indra/newview/llstatusbar.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index a0a625c5fc..eecf9c60b6 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -166,7 +166,9 @@ BOOL LLStatusBar::postBuild()
gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3));
mTextTime = getChild<LLTextBox>("TimeText" );
- mTextFps = getChild<LLTextBox>("FpsText");
+
+ mTextFps = getChild<LLButton>("FpsText");
+ mTextFps->setClickedCallback( &LLStatusBar::onClickFps, this );
getChild<LLUICtrl>("buyL")->setCommitCallback(
boost::bind(&LLStatusBar::onClickBuyCurrency, this));
@@ -306,7 +308,8 @@ void LLStatusBar::refresh()
S32 fps = (S32) llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, 50));
std::string fpsStr = std::to_string(fps);
- mTextFps->setText(fpsStr);
+ //mTextFps->setText(fpsStr);
+ mTextFps->setLabel(fpsStr);
}
// update clock every 10 seconds
@@ -649,6 +652,12 @@ void LLStatusBar::onClickMediaToggle(void* data)
LLViewerMedia::getInstance()->setAllMediaPaused(pause);
}
+//static
+void LLStatusBar::onClickFps(void* data)
+{
+ LLFloaterReg::toggleInstance("mpv_performance");
+}
+
BOOL can_afford_transaction(S32 cost)
{
return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost)));