aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llpanel.cpp
diff options
context:
space:
mode:
authorArmin Weatherwax2010-06-14 12:04:49 +0200
committerArmin Weatherwax2010-09-23 15:38:25 +0200
commit35df5441d3e2789663532c948731aff3a1e04728 (patch)
treeac7674289784a5f96106ea507637055a8dada78a /linden/indra/llui/llpanel.cpp
parentChanged version to Experimental 2010.09.18 (diff)
downloadmeta-impy-35df5441d3e2789663532c948731aff3a1e04728.zip
meta-impy-35df5441d3e2789663532c948731aff3a1e04728.tar.gz
meta-impy-35df5441d3e2789663532c948731aff3a1e04728.tar.bz2
meta-impy-35df5441d3e2789663532c948731aff3a1e04728.tar.xz
llmediaplugins first step
Diffstat (limited to 'linden/indra/llui/llpanel.cpp')
-rw-r--r--linden/indra/llui/llpanel.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp
index 709342b..26137d7 100644
--- a/linden/indra/llui/llpanel.cpp
+++ b/linden/indra/llui/llpanel.cpp
@@ -203,6 +203,12 @@ void LLPanel::draw()
203 LLView::draw(); 203 LLView::draw();
204} 204}
205 205
206/*virtual*/
207void LLPanel::setAlpha(F32 alpha)
208{
209 mBgColorOpaque.setAlpha(alpha);
210}
211
206void LLPanel::updateDefaultBtn() 212void LLPanel::updateDefaultBtn()
207{ 213{
208 // This method does not call LLView::draw() so callers will need 214 // This method does not call LLView::draw() so callers will need
@@ -213,8 +219,7 @@ void LLPanel::updateDefaultBtn()
213 { 219 {
214 if (gFocusMgr.childHasKeyboardFocus( this ) && mDefaultBtn->getEnabled()) 220 if (gFocusMgr.childHasKeyboardFocus( this ) && mDefaultBtn->getEnabled())
215 { 221 {
216 LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus(); 222 LLButton* buttonp = dynamic_cast<LLButton*>(gFocusMgr.getKeyboardFocus());
217 LLButton* buttonp = dynamic_cast<LLButton*>(focus_ctrl);
218 BOOL focus_is_child_button = buttonp && buttonp->getCommitOnReturn(); 223 BOOL focus_is_child_button = buttonp && buttonp->getCommitOnReturn();
219 // only enable default button when current focus is not a return-capturing button 224 // only enable default button when current focus is not a return-capturing button
220 mDefaultBtn->setBorderEnabled(!focus_is_child_button); 225 mDefaultBtn->setBorderEnabled(!focus_is_child_button);
@@ -276,7 +281,7 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask )
276{ 281{
277 BOOL handled = FALSE; 282 BOOL handled = FALSE;
278 283
279 LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus(); 284 LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
280 285
281 // handle user hitting ESC to defocus 286 // handle user hitting ESC to defocus
282 if (key == KEY_ESCAPE) 287 if (key == KEY_ESCAPE)
@@ -800,6 +805,14 @@ void LLPanel::childSetColor(const std::string& id, const LLColor4& color)
800 child->setColor(color); 805 child->setColor(color);
801 } 806 }
802} 807}
808void LLPanel::childSetAlpha(const std::string& id, F32 alpha)
809{
810 LLUICtrl* child = getChild<LLUICtrl>(id, true);
811 if (child)
812 {
813 child->setAlpha(alpha);
814 }
815}
803 816
804LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string& id) const 817LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string& id) const
805{ 818{