summaryrefslogtreecommitdiff
path: root/indra/llui/llpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llpanel.cpp')
-rw-r--r--indra/llui/llpanel.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index c81be6086a..26136e0a23 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -91,8 +91,8 @@ LLPanel::Params::Params()
LLPanel::LLPanel(const LLPanel::Params& p)
: LLUICtrl(p),
- mBgColorAlpha(p.bg_alpha_color().get()),
- mBgColorOpaque(p.bg_opaque_color().get()),
+ mBgColorAlpha(p.bg_alpha_color()),
+ mBgColorOpaque(p.bg_opaque_color()),
mBgVisible(p.background_visible),
mBgOpaque(p.background_opaque),
mDefaultBtn(NULL),
@@ -100,7 +100,7 @@ LLPanel::LLPanel(const LLPanel::Params& p)
mLabel(p.label),
mCommitCallbackRegistrar(false),
mEnableCallbackRegistrar(false),
- mXMLFilename("")
+ mXMLFilename(p.filename)
{
setIsChrome(FALSE);
@@ -171,6 +171,8 @@ void LLPanel::setCtrlsEnabled( BOOL b )
void LLPanel::draw()
{
+ F32 alpha = getDrawContext().mAlpha;
+
// draw background
if( mBgVisible )
{
@@ -182,11 +184,11 @@ void LLPanel::draw()
if (mBgOpaque )
{
- gl_rect_2d( left, top, right, bottom, mBgColorOpaque );
+ gl_rect_2d( left, top, right, bottom, mBgColorOpaque.get() % alpha);
}
else
{
- gl_rect_2d( left, top, right, bottom, mBgColorAlpha );
+ gl_rect_2d( left, top, right, bottom, mBgColorAlpha.get() % alpha);
}
}
@@ -195,12 +197,6 @@ void LLPanel::draw()
LLView::draw();
}
-/*virtual*/
-void LLPanel::setAlpha(F32 alpha)
-{
- mBgColorOpaque.setAlpha(alpha);
-}
-
void LLPanel::updateDefaultBtn()
{
if( mDefaultBtn)
@@ -403,6 +399,8 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
setVisible(p.visible);
setEnabled(p.enabled);
+ setSoundFlags(p.sound_flags);
+
// control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible
LLUICtrl::initFromParams(p);
@@ -709,14 +707,6 @@ void LLPanel::childSetColor(const std::string& id, const LLColor4& color)
child->setColor(color);
}
}
-void LLPanel::childSetAlpha(const std::string& id, F32 alpha)
-{
- LLUICtrl* child = getChild<LLUICtrl>(id, true);
- if (child)
- {
- child->setAlpha(alpha);
- }
-}
LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string& id) const
{