aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui/llpanel.cpp')
-rw-r--r--linden/indra/llui/llpanel.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp
index 709342b..07e78ed 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{
@@ -1158,7 +1171,7 @@ void LLLayoutStack::draw()
1158 1171
1159 LLLocalClipRect clip(clip_rect); 1172 LLLocalClipRect clip(clip_rect);
1160 // only force drawing invisible children if visible amount is non-zero 1173 // only force drawing invisible children if visible amount is non-zero
1161 drawChild(panelp, 0, 0, !clip_rect.isNull()); 1174 drawChild(panelp, 0, 0, !clip_rect.isEmpty());
1162 } 1175 }
1163} 1176}
1164 1177