diff options
| author | Oz Linden <oz@lindenlab.com> | 2010-12-02 15:32:12 -0500 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2010-12-02 15:32:12 -0500 |
| commit | b8a925ec71f2a4483476e363428c5656702b1f19 (patch) | |
| tree | 117c4b884d8fd1e79e8f64184e62ea453d82a990 /indra/llui/llbutton.cpp | |
| parent | 23031612745c7f1094a77252b24039333420b8c5 (diff) | |
| parent | 90a365ed2f13612d267a4eed9b54bd1b62edb7d5 (diff) | |
merge fix for STORM-584
Diffstat (limited to 'indra/llui/llbutton.cpp')
| -rw-r--r-- | indra/llui/llbutton.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 65ef3e5f8f..45ceaff696 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -98,7 +98,8 @@ LLButton::Params::Params() is_toggle("is_toggle", false), scale_image("scale_image", true), hover_glow_amount("hover_glow_amount"), - commit_on_return("commit_on_return", true) + commit_on_return("commit_on_return", true), + use_draw_context_alpha("use_draw_context_alpha", true) { addSynonym(is_toggle, "toggle"); held_down_delay.seconds = 0.5f; @@ -158,7 +159,8 @@ LLButton::LLButton(const LLButton::Params& p) mLastDrawCharsCount(0), mMouseDownSignal(NULL), mMouseUpSignal(NULL), - mHeldDownSignal(NULL) + mHeldDownSignal(NULL), + mUseDrawContextAlpha(p.use_draw_context_alpha) { static LLUICachedControl<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0); @@ -539,7 +541,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask) // virtual void LLButton::draw() { - F32 alpha = getDrawContext().mAlpha; + F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency(); bool flash = FALSE; static LLUICachedControl<F32> button_flash_rate("ButtonFlashRate", 0); static LLUICachedControl<S32> button_flash_count("ButtonFlashCount", 0); |
