summaryrefslogtreecommitdiff
path: root/indra/llui/llbutton.cpp
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2012-01-19 15:49:48 -0500
committerDebi King (Dessie) <dessie@lindenlab.com>2012-01-19 15:49:48 -0500
commit7e9ba401d1489ef96c5315f03332f28d62d97899 (patch)
treec2eabeb3f4f635ae49e5a3e9b07da54dad30eee2 /indra/llui/llbutton.cpp
parent2abb1a81c56a27eab02157851cb9e67730231bb6 (diff)
parent4c5141c5677a2e98c1331026d4e119abee6ab2ae (diff)
reconciled .hgtags
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r--indra/llui/llbutton.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 93d8282aa7..f0d92d597a 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -589,15 +589,23 @@ void LLButton::getOverlayImageSize(S32& overlay_width, S32& overlay_height)
// virtual
void LLButton::draw()
{
+ static LLCachedControl<bool> sEnableButtonFlashing(*LLUI::sSettingGroups["config"], "EnableButtonFlashing", true);
F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency();
bool flash = FALSE;
- if( mFlashing )
+ if( mFlashing)
{
- F32 elapsed = mFlashingTimer.getElapsedTimeF32();
- S32 flash_count = S32(elapsed * mButtonFlashRate * 2.f);
- // flash on or off?
- flash = (flash_count % 2 == 0) || flash_count > S32((F32)mButtonFlashCount * 2.f);
+ if ( sEnableButtonFlashing)
+ {
+ F32 elapsed = mFlashingTimer.getElapsedTimeF32();
+ S32 flash_count = S32(elapsed * mButtonFlashRate * 2.f);
+ // flash on or off?
+ flash = (flash_count % 2 == 0) || flash_count > S32((F32)mButtonFlashCount * 2.f);
+ }
+ else
+ { // otherwise just highlight button in flash color
+ flash = true;
+ }
}
bool pressed_by_keyboard = FALSE;