From 406195e4f20e0bea341c8a7a979b56a8259b8536 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 24 May 2011 09:38:49 -0700 Subject: Added badges version 0.1 to buttons. Reviewed by Richard --- indra/llui/llbutton.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 0cfc393e05..232ab81e0d 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -27,6 +27,8 @@ #ifndef LL_LLBUTTON_H #define LL_LLBUTTON_H +#include "lluuid.h" +#include "llbadge.h" #include "llcontrol.h" #include "lluictrl.h" #include "v4color.h" @@ -52,8 +54,6 @@ S32 round_up(S32 grid, S32 value); class LLUICtrlFactory; -class LLUIImage; -class LLUUID; // // Classes @@ -126,6 +126,8 @@ public: Optional held_down_delay; Optional use_draw_context_alpha; + + Optional badge; Params(); }; @@ -249,6 +251,8 @@ public: void setImageDisabledSelected(LLPointer image); void setImageFlash(LLPointer image); void setImagePressed(LLPointer image); + + void setBadgeLabel(const LLStringExplicit& label); void setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; } BOOL getCommitOnReturn() const { return mCommitOnReturn; } @@ -267,6 +271,8 @@ protected: LLPointer getImageUnselected() const { return mImageUnselected; } LLPointer getImageSelected() const { return mImageSelected; } + void addBadgeToParentPanel(); + LLFrameTimer mMouseDownTimer; private: @@ -357,6 +363,8 @@ private: bool mForcePressedState; LLFrameTimer mFlashingTimer; + + LLBadge* mBadge; }; // Build time optimization, generate once in .cpp file -- cgit v1.2.3 From 1aed9849285b574346087eb5ac7e0c8038fa21fe Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 7 Jun 2011 13:57:19 -0700 Subject: EXP-865 PROGRESS -- Modify LLBadge to allow it to hang off of non-buttons Added the following for increased LLBadge functionality: * Panels now choose whether or not they accept buttons as children, which they do by default. * UI controls now shuffle controls with "requests_front" to the front of their children list at postBuild time. * Badges are set to "requests_front" by default * Badges now accept border image and color attributes Reviewed by Callum --- indra/llui/llbutton.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 232ab81e0d..07f0395719 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -125,7 +125,7 @@ public: Optional hover_glow_amount; Optional held_down_delay; - Optional use_draw_context_alpha; + Optional use_draw_context_alpha; Optional badge; -- cgit v1.2.3 From 888b39c283e53fd128778e70e231bcb6053de4b8 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 8 Jun 2011 13:14:15 -0700 Subject: EXP-865 PROGRESS -- Modify LLBadge to allow it to hang off of non-buttons Moved LLBadge use from LLButton into a separate LLBadgeOwner class. LLButton now derives from LLBadgeOwner which handles the bulk of the badge management. --- indra/llui/llbutton.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 07f0395719..5880a0e1f2 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -28,7 +28,7 @@ #define LL_LLBUTTON_H #include "lluuid.h" -#include "llbadge.h" +#include "llbadgeowner.h" #include "llcontrol.h" #include "lluictrl.h" #include "v4color.h" @@ -60,7 +60,7 @@ class LLUICtrlFactory; // class LLButton -: public LLUICtrl +: public LLUICtrl, public LLBadgeOwner { public: struct Params @@ -252,8 +252,6 @@ public: void setImageFlash(LLPointer image); void setImagePressed(LLPointer image); - void setBadgeLabel(const LLStringExplicit& label); - void setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; } BOOL getCommitOnReturn() const { return mCommitOnReturn; } @@ -271,8 +269,6 @@ protected: LLPointer getImageUnselected() const { return mImageUnselected; } LLPointer getImageSelected() const { return mImageSelected; } - void addBadgeToParentPanel(); - LLFrameTimer mMouseDownTimer; private: @@ -363,8 +359,6 @@ private: bool mForcePressedState; LLFrameTimer mFlashingTimer; - - LLBadge* mBadge; }; // Build time optimization, generate once in .cpp file -- cgit v1.2.3 From 64f978dc81cf6b3dad42fc5f1cf3896208efc8ac Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 16 Jun 2011 16:39:30 -0700 Subject: EXP-891 Right click on Inbox or Outbox toggles up down arrow but has no action --- indra/llui/llbutton.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llui/llbutton.h') diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 5880a0e1f2..5968916006 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -129,6 +129,8 @@ public: Optional badge; + Optional handle_right_mouse; + Params(); }; @@ -359,6 +361,8 @@ private: bool mForcePressedState; LLFrameTimer mFlashingTimer; + + bool mHandleRightMouse; }; // Build time optimization, generate once in .cpp file -- cgit v1.2.3