diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-03-27 19:05:23 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-03-27 22:38:15 +0200 |
commit | eaa9b152bfe9b5da44f724ddce1a2ecc86dc61bf (patch) | |
tree | 55d78528f5560a5b73dd3a5e87b68a7dc04181f8 /indra/llui | |
parent | 9ec2aac56c0e1a60ad8dbf6549b8a3cf7efec570 (diff) |
SL-307 Implemented ability to specify color and changed flashing color
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llbutton.cpp | 5 | ||||
-rw-r--r-- | indra/llui/llbutton.h | 1 | ||||
-rw-r--r-- | indra/llui/lltabcontainer.cpp | 11 | ||||
-rw-r--r-- | indra/llui/lltabcontainer.h | 3 |
4 files changed, 19 insertions, 1 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 27444b7f5b..804204cce0 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -734,6 +734,11 @@ void LLButton::draw() { glow_color = highlighting_color; } + else + { + // will fade from highlight color + glow_color = flash_color; + } } } diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 7629ed1fea..572d36996c 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -205,6 +205,7 @@ public: void setFlashing( bool b, bool force_flashing = false ); BOOL getFlashing() const { return mFlashing; } LLFlashTimer* getFlashTimer() {return mFlashingTimer;} + void setFlashColor(const LLUIColor &color) { mFlashBgColor = color; }; void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; } LLFontGL::HAlign getHAlign() const { return mHAlign; } diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 2a221fc19c..750a3aff9c 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -260,6 +260,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mCustomIconCtrlUsed(p.use_custom_icon_ctrl), mOpenTabsOnDragAndDrop(p.open_tabs_on_drag_and_drop), mTabIconCtrlPad(p.tab_icon_ctrl_pad), + mEnableTabsFlashing(p.enable_tabs_flashing), mUseTabEllipses(p.use_ellipses) { static LLUICachedControl<S32> tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0); @@ -1641,6 +1642,16 @@ void LLTabContainer::setTabPanelFlashing(LLPanel* child, BOOL state ) } } +void LLTabContainer::setTabPanelFlashing(LLPanel* child, BOOL state, LLUIColor color) +{ + LLTabTuple* tuple = getTabByPanel(child); + if (tuple) + { + tuple->mButton->setFlashColor(color); + tuple->mButton->setFlashing(state); + } +} + void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const LLColor4& color) { LLTabTuple* tuple = getTabByPanel(child); diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 8f93f1c47d..5339bec3dd 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -111,7 +111,7 @@ public: Optional<bool> open_tabs_on_drag_and_drop; /** - * Open tabs on hover in drag and drop situations + * Enable tab flashing */ Optional<bool> enable_tabs_flashing; @@ -203,6 +203,7 @@ public: BOOL getTabPanelFlashing(LLPanel* child); void setTabPanelFlashing(LLPanel* child, BOOL state); + void setTabPanelFlashing(LLPanel* child, BOOL state, LLUIColor color); void setTabImage(LLPanel* child, std::string img_name, const LLColor4& color = LLColor4::white); void setTabImage(LLPanel* child, const LLUUID& img_id, const LLColor4& color = LLColor4::white); void setTabImage(LLPanel* child, LLIconCtrl* icon); |