From 64f30a302dfbcaf56502676fa4b8d8a06f355b40 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 20 Sep 2011 16:37:21 -0700 Subject: EXP-1228 FIX Create toolbar widget class that displays list of buttons horizontally or vertically buttons are now centered and sized according to content created floater_test_toolbar.xml to test --- indra/llui/llbutton.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 5968916006..bc5e69fad5 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -327,15 +327,14 @@ private: LLUIColor mImageColor; LLUIColor mDisabledImageColor; - BOOL mIsToggle; - BOOL mScaleImage; + bool mIsToggle; + bool mScaleImage; - BOOL mDropShadowedText; - BOOL mAutoResize; - BOOL mUseEllipses; - BOOL mBorderEnabled; - - BOOL mFlashing; + bool mDropShadowedText; + bool mAutoResize; + bool mUseEllipses; + bool mBorderEnabled; + bool mFlashing; LLFontGL::HAlign mHAlign; S32 mLeftHPad; @@ -355,9 +354,9 @@ private: F32 mHoverGlowStrength; F32 mCurGlowStrength; - BOOL mNeedsHighlight; - BOOL mCommitOnReturn; - BOOL mFadeWhenDisabled; + bool mNeedsHighlight; + bool mCommitOnReturn; + bool mFadeWhenDisabled; bool mForcePressedState; LLFrameTimer mFlashingTimer; -- cgit v1.2.3 From 8912a9bef62386e5eecaa61ba9079d507ae16d90 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 27 Sep 2011 15:53:38 -0700 Subject: EXP-1258 WIP toggle buttons between icons and icons+text modes better button sizing also disabled context menu for non-toolbar region --- indra/llui/llbutton.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index bc5e69fad5..08b45e01b3 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -270,6 +270,7 @@ public: protected: LLPointer getImageUnselected() const { return mImageUnselected; } LLPointer getImageSelected() const { return mImageSelected; } + void getOverlayImageSize(S32& overlay_width, S32& overlay_height); LLFrameTimer mMouseDownTimer; -- cgit v1.2.3 From 93e3c8e4a51dd60c202bc2e3f11b9ae850b2b6c8 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 5 Oct 2011 16:28:40 -0700 Subject: EXP-1280 FIX -- Minimized floaters associated with toolbar buttons should change the state of their parent button * Toolbar buttons now display green when its corresponding floater is open or minimized. * Made changes to buttons so flash time and rate is configurable * Removed unused "highlight_color" attribute from LLButton * Implemented "isVisible" function for toolbar button floaters. It returns true when the floater is visible or minimized. * Toolbar floater unminimize now also puts focus to the floater * All commands now specify their "is_running_function" for toolbar button state * ButtonFlashCount and ButtonFlashRate have been moved to button.xml settings and are now configurable on the button. Toolbar buttons are set to never flash and this functionality is used to show which buttons have windows open. * All toybox buttons show hover glow even when disabled Reviewed by Richard. --- indra/llui/llbutton.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 08b45e01b3..14c1d01c7e 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -91,7 +91,6 @@ public: label_color_selected, label_color_disabled, label_color_disabled_selected, - highlight_color, image_color, image_color_disabled, image_overlay_color, @@ -120,7 +119,8 @@ public: // misc Optional is_toggle, scale_image, - commit_on_return; + commit_on_return, + display_pressed_state; Optional hover_glow_amount; Optional held_down_delay; @@ -131,6 +131,9 @@ public: Optional handle_right_mouse; + Optional button_flash_count; + Optional button_flash_rate; + Params(); }; @@ -273,6 +276,9 @@ protected: void getOverlayImageSize(S32& overlay_width, S32& overlay_height); LLFrameTimer mMouseDownTimer; + bool mNeedsHighlight; + S32 mButtonFlashCount; + F32 mButtonFlashRate; private: void drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size); @@ -322,7 +328,6 @@ private: flash icon name is set in attributes(by default it isn't). First way is used otherwise. */ LLPointer mImageFlash; - LLUIColor mHighlightColor; LLUIColor mFlashBgColor; LLUIColor mImageColor; @@ -355,10 +360,10 @@ private: F32 mHoverGlowStrength; F32 mCurGlowStrength; - bool mNeedsHighlight; bool mCommitOnReturn; bool mFadeWhenDisabled; bool mForcePressedState; + bool mDisplayPressedState; LLFrameTimer mFlashingTimer; -- cgit v1.2.3 From adeaf71e3314e44a33864dbe90d93040d4247c67 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 6 Oct 2011 15:19:15 -0700 Subject: EXP-1300 WIP Visual feedback for Drag and Drop removed hover highlighting of buttons when dragging over them also updated toolbar button art to match spec --- indra/llui/llbutton.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 14c1d01c7e..a0a7b4e372 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -160,7 +160,6 @@ public: virtual void draw(); /*virtual*/ BOOL postBuild(); - virtual void onMouseEnter(S32 x, S32 y, MASK mask); virtual void onMouseLeave(S32 x, S32 y, MASK mask); virtual void onMouseCaptureLost(); -- cgit v1.2.3 From aec61c579a40687e2696d38a535143d59f771416 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 11 Oct 2011 10:07:19 -0700 Subject: Added 'execute_stop_function' command parameter to handle mouse down/up actions on toolbar buttons --- indra/llui/llbutton.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index a0a7b4e372..ba0345f610 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -170,6 +170,11 @@ public: void setUseEllipses( BOOL use_ellipses ) { mUseEllipses = use_ellipses; } + boost::signals2::connection setClickedCallback(const CommitCallbackParam& cb); + boost::signals2::connection setMouseDownCallback(const CommitCallbackParam& cb); + boost::signals2::connection setMouseUpCallback(const CommitCallbackParam& cb); + boost::signals2::connection setHeldDownCallback(const CommitCallbackParam& cb); + boost::signals2::connection setClickedCallback( const commit_signal_t::slot_type& cb ); // mouse down and up within button boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ); boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); // mouse up, EVEN IF NOT IN BUTTON -- cgit v1.2.3 From 9206226a377c88d34036ebd8a3ac6d9d55bc4146 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 12 Oct 2011 18:16:59 -0700 Subject: tooltips now only show labels for toolbar buttons when label is hidden or truncated tooltips are no longer instantaneous once a tooltip is visible --- indra/llui/llbutton.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index ba0345f610..7d9adcd892 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -242,6 +242,8 @@ public: S32 getLastDrawCharsCount() const { return mLastDrawCharsCount; } + bool labelIsTruncated() const; + const LLUIString& getCurrentLabel() const; void setScaleImage(BOOL scale) { mScaleImage = scale; } BOOL getScaleImage() const { return mScaleImage; } -- cgit v1.2.3 From 6d1ae4e0d6668983dc9386903155e426bd2912a3 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 16 Oct 2011 23:37:55 -0700 Subject: wip on dragging disabled toolbar buttons --- indra/llui/llbutton.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 7d9adcd892..1aa58ed9aa 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -94,6 +94,7 @@ public: image_color, image_color_disabled, image_overlay_color, + image_overlay_disabled_color, flash_color; // layout @@ -286,11 +287,9 @@ protected: S32 mButtonFlashCount; F32 mButtonFlashRate; -private: void drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size); void resetMouseDownTimer(); -private: commit_signal_t* mMouseDownSignal; commit_signal_t* mMouseUpSignal; commit_signal_t* mHeldDownSignal; @@ -306,6 +305,7 @@ private: LLPointer mImageOverlay; LLFontGL::HAlign mImageOverlayAlignment; LLUIColor mImageOverlayColor; + LLUIColor mImageOverlayDisabledColor; LLPointer mImageUnselected; LLUIString mUnselectedLabel; -- cgit v1.2.3 From a2e32429bbe222342c413eb06e2820f6292e251a Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 17 Oct 2011 13:42:35 -0700 Subject: fix for not being able to drag disabled buttons --- indra/llui/llbutton.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 1aa58ed9aa..deaa0823c6 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -94,6 +94,7 @@ public: image_color, image_color_disabled, image_overlay_color, + image_overlay_selected_color, image_overlay_disabled_color, flash_color; @@ -305,6 +306,7 @@ protected: LLPointer mImageOverlay; LLFontGL::HAlign mImageOverlayAlignment; LLUIColor mImageOverlayColor; + LLUIColor mImageOverlaySelectedColor; LLUIColor mImageOverlayDisabledColor; LLPointer mImageUnselected; -- cgit v1.2.3