summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-01-04 19:01:10 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2013-01-04 19:01:10 -0800
commit6153d09e52c5b41f69533cfe94af94d0f086c6ea (patch)
treede1695972eeea25718d38296577769ce49e09f23 /indra/llui
parent02ca16c1334d1409d8b14136f76305686796c359 (diff)
parent39ff545bab2c1e05b7b9fe14ee99828795f1f78f (diff)
merging in latest changes
Diffstat (limited to 'indra/llui')
-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 7ca9b869a8..a8149a9a1d 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -311,7 +311,7 @@ void LLButton::onCommit()
{
make_ui_sound("UISndClickRelease");
}
-
+
if (mIsToggle)
{
toggleState();
@@ -613,8 +613,6 @@ void LLButton::draw()
static LLCachedControl<bool> sEnableButtonFlashing(*LLUI::sSettingGroups["config"], "EnableButtonFlashing", true);
F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency();
- bool flash = mFlashing && sEnableButtonFlashing;
-
bool pressed_by_keyboard = FALSE;
if (hasFocus())
{
@@ -642,6 +640,17 @@ void LLButton::draw()
LLColor4 glow_color;
LLRender::eBlendType glow_type = LLRender::BT_ADD_WITH_ALPHA;
LLUIImage* imagep = NULL;
+
+ // Cancel sticking of color, if the button is pressed,
+ // or when a flashing of the previously selected button is ended
+ if (mFlashingTimer
+ && ((selected && !mFlashingTimer->isFlashingInProgress()) || pressed))
+ {
+ mFlashing = false;
+ }
+
+ bool flash = mFlashing && sEnableButtonFlashing;
+
if (pressed && mDisplayPressedState)
{
imagep = selected ? mImagePressedSelected : mImagePressed;
@@ -697,8 +706,7 @@ void LLButton::draw()
imagep = mImageDisabled;
}
- // Selected has a higher priority than flashing. If both are set, flashing is ignored.
- if (mFlashing && !selected)
+ if (mFlashing)
{
// if button should flash and we have icon for flashing, use it as image for button
if(flash && mImageFlash)