Fix getChild calls during draw in LLProgressView
parent
5a3a6c6914
commit
316d815e7b
|
|
@ -81,6 +81,11 @@ bool LLProgressView::postBuild()
|
|||
{
|
||||
mProgressBar = getChild<LLProgressBar>("login_progress_bar");
|
||||
|
||||
mLogosLabel = getChild<LLTextBox>("logos_lbl");
|
||||
|
||||
mProgressText = getChild<LLTextBox>("progress_text");
|
||||
mMessageText = getChild<LLTextBox>("message_text");
|
||||
|
||||
// media control that is used to play intro video
|
||||
mMediaCtrl = getChild<LLMediaCtrl>("login_media_panel");
|
||||
mMediaCtrl->setVisible( false ); // hidden initially
|
||||
|
|
@ -238,9 +243,8 @@ void LLProgressView::drawLogos(F32 alpha)
|
|||
|
||||
// logos are tied to label,
|
||||
// due to potential resizes we have to figure offsets out on draw or resize
|
||||
LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl");
|
||||
S32 offset_x, offset_y;
|
||||
logos_label->localPointToScreen(0, 0, &offset_x, &offset_y);
|
||||
mLogosLabel->localPointToScreen(0, 0, &offset_x, &offset_y);
|
||||
std::vector<TextureData>::const_iterator iter = mLogosList.begin();
|
||||
std::vector<TextureData>::const_iterator end = mLogosList.end();
|
||||
for (; iter != end; iter++)
|
||||
|
|
@ -325,7 +329,7 @@ void LLProgressView::draw()
|
|||
|
||||
void LLProgressView::setText(const std::string& text)
|
||||
{
|
||||
getChild<LLUICtrl>("progress_text")->setValue(text);
|
||||
mProgressText->setValue(text);
|
||||
}
|
||||
|
||||
void LLProgressView::setPercent(const F32 percent)
|
||||
|
|
@ -336,7 +340,7 @@ void LLProgressView::setPercent(const F32 percent)
|
|||
void LLProgressView::setMessage(const std::string& msg)
|
||||
{
|
||||
mMessage = msg;
|
||||
getChild<LLUICtrl>("message_text")->setValue(mMessage);
|
||||
mMessageText->setValue(mMessage);
|
||||
}
|
||||
|
||||
void LLProgressView::loadLogo(const std::string &path,
|
||||
|
|
@ -387,8 +391,7 @@ void LLProgressView::initLogos()
|
|||
S32 icon_width, icon_height;
|
||||
|
||||
// We don't know final screen rect yet, so we can't precalculate position fully
|
||||
LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl");
|
||||
S32 texture_start_x = (S32)logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad;
|
||||
S32 texture_start_x = (S32)mLogosLabel->getFont()->getWidthF32(mLogosLabel->getText()) + default_pad;
|
||||
S32 texture_start_y = -7;
|
||||
|
||||
// Normally we would just preload these textures from textures.xml,
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ class LLImageRaw;
|
|||
class LLButton;
|
||||
class LLProgressBar;
|
||||
class LLViewerTexture;
|
||||
class LLTextBox;
|
||||
|
||||
class LLProgressView :
|
||||
public LLPanel,
|
||||
|
|
@ -85,6 +86,9 @@ public:
|
|||
protected:
|
||||
LLProgressBar* mProgressBar;
|
||||
LLMediaCtrl* mMediaCtrl;
|
||||
LLTextBox* mLogosLabel = nullptr;
|
||||
LLTextBox* mProgressText = nullptr;
|
||||
LLTextBox* mMessageText = nullptr;
|
||||
F32 mPercentDone;
|
||||
std::string mMessage;
|
||||
LLButton* mCancelBtn;
|
||||
|
|
|
|||
Loading…
Reference in New Issue