summaryrefslogtreecommitdiff
path: root/indra/newview/llprogressview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llprogressview.cpp')
-rw-r--r--indra/newview/llprogressview.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 120b584cd9..9b5e38d0aa 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -68,15 +68,16 @@ const F32 TOTAL_LOGIN_TIME = 10.f; // seconds, wild guess at time from GL contex
S32 gLastStartAnimationFrame = 0; // human-style indexing, first image = 1
const S32 ANIMATION_FRAMES = 1; //13;
+static LLRegisterPanelClassWrapper<LLProgressView> r("progress_view");
+
+
// XUI: Translate
-LLProgressView::LLProgressView(const LLRect &rect)
+LLProgressView::LLProgressView()
: LLPanel(),
mPercentDone( 0.f ),
mMouseDownInActiveArea( false ),
mUpdateEvents("LLProgressView")
{
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_progress.xml");
- reshape(rect.getWidth(), rect.getHeight());
mUpdateEvents.listen("self", boost::bind(&LLProgressView::handleUpdate, this, _1));
}
@@ -92,6 +93,9 @@ BOOL LLProgressView::postBuild()
getChild<LLTextBox>("message_text")->setClickedCallback(onClickMessage, this);
+ // hidden initially, until we need it
+ LLPanel::setVisible(FALSE);
+
sInstance = this;
return TRUE;
}
@@ -126,19 +130,23 @@ BOOL LLProgressView::handleKeyHere(KEY key, MASK mask)
void LLProgressView::setVisible(BOOL visible)
{
+ // hiding progress view
if (getVisible() && !visible)
{
-
mFadeTimer.start();
+ // hiding progress view, so show menu bars
+ LLUI::getRootView()->getChildView("menu_bar_holder")->setVisible(TRUE);
}
+ // showing progress view
else if (!getVisible() && visible)
{
- gViewerWindow->addPopup(this);
-
+ // showing progress view, so hide menu bars
+ LLUI::getRootView()->getChildView("menu_bar_holder")->setVisible(FALSE);
+
setFocus(TRUE);
mFadeTimer.stop();
mProgressTimer.start();
- LLPanel::setVisible(visible);
+ LLPanel::setVisible(TRUE);
}
}
@@ -148,7 +156,7 @@ void LLProgressView::draw()
static LLTimer timer;
// Paint bitmap if we've got one
- glPushMatrix();
+ glPushMatrix();
if (gStartTexture)
{
LLGLSUIDefault gls_ui;
@@ -189,7 +197,7 @@ void LLProgressView::draw()
// Fade is complete, release focus
gFocusMgr.releaseFocusIfNeeded( this );
LLPanel::setVisible(FALSE);
- gViewerWindow->removePopup(this);
+ mFadeTimer.stop();
gStartTexture = NULL;
}