diff options
author | Oz Linden <oz@lindenlab.com> | 2012-01-09 09:05:14 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-01-09 09:05:14 -0500 |
commit | 03290257345c22f909cf1cfac3981e7e07820d21 (patch) | |
tree | 4b4be7538fb1768f32d6b3c2e7cd060b48d2faca /indra/llui/llbutton.cpp | |
parent | 889d4d292b2318a2be4988a700d5f56a193a377a (diff) | |
parent | 41ceee848bbbaec892471b6396bd2d2383d10aa3 (diff) |
merge up to latest viewer-development
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r-- | indra/llui/llbutton.cpp | 18 |
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; |