diff options
| author | Erik Kundiman <erik@megapahit.org> | 2024-07-06 08:09:31 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2024-07-06 08:09:31 +0800 |
| commit | 57f91acf044a3cf2c8a0175aab10fbb7b1e90a7f (patch) | |
| tree | 805c3e55d83094fa2010ee66bcd2b6a204736f42 /indra/newview/llstatusbar.cpp | |
| parent | 29d68ecb229ecb19e6d0da4cf5fbd8e3bbdde2cf (diff) | |
| parent | 8662083cf4130922732aa8fba655310664b80d8b (diff) | |
Merge branch 'main' into maint-b
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
| -rw-r--r-- | indra/newview/llstatusbar.cpp | 13 |
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))); |
