summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authormaximbproductengine <maximbproductengine@lindenlab.com>2013-01-04 21:20:09 +0200
committermaximbproductengine <maximbproductengine@lindenlab.com>2013-01-04 21:20:09 +0200
commit39ff545bab2c1e05b7b9fe14ee99828795f1f78f (patch)
treee4130f32004ef4030ec49d370ef926c66bb379ab /indra/llui
parent4d971c43518f02fe202cf437f059250061cd9756 (diff)
parent9d687cc0042a6972a603778359055394c1cf0850 (diff)
merge
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)