diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-08-12 01:12:27 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-08-12 01:12:27 +0000 |
commit | 0bf4b5f2222ffb8171be094613363427f3b8470a (patch) | |
tree | 4b742d6815f44a85c98113e9c5a3017eafc5968d /indra/llui/llbutton.cpp | |
parent | 8d7e56f219d0915e2c4a19baf2809dbc6ede7fa5 (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll@1277 https://svn.aws.productengine.com/secondlife/pe/stable-1@1297 -> viewer-2-0
Fixes:
EXT 208 EXT 366 EXT-211 EXT-245 EXT-246 EXT-278 EXT-279 EXT-280 EXT-298 EXT-301 EXT-304 EXT-311 EXT-317 EXT-318 EXT-319 EXT-339 EXT-343 EXT-344 EXT-346 EXT-349 EXT-350 EXT-351 EXT-354 EXT-355 EXT-358 EXT-360 EXT-362 EXT-369 EXT-372 EXT-374 EXT-381 EXT-382 EXT-383 EXT-395 EXT-396 EXT-412
Other changes:
Movement & Caemra controls work
Profile and Me panel refactoring
Notification refactoring
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r-- | indra/llui/llbutton.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index ac368fd785..c566282bef 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -64,6 +64,7 @@ LLButton::Params::Params() : label_selected("label_selected"), // requires is_toggle true label_shadow("label_shadow", true), auto_resize("auto_resize", false), + use_ellipses("use_ellipses", false), image_unselected("image_unselected"), image_selected("image_selected"), image_hover_selected("image_hover_selected"), @@ -138,6 +139,7 @@ LLButton::LLButton(const LLButton::Params& p) mScaleImage(p.scale_image), mDropShadowedText(p.label_shadow), mAutoResize(p.auto_resize), + mUseEllipses( p.use_ellipses ), mHAlign(p.font_halign), mLeftHPad(p.pad_left), mRightHPad(p.pad_right), @@ -280,11 +282,6 @@ boost::signals2::connection LLButton::setHeldDownCallback( const commit_signal_t { return mHeldDownSignal.connect(cb); } - -boost::signals2::connection LLButton::setRightClickedCallback( const commit_signal_t::slot_type& cb ) -{ - return mRightClickSignal.connect(cb); -} // *TODO: Deprecate (for backwards compatability only) @@ -437,7 +434,7 @@ BOOL LLButton::handleRightMouseUp(S32 x, S32 y, MASK mask) if (pointInView(x, y)) { - mRightClickSignal(this, getValue()); + mRightClickSignal(this, x,y,mask); } } else @@ -780,13 +777,18 @@ void LLButton::draw() x++; } + // *NOTE: mantipov: before mUseEllipses is implemented in EXT-279 U32_MAX has been passed as + // max_chars. + // LLFontGL::render expects S32 max_chars variable but process in a separate way -1 value. + // Due to U32_MAX is equal to S32 -1 value I have rest this value for non-ellipses mode. + // Not sure if it is really needed. Probably S32_MAX should be always passed as max_chars. mGLFont->render(label, 0, (F32)x, (F32)(LLBUTTON_V_PAD + y_offset), label_color, mHAlign, LLFontGL::BOTTOM, LLFontGL::NORMAL, mDropShadowedText ? LLFontGL::DROP_SHADOW_SOFT : LLFontGL::NO_SHADOW, - U32_MAX, text_width, - NULL, FALSE, FALSE); + S32_MAX, text_width, + NULL, FALSE, mUseEllipses); } LLUICtrl::draw(); |